diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.net8.0.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.net8.0.cs index b7d5d59400f7..5de4d70cd0ed 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.net8.0.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.net8.0.cs @@ -1703,6 +1703,7 @@ public DataTransferJobGetResultData() { } public Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? Mode { get { throw null; } set { } } public long? ProcessedCount { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Source { get { throw null; } set { } } + public System.Collections.Generic.IList SourceAndDestinationContainers { get { throw null; } } public string Status { get { throw null; } } public long? TotalCount { get { throw null; } } public int? WorkerCount { get { throw null; } set { } } @@ -2614,9 +2615,10 @@ public static partial class ArmCosmosDBModelFactory public static Azure.ResourceManager.CosmosDB.CosmosDBThroughputPoolAccountData CosmosDBThroughputPoolAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus?), Azure.Core.ResourceIdentifier accountResourceIdentifier = null, Azure.Core.AzureLocation? accountLocation = default(Azure.Core.AzureLocation?), string accountInstanceId = null) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBThroughputPoolData CosmosDBThroughputPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus?), int? maxThroughput = default(int?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DatabaseAccountKeysMetadata DatabaseAccountKeysMetadata(System.DateTimeOffset? primaryMasterKeyGeneratedOn = default(System.DateTimeOffset?), System.DateTimeOffset? secondaryMasterKeyGeneratedOn = default(System.DateTimeOffset?), System.DateTimeOffset? primaryReadonlyMasterKeyGeneratedOn = default(System.DateTimeOffset?), System.DateTimeOffset? secondaryReadonlyMasterKeyGeneratedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.DataTransferContainerDetails DataTransferContainerDetails(int? totalCount = default(int?), int? processedCount = default(int?), Azure.ResourceManager.CosmosDB.Models.ContainerEntity source = null, Azure.ResourceManager.CosmosDB.Models.ContainerEntity destination = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent DataTransferJobGetResultCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties properties = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.DataTransferJobGetResultData DataTransferJobGetResultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties DataTransferJobProperties(string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.DataTransferJobGetResultData DataTransferJobGetResultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, System.Collections.Generic.IEnumerable sourceAndDestinationContainers = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties DataTransferJobProperties(string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, System.Collections.Generic.IEnumerable sourceAndDestinationContainers = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DataTransferRegionalService DataTransferRegionalService(string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DataTransferServiceProperties DataTransferServiceProperties(System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize? instanceSize = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize?), int? instanceCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus?), System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraKeyspaceResourceInfo ExtendedCassandraKeyspaceResourceInfo(string keyspaceName = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } @@ -2721,7 +2723,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class AzureBlobDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AzureBlobDataTransferDataSourceSink(string containerName) { } + public AzureBlobDataTransferDataSourceSink() { } public string ContainerName { get { throw null; } set { } } public System.Uri EndpointUri { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2731,6 +2733,17 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AzureBlobStorageContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureBlobStorageContainerEntity(string containerName) { } + public string ContainerName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.AzureBlobStorageContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.AzureBlobStorageContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BackupPolicyMigrationState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupPolicyMigrationState() { } @@ -3526,6 +3539,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class ContainerEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ContainerEntity() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.ContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.ContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContinuousBackupRestoreLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContinuousBackupRestoreLocation() { } @@ -3566,9 +3589,21 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.ContinuousTier left, Azure.ResourceManager.CosmosDB.Models.ContinuousTier right) { throw null; } public override string ToString() { throw null; } } + public partial class CosmosCassandraContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CosmosCassandraContainerEntity(string keySpaceName, string tableName) { } + public string KeySpaceName { get { throw null; } set { } } + public string TableName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosCassandraContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosCassandraContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CosmosCassandraDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosCassandraDataTransferDataSourceSink(string keyspaceName, string tableName) { } + public CosmosCassandraDataTransferDataSourceSink() { } public string KeyspaceName { get { throw null; } set { } } public string TableName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -5118,7 +5153,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class CosmosMongoDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosMongoDataTransferDataSourceSink(string databaseName, string collectionName) { } + public CosmosMongoDataTransferDataSourceSink() { } public string CollectionName { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -5128,9 +5163,21 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CosmosMongoVCoreContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CosmosMongoVCoreContainerEntity(string databaseName, string collectionName) { } + public string CollectionName { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosMongoVCoreContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosMongoVCoreContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CosmosMongoVCoreDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosMongoVCoreDataTransferDataSourceSink(string databaseName, string collectionName) { } + public CosmosMongoVCoreDataTransferDataSourceSink() { } public string CollectionName { get { throw null; } set { } } public System.Uri ConnectionStringKeyVaultUri { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } @@ -5142,9 +5189,21 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CosmosSqlContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CosmosSqlContainerEntity(string databaseName, string containerName) { } + public string ContainerName { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosSqlContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosSqlContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CosmosSqlDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosSqlDataTransferDataSourceSink(string databaseName, string containerName) { } + public CosmosSqlDataTransferDataSourceSink() { } public string ContainerName { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -5180,6 +5239,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataTransferContainerDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataTransferContainerDetails(Azure.ResourceManager.CosmosDB.Models.ContainerEntity source, Azure.ResourceManager.CosmosDB.Models.ContainerEntity destination) { } + public Azure.ResourceManager.CosmosDB.Models.ContainerEntity Destination { get { throw null; } set { } } + public int? ProcessedCount { get { throw null; } } + public Azure.ResourceManager.CosmosDB.Models.ContainerEntity Source { get { throw null; } set { } } + public int? TotalCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.DataTransferContainerDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.DataTransferContainerDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class DataTransferDataSourceSink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DataTransferDataSourceSink() { } @@ -5230,6 +5303,7 @@ public DataTransferJobProperties(Azure.ResourceManager.CosmosDB.Models.DataTrans public Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? Mode { get { throw null; } set { } } public long? ProcessedCount { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Source { get { throw null; } set { } } + public System.Collections.Generic.IList SourceAndDestinationContainers { get { throw null; } } public string Status { get { throw null; } } public long? TotalCount { get { throw null; } } public int? WorkerCount { get { throw null; } set { } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs index b7d5d59400f7..5de4d70cd0ed 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs @@ -1703,6 +1703,7 @@ public DataTransferJobGetResultData() { } public Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? Mode { get { throw null; } set { } } public long? ProcessedCount { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Source { get { throw null; } set { } } + public System.Collections.Generic.IList SourceAndDestinationContainers { get { throw null; } } public string Status { get { throw null; } } public long? TotalCount { get { throw null; } } public int? WorkerCount { get { throw null; } set { } } @@ -2614,9 +2615,10 @@ public static partial class ArmCosmosDBModelFactory public static Azure.ResourceManager.CosmosDB.CosmosDBThroughputPoolAccountData CosmosDBThroughputPoolAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus?), Azure.Core.ResourceIdentifier accountResourceIdentifier = null, Azure.Core.AzureLocation? accountLocation = default(Azure.Core.AzureLocation?), string accountInstanceId = null) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBThroughputPoolData CosmosDBThroughputPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus?), int? maxThroughput = default(int?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DatabaseAccountKeysMetadata DatabaseAccountKeysMetadata(System.DateTimeOffset? primaryMasterKeyGeneratedOn = default(System.DateTimeOffset?), System.DateTimeOffset? secondaryMasterKeyGeneratedOn = default(System.DateTimeOffset?), System.DateTimeOffset? primaryReadonlyMasterKeyGeneratedOn = default(System.DateTimeOffset?), System.DateTimeOffset? secondaryReadonlyMasterKeyGeneratedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.DataTransferContainerDetails DataTransferContainerDetails(int? totalCount = default(int?), int? processedCount = default(int?), Azure.ResourceManager.CosmosDB.Models.ContainerEntity source = null, Azure.ResourceManager.CosmosDB.Models.ContainerEntity destination = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent DataTransferJobGetResultCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties properties = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.DataTransferJobGetResultData DataTransferJobGetResultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties DataTransferJobProperties(string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.DataTransferJobGetResultData DataTransferJobGetResultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, System.Collections.Generic.IEnumerable sourceAndDestinationContainers = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties DataTransferJobProperties(string jobName = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source = null, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination = null, System.Collections.Generic.IEnumerable sourceAndDestinationContainers = null, string status = null, long? processedCount = default(long?), long? totalCount = default(long?), System.DateTimeOffset? lastUpdatedUtcOn = default(System.DateTimeOffset?), int? workerCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult error = null, System.TimeSpan? duration = default(System.TimeSpan?), Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? mode = default(Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DataTransferRegionalService DataTransferRegionalService(string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.DataTransferServiceProperties DataTransferServiceProperties(System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize? instanceSize = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize?), int? instanceCount = default(int?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus?), System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraKeyspaceResourceInfo ExtendedCassandraKeyspaceResourceInfo(string keyspaceName = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } @@ -2721,7 +2723,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class AzureBlobDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AzureBlobDataTransferDataSourceSink(string containerName) { } + public AzureBlobDataTransferDataSourceSink() { } public string ContainerName { get { throw null; } set { } } public System.Uri EndpointUri { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2731,6 +2733,17 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AzureBlobStorageContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureBlobStorageContainerEntity(string containerName) { } + public string ContainerName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.AzureBlobStorageContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.AzureBlobStorageContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BackupPolicyMigrationState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupPolicyMigrationState() { } @@ -3526,6 +3539,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class ContainerEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ContainerEntity() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.ContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.ContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContinuousBackupRestoreLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContinuousBackupRestoreLocation() { } @@ -3566,9 +3589,21 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.ContinuousTier left, Azure.ResourceManager.CosmosDB.Models.ContinuousTier right) { throw null; } public override string ToString() { throw null; } } + public partial class CosmosCassandraContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CosmosCassandraContainerEntity(string keySpaceName, string tableName) { } + public string KeySpaceName { get { throw null; } set { } } + public string TableName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosCassandraContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosCassandraContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CosmosCassandraDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosCassandraDataTransferDataSourceSink(string keyspaceName, string tableName) { } + public CosmosCassandraDataTransferDataSourceSink() { } public string KeyspaceName { get { throw null; } set { } } public string TableName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -5118,7 +5153,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class CosmosMongoDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosMongoDataTransferDataSourceSink(string databaseName, string collectionName) { } + public CosmosMongoDataTransferDataSourceSink() { } public string CollectionName { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -5128,9 +5163,21 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CosmosMongoVCoreContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CosmosMongoVCoreContainerEntity(string databaseName, string collectionName) { } + public string CollectionName { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosMongoVCoreContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosMongoVCoreContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CosmosMongoVCoreDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosMongoVCoreDataTransferDataSourceSink(string databaseName, string collectionName) { } + public CosmosMongoVCoreDataTransferDataSourceSink() { } public string CollectionName { get { throw null; } set { } } public System.Uri ConnectionStringKeyVaultUri { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } @@ -5142,9 +5189,21 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CosmosSqlContainerEntity : Azure.ResourceManager.CosmosDB.Models.ContainerEntity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CosmosSqlContainerEntity(string databaseName, string containerName) { } + public string ContainerName { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosSqlContainerEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.CosmosSqlContainerEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CosmosSqlDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CosmosSqlDataTransferDataSourceSink(string databaseName, string containerName) { } + public CosmosSqlDataTransferDataSourceSink() { } public string ContainerName { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -5180,6 +5239,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataTransferContainerDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataTransferContainerDetails(Azure.ResourceManager.CosmosDB.Models.ContainerEntity source, Azure.ResourceManager.CosmosDB.Models.ContainerEntity destination) { } + public Azure.ResourceManager.CosmosDB.Models.ContainerEntity Destination { get { throw null; } set { } } + public int? ProcessedCount { get { throw null; } } + public Azure.ResourceManager.CosmosDB.Models.ContainerEntity Source { get { throw null; } set { } } + public int? TotalCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.DataTransferContainerDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.CosmosDB.Models.DataTransferContainerDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class DataTransferDataSourceSink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DataTransferDataSourceSink() { } @@ -5230,6 +5303,7 @@ public DataTransferJobProperties(Azure.ResourceManager.CosmosDB.Models.DataTrans public Azure.ResourceManager.CosmosDB.Models.DataTransferJobMode? Mode { get { throw null; } set { } } public long? ProcessedCount { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Source { get { throw null; } set { } } + public System.Collections.Generic.IList SourceAndDestinationContainers { get { throw null; } } public string Status { get { throw null; } } public long? TotalCount { get { throw null; } } public int? WorkerCount { get { throw null; } set { } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultCollection.cs index 6855655db1f2..ad59f505c9e7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultCollection.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultCollection.cs @@ -41,8 +41,13 @@ public async Task CreateOrUpdate_CosmosDBDataTransferJobCreate() // invoke the operation string jobName = "j1"; - DataTransferJobGetResultCreateOrUpdateContent content = new DataTransferJobGetResultCreateOrUpdateContent(new DataTransferJobProperties(new CosmosCassandraDataTransferDataSourceSink("keyspace", "table"), new AzureBlobDataTransferDataSourceSink("blob_container") + DataTransferJobGetResultCreateOrUpdateContent content = new DataTransferJobGetResultCreateOrUpdateContent(new DataTransferJobProperties(new CosmosCassandraDataTransferDataSourceSink { + KeyspaceName = "keyspace", + TableName = "table", + }, new AzureBlobDataTransferDataSourceSink + { + ContainerName = "blob_container", EndpointUri = new Uri("https://blob.windows.net"), })); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, jobName, content); diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultResource.cs index f3eb5f745430..f1cdbf1a73c3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_DataTransferJobGetResultResource.cs @@ -69,8 +69,13 @@ public async Task Update_CosmosDBDataTransferJobCreate() DataTransferJobGetResultResource dataTransferJobGetResult = client.GetDataTransferJobGetResultResource(dataTransferJobGetResultResourceId); // invoke the operation - DataTransferJobGetResultCreateOrUpdateContent content = new DataTransferJobGetResultCreateOrUpdateContent(new DataTransferJobProperties(new CosmosCassandraDataTransferDataSourceSink("keyspace", "table"), new AzureBlobDataTransferDataSourceSink("blob_container") + DataTransferJobGetResultCreateOrUpdateContent content = new DataTransferJobGetResultCreateOrUpdateContent(new DataTransferJobProperties(new CosmosCassandraDataTransferDataSourceSink { + KeyspaceName = "keyspace", + TableName = "table", + }, new AzureBlobDataTransferDataSourceSink + { + ContainerName = "blob_container", EndpointUri = new Uri("https://blob.windows.net"), })); ArmOperation lro = await dataTransferJobGetResult.UpdateAsync(WaitUntil.Completed, content); diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs index a3e75141e860..24387cab036b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs @@ -2146,6 +2146,7 @@ public static DataTransferJobGetResultCreateOrUpdateContent DataTransferJobGetRe /// 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 . /// + /// /// Job Status. /// Processed Count. /// Total Count. @@ -2155,12 +2156,15 @@ public static DataTransferJobGetResultCreateOrUpdateContent DataTransferJobGetRe /// Total Duration of Job. /// Mode of job execution. /// A new instance for mocking. - public static DataTransferJobProperties DataTransferJobProperties(string jobName = null, DataTransferDataSourceSink source = null, DataTransferDataSourceSink destination = null, string status = null, long? processedCount = null, long? totalCount = null, DateTimeOffset? lastUpdatedUtcOn = null, int? workerCount = null, CosmosDBErrorResult error = null, TimeSpan? duration = null, DataTransferJobMode? mode = null) + public static DataTransferJobProperties DataTransferJobProperties(string jobName = null, DataTransferDataSourceSink source = null, DataTransferDataSourceSink destination = null, IEnumerable sourceAndDestinationContainers = null, string status = null, long? processedCount = null, long? totalCount = null, DateTimeOffset? lastUpdatedUtcOn = null, int? workerCount = null, CosmosDBErrorResult error = null, TimeSpan? duration = null, DataTransferJobMode? mode = null) { + sourceAndDestinationContainers ??= new List(); + return new DataTransferJobProperties( jobName, source, destination, + sourceAndDestinationContainers?.ToList(), status, processedCount, totalCount, @@ -2172,6 +2176,23 @@ public static DataTransferJobProperties DataTransferJobProperties(string jobName serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// + /// + /// 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 . + /// + /// + /// 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 . + /// + /// A new instance for mocking. + public static DataTransferContainerDetails DataTransferContainerDetails(int? totalCount = null, int? processedCount = null, ContainerEntity source = null, ContainerEntity destination = null) + { + return new DataTransferContainerDetails(totalCount, processedCount, source, destination, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -2188,6 +2209,7 @@ public static DataTransferJobProperties DataTransferJobProperties(string jobName /// 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 . /// + /// /// Job Status. /// Processed Count. /// Total Count. @@ -2197,8 +2219,10 @@ public static DataTransferJobProperties DataTransferJobProperties(string jobName /// Total Duration of Job. /// Mode of job execution. /// A new instance for mocking. - public static DataTransferJobGetResultData DataTransferJobGetResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string jobName = null, DataTransferDataSourceSink source = null, DataTransferDataSourceSink destination = null, string status = null, long? processedCount = null, long? totalCount = null, DateTimeOffset? lastUpdatedUtcOn = null, int? workerCount = null, CosmosDBErrorResult error = null, TimeSpan? duration = null, DataTransferJobMode? mode = null) + public static DataTransferJobGetResultData DataTransferJobGetResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string jobName = null, DataTransferDataSourceSink source = null, DataTransferDataSourceSink destination = null, IEnumerable sourceAndDestinationContainers = null, string status = null, long? processedCount = null, long? totalCount = null, DateTimeOffset? lastUpdatedUtcOn = null, int? workerCount = null, CosmosDBErrorResult error = null, TimeSpan? duration = null, DataTransferJobMode? mode = null) { + sourceAndDestinationContainers ??= new List(); + return new DataTransferJobGetResultData( id, name, @@ -2207,6 +2231,7 @@ public static DataTransferJobGetResultData DataTransferJobGetResultData(Resource jobName, source, destination, + sourceAndDestinationContainers?.ToList(), status, processedCount, totalCount, diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs index 84e08292fe46..606bef3e7d51 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -55,6 +56,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("destination"u8); writer.WriteObjectValue(Destination, options); } + if (Optional.IsCollectionDefined(SourceAndDestinationContainers)) + { + writer.WritePropertyName("sourceAndDestinationContainers"u8); + writer.WriteStartArray(); + foreach (var item in SourceAndDestinationContainers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -125,6 +136,7 @@ internal static DataTransferJobGetResultData DeserializeDataTransferJobGetResult string jobName = default; DataTransferDataSourceSink source = default; DataTransferDataSourceSink destination = default; + IList sourceAndDestinationContainers = default; string status = default; long? processedCount = default; long? totalCount = default; @@ -193,6 +205,20 @@ internal static DataTransferJobGetResultData DeserializeDataTransferJobGetResult destination = DataTransferDataSourceSink.DeserializeDataTransferDataSourceSink(property0.Value, options); continue; } + if (property0.NameEquals("sourceAndDestinationContainers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(DataTransferContainerDetails.DeserializeDataTransferContainerDetails(item, options)); + } + sourceAndDestinationContainers = array; + continue; + } if (property0.NameEquals("status"u8)) { status = property0.Value.GetString(); @@ -278,6 +304,7 @@ internal static DataTransferJobGetResultData DeserializeDataTransferJobGetResult jobName, source, destination, + sourceAndDestinationContainers ?? new ChangeTrackingList(), status, processedCount, totalCount, @@ -408,6 +435,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceAndDestinationContainers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceAndDestinationContainers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SourceAndDestinationContainers)) + { + if (SourceAndDestinationContainers.Any()) + { + builder.Append(" sourceAndDestinationContainers: "); + builder.AppendLine("["); + foreach (var item in SourceAndDestinationContainers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " sourceAndDestinationContainers: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.cs index 54d4b37de37b..10108145c433 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.cs @@ -54,6 +54,7 @@ public partial class DataTransferJobGetResultData : ResourceData /// Initializes a new instance of . public DataTransferJobGetResultData() { + SourceAndDestinationContainers = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -72,6 +73,7 @@ public DataTransferJobGetResultData() /// 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 . /// + /// /// Job Status. /// Processed Count. /// Total Count. @@ -81,11 +83,12 @@ public DataTransferJobGetResultData() /// Total Duration of Job. /// Mode of job execution. /// Keeps track of any properties unknown to the library. - internal DataTransferJobGetResultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string jobName, DataTransferDataSourceSink source, DataTransferDataSourceSink destination, string status, long? processedCount, long? totalCount, DateTimeOffset? lastUpdatedUtcOn, int? workerCount, CosmosDBErrorResult error, TimeSpan? duration, DataTransferJobMode? mode, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DataTransferJobGetResultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string jobName, DataTransferDataSourceSink source, DataTransferDataSourceSink destination, IList sourceAndDestinationContainers, string status, long? processedCount, long? totalCount, DateTimeOffset? lastUpdatedUtcOn, int? workerCount, CosmosDBErrorResult error, TimeSpan? duration, DataTransferJobMode? mode, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { JobName = jobName; Source = source; Destination = destination; + SourceAndDestinationContainers = sourceAndDestinationContainers; Status = status; ProcessedCount = processedCount; TotalCount = totalCount; @@ -114,6 +117,9 @@ internal DataTransferJobGetResultData(ResourceIdentifier id, string name, Resour /// [WirePath("properties.destination")] public DataTransferDataSourceSink Destination { get; set; } + /// Gets the source and destination containers. + [WirePath("properties.sourceAndDestinationContainers")] + public IList SourceAndDestinationContainers { get; } /// Job Status. [WirePath("properties.status")] public string Status { get; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs index bbb3f0b989e1..c7e7775fe8a9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs @@ -36,8 +36,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); + if (Optional.IsDefined(ContainerName)) + { + writer.WritePropertyName("containerName"u8); + writer.WriteStringValue(ContainerName); + } if (Optional.IsDefined(EndpointUri)) { writer.WritePropertyName("endpointUrl"u8); diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.cs index 0beca6426b11..11d08a0bb09c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.cs @@ -14,13 +14,8 @@ namespace Azure.ResourceManager.CosmosDB.Models public partial class AzureBlobDataTransferDataSourceSink : DataTransferDataSourceSink { /// Initializes a new instance of . - /// - /// is null. - public AzureBlobDataTransferDataSourceSink(string containerName) + public AzureBlobDataTransferDataSourceSink() { - Argument.AssertNotNull(containerName, nameof(containerName)); - - ContainerName = containerName; Component = DataTransferComponent.AzureBlobStorage; } @@ -36,11 +31,6 @@ internal AzureBlobDataTransferDataSourceSink(DataTransferComponent component, ID Component = component; } - /// Initializes a new instance of for deserialization. - internal AzureBlobDataTransferDataSourceSink() - { - } - /// Gets or sets the container name. [WirePath("containerName")] public string ContainerName { get; set; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobStorageContainerEntity.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobStorageContainerEntity.Serialization.cs new file mode 100644 index 000000000000..a9b1821b0753 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobStorageContainerEntity.Serialization.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + public partial class AzureBlobStorageContainerEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureBlobStorageContainerEntity)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("containerName"u8); + writer.WriteStringValue(ContainerName); + } + + AzureBlobStorageContainerEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureBlobStorageContainerEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureBlobStorageContainerEntity(document.RootElement, options); + } + + internal static AzureBlobStorageContainerEntity DeserializeAzureBlobStorageContainerEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string containerName = default; + DataTransferComponent component = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerName"u8)) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("component"u8)) + { + component = new DataTransferComponent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureBlobStorageContainerEntity(component, serializedAdditionalRawData, containerName); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerName)) + { + builder.Append(" containerName: "); + if (ContainerName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContainerName}'''"); + } + else + { + builder.AppendLine($"'{ContainerName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Component), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" component: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" component: "); + builder.AppendLine($"'{Component.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AzureBlobStorageContainerEntity)} does not support writing '{options.Format}' format."); + } + } + + AzureBlobStorageContainerEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureBlobStorageContainerEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureBlobStorageContainerEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobStorageContainerEntity.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobStorageContainerEntity.cs new file mode 100644 index 000000000000..91b3079c0945 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobStorageContainerEntity.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; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + /// A CosmosDB Mongo container entity. + public partial class AzureBlobStorageContainerEntity : ContainerEntity + { + /// Initializes a new instance of . + /// + /// is null. + public AzureBlobStorageContainerEntity(string containerName) + { + Argument.AssertNotNull(containerName, nameof(containerName)); + + ContainerName = containerName; + Component = DataTransferComponent.AzureBlobStorage; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// + internal AzureBlobStorageContainerEntity(DataTransferComponent component, IDictionary serializedAdditionalRawData, string containerName) : base(component, serializedAdditionalRawData) + { + ContainerName = containerName; + Component = component; + } + + /// Initializes a new instance of for deserialization. + internal AzureBlobStorageContainerEntity() + { + } + + /// Gets or sets the container name. + [WirePath("containerName")] + public string ContainerName { get; set; } + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContainerEntity.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContainerEntity.Serialization.cs new file mode 100644 index 000000000000..344985bbed95 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContainerEntity.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + [PersistableModelProxy(typeof(UnknownContainerEntity))] + public partial class ContainerEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("component"u8); + writer.WriteStringValue(Component.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerEntity(document.RootElement, options); + } + + internal static ContainerEntity DeserializeContainerEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("component", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureBlobStorage": return AzureBlobStorageContainerEntity.DeserializeAzureBlobStorageContainerEntity(element, options); + case "CosmosDBCassandra": return CosmosCassandraContainerEntity.DeserializeCosmosCassandraContainerEntity(element, options); + case "CosmosDBMongo": return CosmosMongoVCoreContainerEntity.DeserializeCosmosMongoVCoreContainerEntity(element, options); + case "CosmosDBSql": return CosmosSqlContainerEntity.DeserializeCosmosSqlContainerEntity(element, options); + } + } + return UnknownContainerEntity.DeserializeUnknownContainerEntity(element, options); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Component), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" component: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" component: "); + builder.AppendLine($"'{Component.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerEntity)} does not support writing '{options.Format}' format."); + } + } + + ContainerEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContainerEntity.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContainerEntity.cs new file mode 100644 index 000000000000..abb0facfbdcd --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContainerEntity.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + /// + /// 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 abstract partial class ContainerEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ContainerEntity() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ContainerEntity(DataTransferComponent component, IDictionary serializedAdditionalRawData) + { + Component = component; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the component. + internal DataTransferComponent Component { get; set; } + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraContainerEntity.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraContainerEntity.Serialization.cs new file mode 100644 index 000000000000..016ae95b2f5c --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraContainerEntity.Serialization.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + public partial class CosmosCassandraContainerEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CosmosCassandraContainerEntity)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("keySpaceName"u8); + writer.WriteStringValue(KeySpaceName); + writer.WritePropertyName("tableName"u8); + writer.WriteStringValue(TableName); + } + + CosmosCassandraContainerEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CosmosCassandraContainerEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCosmosCassandraContainerEntity(document.RootElement, options); + } + + internal static CosmosCassandraContainerEntity DeserializeCosmosCassandraContainerEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string keySpaceName = default; + string tableName = default; + DataTransferComponent component = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keySpaceName"u8)) + { + keySpaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("tableName"u8)) + { + tableName = property.Value.GetString(); + continue; + } + if (property.NameEquals("component"u8)) + { + component = new DataTransferComponent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CosmosCassandraContainerEntity(component, serializedAdditionalRawData, keySpaceName, tableName); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeySpaceName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keySpaceName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeySpaceName)) + { + builder.Append(" keySpaceName: "); + if (KeySpaceName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{KeySpaceName}'''"); + } + else + { + builder.AppendLine($"'{KeySpaceName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TableName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tableName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TableName)) + { + builder.Append(" tableName: "); + if (TableName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TableName}'''"); + } + else + { + builder.AppendLine($"'{TableName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Component), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" component: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" component: "); + builder.AppendLine($"'{Component.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CosmosCassandraContainerEntity)} does not support writing '{options.Format}' format."); + } + } + + CosmosCassandraContainerEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCosmosCassandraContainerEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CosmosCassandraContainerEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraContainerEntity.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraContainerEntity.cs new file mode 100644 index 000000000000..d0a5d7b4390f --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraContainerEntity.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + /// A CosmosDB Cassandra container entity. + public partial class CosmosCassandraContainerEntity : ContainerEntity + { + /// Initializes a new instance of . + /// + /// + /// or is null. + public CosmosCassandraContainerEntity(string keySpaceName, string tableName) + { + Argument.AssertNotNull(keySpaceName, nameof(keySpaceName)); + Argument.AssertNotNull(tableName, nameof(tableName)); + + KeySpaceName = keySpaceName; + TableName = tableName; + Component = DataTransferComponent.CosmosDBCassandra; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// + /// + internal CosmosCassandraContainerEntity(DataTransferComponent component, IDictionary serializedAdditionalRawData, string keySpaceName, string tableName) : base(component, serializedAdditionalRawData) + { + KeySpaceName = keySpaceName; + TableName = tableName; + Component = component; + } + + /// Initializes a new instance of for deserialization. + internal CosmosCassandraContainerEntity() + { + } + + /// Gets or sets the key space name. + [WirePath("keySpaceName")] + public string KeySpaceName { get; set; } + /// Gets or sets the table name. + [WirePath("tableName")] + public string TableName { get; set; } + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs index a0dd0e7aca6b..b6328103a929 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs @@ -36,10 +36,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("keyspaceName"u8); - writer.WriteStringValue(KeyspaceName); - writer.WritePropertyName("tableName"u8); - writer.WriteStringValue(TableName); + if (Optional.IsDefined(KeyspaceName)) + { + writer.WritePropertyName("keyspaceName"u8); + writer.WriteStringValue(KeyspaceName); + } + if (Optional.IsDefined(TableName)) + { + writer.WritePropertyName("tableName"u8); + writer.WriteStringValue(TableName); + } } CosmosCassandraDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.cs index f915006de849..99cb6ce41b55 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.cs @@ -14,16 +14,8 @@ namespace Azure.ResourceManager.CosmosDB.Models public partial class CosmosCassandraDataTransferDataSourceSink : BaseCosmosDataTransferDataSourceSink { /// Initializes a new instance of . - /// - /// - /// or is null. - public CosmosCassandraDataTransferDataSourceSink(string keyspaceName, string tableName) + public CosmosCassandraDataTransferDataSourceSink() { - Argument.AssertNotNull(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNull(tableName, nameof(tableName)); - - KeyspaceName = keyspaceName; - TableName = tableName; Component = DataTransferComponent.CosmosDBCassandra; } @@ -40,11 +32,6 @@ internal CosmosCassandraDataTransferDataSourceSink(DataTransferComponent compone Component = component; } - /// Initializes a new instance of for deserialization. - internal CosmosCassandraDataTransferDataSourceSink() - { - } - /// Gets or sets the keyspace name. [WirePath("keyspaceName")] public string KeyspaceName { get; set; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs index 798f036ecca9..274ae9f5bfbb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs @@ -36,10 +36,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("collectionName"u8); - writer.WriteStringValue(CollectionName); + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (Optional.IsDefined(CollectionName)) + { + writer.WritePropertyName("collectionName"u8); + writer.WriteStringValue(CollectionName); + } } CosmosMongoDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.cs index 1f4eb9086d73..9136be4e2322 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.cs @@ -14,16 +14,8 @@ namespace Azure.ResourceManager.CosmosDB.Models public partial class CosmosMongoDataTransferDataSourceSink : BaseCosmosDataTransferDataSourceSink { /// Initializes a new instance of . - /// - /// - /// or is null. - public CosmosMongoDataTransferDataSourceSink(string databaseName, string collectionName) + public CosmosMongoDataTransferDataSourceSink() { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - Argument.AssertNotNull(collectionName, nameof(collectionName)); - - DatabaseName = databaseName; - CollectionName = collectionName; Component = DataTransferComponent.CosmosDBMongo; } @@ -40,11 +32,6 @@ internal CosmosMongoDataTransferDataSourceSink(DataTransferComponent component, Component = component; } - /// Initializes a new instance of for deserialization. - internal CosmosMongoDataTransferDataSourceSink() - { - } - /// Gets or sets the database name. [WirePath("databaseName")] public string DatabaseName { get; set; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreContainerEntity.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreContainerEntity.Serialization.cs new file mode 100644 index 000000000000..8e61b635a515 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreContainerEntity.Serialization.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + public partial class CosmosMongoVCoreContainerEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CosmosMongoVCoreContainerEntity)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + writer.WritePropertyName("collectionName"u8); + writer.WriteStringValue(CollectionName); + } + + CosmosMongoVCoreContainerEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CosmosMongoVCoreContainerEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCosmosMongoVCoreContainerEntity(document.RootElement, options); + } + + internal static CosmosMongoVCoreContainerEntity DeserializeCosmosMongoVCoreContainerEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string databaseName = default; + string collectionName = default; + DataTransferComponent component = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("collectionName"u8)) + { + collectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("component"u8)) + { + component = new DataTransferComponent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CosmosMongoVCoreContainerEntity(component, serializedAdditionalRawData, databaseName, collectionName); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DatabaseName)) + { + builder.Append(" databaseName: "); + if (DatabaseName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DatabaseName}'''"); + } + else + { + builder.AppendLine($"'{DatabaseName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CollectionName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" collectionName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CollectionName)) + { + builder.Append(" collectionName: "); + if (CollectionName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CollectionName}'''"); + } + else + { + builder.AppendLine($"'{CollectionName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Component), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" component: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" component: "); + builder.AppendLine($"'{Component.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CosmosMongoVCoreContainerEntity)} does not support writing '{options.Format}' format."); + } + } + + CosmosMongoVCoreContainerEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCosmosMongoVCoreContainerEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CosmosMongoVCoreContainerEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreContainerEntity.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreContainerEntity.cs new file mode 100644 index 000000000000..7d76240d2ba4 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreContainerEntity.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + /// A CosmosDB Mongo vCore container entity. + public partial class CosmosMongoVCoreContainerEntity : ContainerEntity + { + /// Initializes a new instance of . + /// + /// + /// or is null. + public CosmosMongoVCoreContainerEntity(string databaseName, string collectionName) + { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Argument.AssertNotNull(collectionName, nameof(collectionName)); + + DatabaseName = databaseName; + CollectionName = collectionName; + Component = DataTransferComponent.CosmosDBMongo; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// + /// + internal CosmosMongoVCoreContainerEntity(DataTransferComponent component, IDictionary serializedAdditionalRawData, string databaseName, string collectionName) : base(component, serializedAdditionalRawData) + { + DatabaseName = databaseName; + CollectionName = collectionName; + Component = component; + } + + /// Initializes a new instance of for deserialization. + internal CosmosMongoVCoreContainerEntity() + { + } + + /// Gets or sets the database name. + [WirePath("databaseName")] + public string DatabaseName { get; set; } + /// Gets or sets the collection name. + [WirePath("collectionName")] + public string CollectionName { get; set; } + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.Serialization.cs index 8a7c8871b789..7d10b8bdd5b0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.Serialization.cs @@ -36,10 +36,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("collectionName"u8); - writer.WriteStringValue(CollectionName); + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (Optional.IsDefined(CollectionName)) + { + writer.WritePropertyName("collectionName"u8); + writer.WriteStringValue(CollectionName); + } if (Optional.IsDefined(HostName)) { writer.WritePropertyName("hostName"u8); diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.cs index e41150c2ac52..b97b267916d7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoVCoreDataTransferDataSourceSink.cs @@ -14,16 +14,8 @@ namespace Azure.ResourceManager.CosmosDB.Models public partial class CosmosMongoVCoreDataTransferDataSourceSink : DataTransferDataSourceSink { /// Initializes a new instance of . - /// - /// - /// or is null. - public CosmosMongoVCoreDataTransferDataSourceSink(string databaseName, string collectionName) + public CosmosMongoVCoreDataTransferDataSourceSink() { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - Argument.AssertNotNull(collectionName, nameof(collectionName)); - - DatabaseName = databaseName; - CollectionName = collectionName; Component = DataTransferComponent.CosmosDBMongoVCore; } @@ -43,11 +35,6 @@ internal CosmosMongoVCoreDataTransferDataSourceSink(DataTransferComponent compon Component = component; } - /// Initializes a new instance of for deserialization. - internal CosmosMongoVCoreDataTransferDataSourceSink() - { - } - /// Gets or sets the database name. [WirePath("databaseName")] public string DatabaseName { get; set; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlContainerEntity.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlContainerEntity.Serialization.cs new file mode 100644 index 000000000000..bac0e7440080 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlContainerEntity.Serialization.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + public partial class CosmosSqlContainerEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CosmosSqlContainerEntity)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + writer.WritePropertyName("containerName"u8); + writer.WriteStringValue(ContainerName); + } + + CosmosSqlContainerEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CosmosSqlContainerEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCosmosSqlContainerEntity(document.RootElement, options); + } + + internal static CosmosSqlContainerEntity DeserializeCosmosSqlContainerEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string databaseName = default; + string containerName = default; + DataTransferComponent component = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerName"u8)) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("component"u8)) + { + component = new DataTransferComponent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CosmosSqlContainerEntity(component, serializedAdditionalRawData, databaseName, containerName); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DatabaseName)) + { + builder.Append(" databaseName: "); + if (DatabaseName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DatabaseName}'''"); + } + else + { + builder.AppendLine($"'{DatabaseName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerName)) + { + builder.Append(" containerName: "); + if (ContainerName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContainerName}'''"); + } + else + { + builder.AppendLine($"'{ContainerName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Component), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" component: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" component: "); + builder.AppendLine($"'{Component.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CosmosSqlContainerEntity)} does not support writing '{options.Format}' format."); + } + } + + CosmosSqlContainerEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCosmosSqlContainerEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CosmosSqlContainerEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlContainerEntity.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlContainerEntity.cs new file mode 100644 index 000000000000..f0c7c9016c49 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlContainerEntity.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + /// A CosmosDB noSql container entity. + public partial class CosmosSqlContainerEntity : ContainerEntity + { + /// Initializes a new instance of . + /// + /// + /// or is null. + public CosmosSqlContainerEntity(string databaseName, string containerName) + { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Argument.AssertNotNull(containerName, nameof(containerName)); + + DatabaseName = databaseName; + ContainerName = containerName; + Component = DataTransferComponent.CosmosDBSql; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// + /// + internal CosmosSqlContainerEntity(DataTransferComponent component, IDictionary serializedAdditionalRawData, string databaseName, string containerName) : base(component, serializedAdditionalRawData) + { + DatabaseName = databaseName; + ContainerName = containerName; + Component = component; + } + + /// Initializes a new instance of for deserialization. + internal CosmosSqlContainerEntity() + { + } + + /// Gets or sets the database name. + [WirePath("databaseName")] + public string DatabaseName { get; set; } + /// Gets or sets the container name. + [WirePath("containerName")] + public string ContainerName { get; set; } + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs index 4908cdee97fe..551d20afaeaa 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs @@ -36,10 +36,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (Optional.IsDefined(ContainerName)) + { + writer.WritePropertyName("containerName"u8); + writer.WriteStringValue(ContainerName); + } } CosmosSqlDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.cs index 44cd8c46b05c..9cf9f123ddf5 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.cs @@ -14,16 +14,8 @@ namespace Azure.ResourceManager.CosmosDB.Models public partial class CosmosSqlDataTransferDataSourceSink : BaseCosmosDataTransferDataSourceSink { /// Initializes a new instance of . - /// - /// - /// or is null. - public CosmosSqlDataTransferDataSourceSink(string databaseName, string containerName) + public CosmosSqlDataTransferDataSourceSink() { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - Argument.AssertNotNull(containerName, nameof(containerName)); - - DatabaseName = databaseName; - ContainerName = containerName; Component = DataTransferComponent.CosmosDBSql; } @@ -40,11 +32,6 @@ internal CosmosSqlDataTransferDataSourceSink(DataTransferComponent component, ID Component = component; } - /// Initializes a new instance of for deserialization. - internal CosmosSqlDataTransferDataSourceSink() - { - } - /// Gets or sets the database name. [WirePath("databaseName")] public string DatabaseName { get; set; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferContainerDetails.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferContainerDetails.Serialization.cs new file mode 100644 index 000000000000..e5f31772db65 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferContainerDetails.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + public partial class DataTransferContainerDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataTransferContainerDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(TotalCount)) + { + writer.WritePropertyName("totalCount"u8); + writer.WriteNumberValue(TotalCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProcessedCount)) + { + writer.WritePropertyName("processedCount"u8); + writer.WriteNumberValue(ProcessedCount.Value); + } + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source, options); + writer.WritePropertyName("destination"u8); + writer.WriteObjectValue(Destination, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataTransferContainerDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataTransferContainerDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataTransferContainerDetails(document.RootElement, options); + } + + internal static DataTransferContainerDetails DeserializeDataTransferContainerDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? totalCount = default; + int? processedCount = default; + ContainerEntity source = default; + ContainerEntity destination = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("processedCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + processedCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = ContainerEntity.DeserializeContainerEntity(property.Value, options); + continue; + } + if (property.NameEquals("destination"u8)) + { + destination = ContainerEntity.DeserializeContainerEntity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataTransferContainerDetails(totalCount, processedCount, source, destination, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TotalCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" totalCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TotalCount)) + { + builder.Append(" totalCount: "); + builder.AppendLine($"{TotalCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProcessedCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" processedCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProcessedCount)) + { + builder.Append(" processedCount: "); + builder.AppendLine($"{ProcessedCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Source), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" source: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Source)) + { + builder.Append(" source: "); + BicepSerializationHelpers.AppendChildObject(builder, Source, options, 2, false, " source: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Destination), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" destination: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Destination)) + { + builder.Append(" destination: "); + BicepSerializationHelpers.AppendChildObject(builder, Destination, options, 2, false, " destination: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DataTransferContainerDetails)} does not support writing '{options.Format}' format."); + } + } + + DataTransferContainerDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataTransferContainerDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataTransferContainerDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferContainerDetails.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferContainerDetails.cs new file mode 100644 index 000000000000..056d549d9a11 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferContainerDetails.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + /// Data transfer entity. + public partial class DataTransferContainerDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// 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 . + /// + /// + /// 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 . + /// + /// or is null. + public DataTransferContainerDetails(ContainerEntity source, ContainerEntity destination) + { + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(destination, nameof(destination)); + + Source = source; + Destination = destination; + } + + /// Initializes a new instance of . + /// + /// + /// + /// 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 . + /// + /// + /// 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 . + /// + /// Keeps track of any properties unknown to the library. + internal DataTransferContainerDetails(int? totalCount, int? processedCount, ContainerEntity source, ContainerEntity destination, IDictionary serializedAdditionalRawData) + { + TotalCount = totalCount; + ProcessedCount = processedCount; + Source = source; + Destination = destination; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataTransferContainerDetails() + { + } + + /// Gets the total count. + [WirePath("totalCount")] + public int? TotalCount { get; } + /// Gets the processed count. + [WirePath("processedCount")] + public int? ProcessedCount { get; } + /// + /// Gets or sets the source + /// 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 . + /// + [WirePath("source")] + public ContainerEntity Source { get; set; } + /// + /// Gets or sets the destination + /// 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 . + /// + [WirePath("destination")] + public ContainerEntity Destination { get; set; } + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs index 163883520fae..725e3645e8b9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -44,6 +45,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Source, options); writer.WritePropertyName("destination"u8); writer.WriteObjectValue(Destination, options); + if (Optional.IsCollectionDefined(SourceAndDestinationContainers)) + { + writer.WritePropertyName("sourceAndDestinationContainers"u8); + writer.WriteStartArray(); + foreach (var item in SourceAndDestinationContainers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -124,6 +135,7 @@ internal static DataTransferJobProperties DeserializeDataTransferJobProperties(J string jobName = default; DataTransferDataSourceSink source = default; DataTransferDataSourceSink destination = default; + IList sourceAndDestinationContainers = default; string status = default; long? processedCount = default; long? totalCount = default; @@ -151,6 +163,20 @@ internal static DataTransferJobProperties DeserializeDataTransferJobProperties(J destination = DataTransferDataSourceSink.DeserializeDataTransferDataSourceSink(property.Value, options); continue; } + if (property.NameEquals("sourceAndDestinationContainers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataTransferContainerDetails.DeserializeDataTransferContainerDetails(item, options)); + } + sourceAndDestinationContainers = array; + continue; + } if (property.NameEquals("status"u8)) { status = property.Value.GetString(); @@ -229,6 +255,7 @@ internal static DataTransferJobProperties DeserializeDataTransferJobProperties(J jobName, source, destination, + sourceAndDestinationContainers ?? new ChangeTrackingList(), status, processedCount, totalCount, @@ -304,6 +331,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceAndDestinationContainers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceAndDestinationContainers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SourceAndDestinationContainers)) + { + if (SourceAndDestinationContainers.Any()) + { + builder.Append(" sourceAndDestinationContainers: "); + builder.AppendLine("["); + foreach (var item in SourceAndDestinationContainers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " sourceAndDestinationContainers: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs index 24e7baae13c5..2a820f93ea24 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs @@ -64,6 +64,7 @@ public DataTransferJobProperties(DataTransferDataSourceSink source, DataTransfer Source = source; Destination = destination; + SourceAndDestinationContainers = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -78,6 +79,7 @@ public DataTransferJobProperties(DataTransferDataSourceSink source, DataTransfer /// 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 . /// + /// /// Job Status. /// Processed Count. /// Total Count. @@ -87,11 +89,12 @@ public DataTransferJobProperties(DataTransferDataSourceSink source, DataTransfer /// Total Duration of Job. /// Mode of job execution. /// Keeps track of any properties unknown to the library. - internal DataTransferJobProperties(string jobName, DataTransferDataSourceSink source, DataTransferDataSourceSink destination, string status, long? processedCount, long? totalCount, DateTimeOffset? lastUpdatedUtcOn, int? workerCount, CosmosDBErrorResult error, TimeSpan? duration, DataTransferJobMode? mode, IDictionary serializedAdditionalRawData) + internal DataTransferJobProperties(string jobName, DataTransferDataSourceSink source, DataTransferDataSourceSink destination, IList sourceAndDestinationContainers, string status, long? processedCount, long? totalCount, DateTimeOffset? lastUpdatedUtcOn, int? workerCount, CosmosDBErrorResult error, TimeSpan? duration, DataTransferJobMode? mode, IDictionary serializedAdditionalRawData) { JobName = jobName; Source = source; Destination = destination; + SourceAndDestinationContainers = sourceAndDestinationContainers; Status = status; ProcessedCount = processedCount; TotalCount = totalCount; @@ -125,6 +128,9 @@ internal DataTransferJobProperties() /// [WirePath("destination")] public DataTransferDataSourceSink Destination { get; set; } + /// Gets the source and destination containers. + [WirePath("sourceAndDestinationContainers")] + public IList SourceAndDestinationContainers { get; } /// Job Status. [WirePath("status")] public string Status { get; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownContainerEntity.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownContainerEntity.Serialization.cs new file mode 100644 index 000000000000..145afb41630c --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownContainerEntity.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + internal partial class UnknownContainerEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerEntity)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ContainerEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerEntity(document.RootElement, options); + } + + internal static UnknownContainerEntity DeserializeUnknownContainerEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataTransferComponent component = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("component"u8)) + { + component = new DataTransferComponent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownContainerEntity(component, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Component), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" component: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" component: "); + builder.AppendLine($"'{Component.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerEntity)} does not support writing '{options.Format}' format."); + } + } + + ContainerEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownContainerEntity.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownContainerEntity.cs new file mode 100644 index 000000000000..e5a21e8ef5c2 --- /dev/null +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownContainerEntity.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.CosmosDB.Models +{ + /// Unknown version of ContainerEntity. + internal partial class UnknownContainerEntity : ContainerEntity + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownContainerEntity(DataTransferComponent component, IDictionary serializedAdditionalRawData) : base(component, serializedAdditionalRawData) + { + Component = component; + } + + /// Initializes a new instance of for deserialization. + internal UnknownContainerEntity() + { + } + } +} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md index e254f2744d2b..0ca19298a950 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md @@ -10,7 +10,7 @@ csharp: true library-name: CosmosDB namespace: Azure.ResourceManager.CosmosDB #tag: package-preview-2024-12-01 -require: https://github.com/Azure/azure-rest-api-specs/blob/2afa5b356adf6cf51209d2cf28d38644c69d9832/specification/cosmos-db/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/