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 8221a54a0356..b1dfddca508f 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 @@ -1,33 +1,5 @@ namespace Azure.ResourceManager.CosmosDB { - public partial class CassandraClusterBackupResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected CassandraClusterBackupResource() { } - public virtual Azure.ResourceManager.CosmosDB.CassandraClusterBackupResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string backupId) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class CassandraClusterBackupResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CassandraClusterBackupResourceCollection() { } - public virtual Azure.Response Exists(string backupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string backupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string backupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string backupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class CassandraClusterBackupResourceData : Azure.ResourceManager.Models.ResourceData - { - public CassandraClusterBackupResourceData() { } - public System.DateTimeOffset? BackupResourceTimestamp { get { throw null; } set { } } - } public partial class CassandraClusterCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected CassandraClusterCollection() { } @@ -64,9 +36,6 @@ protected CassandraClusterResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetCassandraClusterBackupResource(string backupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCassandraClusterBackupResourceAsync(string backupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.CosmosDB.CassandraClusterBackupResourceCollection GetCassandraClusterBackupResources() { throw null; } public virtual Azure.Response GetCassandraDataCenter(string dataCenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCassandraDataCenterAsync(string dataCenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.CosmosDB.CassandraDataCenterCollection GetCassandraDataCenters() { throw null; } @@ -135,7 +104,6 @@ protected CassandraKeyspaceCollection() { } public partial class CassandraKeyspaceData : Azure.ResourceManager.Models.TrackedResourceData { public CassandraKeyspaceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraKeyspacePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraKeyspaceResourceInfo Resource { get { throw null; } set { } } } @@ -156,9 +124,6 @@ protected CassandraKeyspaceResource() { } public virtual Azure.Response GetCassandraTable(string tableName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCassandraTableAsync(string tableName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.CosmosDB.CassandraTableCollection GetCassandraTables() { throw null; } - public virtual Azure.Response GetCassandraViewGetResult(string viewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCassandraViewGetResultAsync(string viewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.CosmosDB.CassandraViewGetResultCollection GetCassandraViewGetResults() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -206,7 +171,6 @@ protected CassandraTableCollection() { } public partial class CassandraTableData : Azure.ResourceManager.Models.TrackedResourceData { public CassandraTableData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraTablePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraTableResourceInfo Resource { get { throw null; } set { } } } @@ -253,71 +217,6 @@ protected CassandraTableThroughputSettingResource() { } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class CassandraViewGetResultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CassandraViewGetResultCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string viewName, Azure.ResourceManager.CosmosDB.Models.CassandraViewGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string viewName, Azure.ResourceManager.CosmosDB.Models.CassandraViewGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string viewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string viewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string viewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string viewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class CassandraViewGetResultData : Azure.ResourceManager.Models.TrackedResourceData - { - public CassandraViewGetResultData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesOptions Options { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesResource Resource { get { throw null; } set { } } - } - public partial class CassandraViewGetResultResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected CassandraViewGetResultResource() { } - public virtual Azure.ResourceManager.CosmosDB.CassandraViewGetResultData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.CosmosDB.CassandraViewThroughputSettingResource GetCassandraViewThroughputSetting() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.CassandraViewGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.CassandraViewGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class CassandraViewThroughputSettingResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected CassandraViewThroughputSettingResource() { } - public virtual Azure.ResourceManager.CosmosDB.ThroughputSettingData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsUpdateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsUpdateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation MigrateCassandraViewToAutoscale(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MigrateCassandraViewToAutoscaleAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation MigrateCassandraViewToManualThroughput(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MigrateCassandraViewToManualThroughputAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class CosmosDBAccountCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected CosmosDBAccountCollection() { } @@ -347,14 +246,12 @@ public CosmosDBAccountData(Azure.Core.AzureLocation location) : base (default(Az public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType? DatabaseAccountOfferType { get { throw null; } } public string DefaultIdentity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.EnableFullTextQuery? DiagnosticLogEnableFullTextQuery { get { throw null; } set { } } public bool? DisableKeyBasedMetadataWriteAccess { get { throw null; } set { } } public bool? DisableLocalAuth { get { throw null; } set { } } public string DocumentEndpoint { get { throw null; } } public bool? EnableAutomaticFailover { get { throw null; } set { } } public bool? EnableBurstCapacity { get { throw null; } set { } } public bool? EnableCassandraConnector { get { throw null; } set { } } - public bool? EnableMaterializedViews { get { throw null; } set { } } public bool? EnableMultipleWriteLocations { get { throw null; } set { } } public bool? EnablePartitionMerge { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList FailoverPolicies { get { throw null; } } @@ -420,12 +317,6 @@ protected CosmosDBAccountResource() { } public virtual Azure.Response GetCosmosDBTable(string tableName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCosmosDBTableAsync(string tableName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.CosmosDB.CosmosDBTableCollection GetCosmosDBTables() { throw null; } - public virtual Azure.Response GetDataTransferJobGetResult(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDataTransferJobGetResultAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.CosmosDB.DataTransferJobGetResultCollection GetDataTransferJobGetResults() { throw null; } - public virtual Azure.Response GetGraphResourceGetResult(string graphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetGraphResourceGetResultAsync(string graphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.CosmosDB.GraphResourceGetResultCollection GetGraphResourceGetResults() { throw null; } public virtual Azure.Response GetGremlinDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetGremlinDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.CosmosDB.GremlinDatabaseCollection GetGremlinDatabases() { throw null; } @@ -499,7 +390,6 @@ public static partial class CosmosDBExtensions public static System.Threading.Tasks.Task> CheckNameExistsDatabaseAccountAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetCassandraCluster(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetCassandraClusterAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.CosmosDB.CassandraClusterBackupResource GetCassandraClusterBackupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.CassandraClusterResource GetCassandraClusterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.CassandraClusterCollection GetCassandraClusters(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetCassandraClusters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -509,15 +399,12 @@ public static partial class CosmosDBExtensions public static Azure.ResourceManager.CosmosDB.CassandraKeyspaceThroughputSettingResource GetCassandraKeyspaceThroughputSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.CassandraTableResource GetCassandraTableResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.CassandraTableThroughputSettingResource GetCassandraTableThroughputSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.CosmosDB.CassandraViewGetResultResource GetCassandraViewGetResultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.CosmosDB.CassandraViewThroughputSettingResource GetCassandraViewThroughputSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetCosmosDBAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetCosmosDBAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBAccountResource GetCosmosDBAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBAccountCollection GetCosmosDBAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetCosmosDBAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetCosmosDBAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleResource GetCosmosDBFirewallRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetCosmosDBLocation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetCosmosDBLocationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBLocationResource GetCosmosDBLocationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -537,18 +424,10 @@ public static partial class CosmosDBExtensions public static Azure.ResourceManager.CosmosDB.CosmosDBSqlUserDefinedFunctionResource GetCosmosDBSqlUserDefinedFunctionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBTableResource GetCosmosDBTableResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosTableThroughputSettingResource GetCosmosTableThroughputSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.CosmosDB.DataTransferJobGetResultResource GetDataTransferJobGetResultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.CosmosDB.GraphResourceGetResultResource GetGraphResourceGetResultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.GremlinDatabaseResource GetGremlinDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.GremlinDatabaseThroughputSettingResource GetGremlinDatabaseThroughputSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.GremlinGraphResource GetGremlinGraphResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.GremlinGraphThroughputSettingResource GetGremlinGraphThroughputSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetMongoCluster(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string mongoClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetMongoClusterAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string mongoClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.CosmosDB.MongoClusterResource GetMongoClusterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.CosmosDB.MongoClusterCollection GetMongoClusters(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetMongoClusters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetMongoClustersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.CosmosDB.MongoDBCollectionResource GetMongoDBCollectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.MongoDBCollectionThroughputSettingResource GetMongoDBCollectionThroughputSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.CosmosDB.MongoDBDatabaseResource GetMongoDBDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -559,42 +438,6 @@ public static partial class CosmosDBExtensions public static Azure.Pageable GetRestorableCosmosDBAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetRestorableCosmosDBAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class CosmosDBFirewallRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CosmosDBFirewallRuleCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string firewallRuleName, Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string firewallRuleName, Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class CosmosDBFirewallRuleData : Azure.ResourceManager.Models.ResourceData - { - public CosmosDBFirewallRuleData(string startIPAddress, string endIPAddress) { } - public string EndIPAddress { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState? ProvisioningState { get { throw null; } } - public string StartIPAddress { get { throw null; } set { } } - } - public partial class CosmosDBFirewallRuleResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected CosmosDBFirewallRuleResource() { } - public virtual Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class CosmosDBLocationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected CosmosDBLocationCollection() { } @@ -619,8 +462,6 @@ public partial class CosmosDBLocationResource : Azure.ResourceManager.ArmResourc protected CosmosDBLocationResource() { } public virtual Azure.ResourceManager.CosmosDB.CosmosDBLocationData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response CheckMongoClusterNameAailability(Azure.ResourceManager.CosmosDB.Models.CheckCosmosDBNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CheckMongoClusterNameAailabilityAsync(Azure.ResourceManager.CosmosDB.Models.CheckCosmosDBNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -779,7 +620,6 @@ protected CosmosDBSqlContainerCollection() { } public partial class CosmosDBSqlContainerData : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlContainerData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerPropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlContainerResourceInfo Resource { get { throw null; } set { } } } @@ -806,8 +646,6 @@ protected CosmosDBSqlContainerResource() { } public virtual Azure.Response GetCosmosDBSqlUserDefinedFunction(string userDefinedFunctionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCosmosDBSqlUserDefinedFunctionAsync(string userDefinedFunctionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.CosmosDB.CosmosDBSqlUserDefinedFunctionCollection GetCosmosDBSqlUserDefinedFunctions() { throw null; } - public virtual Azure.ResourceManager.ArmOperation GetSqlContainerPartitionMerge(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSqlContainerPartitionMergeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation RetrieveContinuousBackupInformation(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.ContinuousBackupRestoreLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -838,10 +676,6 @@ protected CosmosDBSqlContainerThroughputSettingResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SqlContainerRedistributeThroughput(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SqlContainerRedistributeThroughputAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SqlContainerRetrieveThroughputDistribution(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SqlContainerRetrieveThroughputDistributionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class CosmosDBSqlDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -861,7 +695,6 @@ protected CosmosDBSqlDatabaseCollection() { } public partial class CosmosDBSqlDatabaseData : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabasePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlDatabaseResourceInfo Resource { get { throw null; } set { } } } @@ -889,8 +722,6 @@ protected CosmosDBSqlDatabaseResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SqlDatabasePartitionMerge(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SqlDatabasePartitionMergeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -915,10 +746,6 @@ protected CosmosDBSqlDatabaseThroughputSettingResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SqlDatabaseRedistributeThroughput(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SqlDatabaseRedistributeThroughputAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SqlDatabaseRetrieveThroughputDistribution(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SqlDatabaseRetrieveThroughputDistributionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class CosmosDBSqlRoleAssignmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -1011,7 +838,6 @@ protected CosmosDBSqlStoredProcedureCollection() { } public partial class CosmosDBSqlStoredProcedureData : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlStoredProcedureData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlStoredProcedureResourceInfo Resource { get { throw null; } set { } } } public partial class CosmosDBSqlStoredProcedureResource : Azure.ResourceManager.ArmResource @@ -1052,7 +878,6 @@ protected CosmosDBSqlTriggerCollection() { } public partial class CosmosDBSqlTriggerData : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlTriggerData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlTriggerResourceInfo Resource { get { throw null; } set { } } } public partial class CosmosDBSqlTriggerResource : Azure.ResourceManager.ArmResource @@ -1093,7 +918,6 @@ protected CosmosDBSqlUserDefinedFunctionCollection() { } public partial class CosmosDBSqlUserDefinedFunctionData : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlUserDefinedFunctionData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo Resource { get { throw null; } set { } } } public partial class CosmosDBSqlUserDefinedFunctionResource : Azure.ResourceManager.ArmResource @@ -1134,7 +958,6 @@ protected CosmosDBTableCollection() { } public partial class CosmosDBTableData : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBTableData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesOptions Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesResource Resource { get { throw null; } set { } } } @@ -1183,94 +1006,6 @@ protected CosmosTableThroughputSettingResource() { } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class DataTransferJobGetResultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DataTransferJobGetResultCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string jobName, Azure.ResourceManager.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string jobName, Azure.ResourceManager.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DataTransferJobGetResultData : Azure.ResourceManager.Models.ResourceData - { - public DataTransferJobGetResultData() { } - public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Destination { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ErrorResponse Error { get { throw null; } } - public string JobName { get { throw null; } } - public System.DateTimeOffset? LastUpdatedUtcOn { get { throw null; } } - public long? ProcessedCount { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Source { get { throw null; } set { } } - public string Status { get { throw null; } } - public long? TotalCount { get { throw null; } } - public int? WorkerCount { get { throw null; } set { } } - } - public partial class DataTransferJobGetResultResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected DataTransferJobGetResultResource() { } - public virtual Azure.ResourceManager.CosmosDB.DataTransferJobGetResultData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string jobName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Pause(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PauseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Resume(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ResumeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class GraphResourceGetResultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected GraphResourceGetResultCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string graphName, Azure.ResourceManager.CosmosDB.Models.GraphResourceGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string graphName, Azure.ResourceManager.CosmosDB.Models.GraphResourceGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string graphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string graphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string graphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string graphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class GraphResourceGetResultData : Azure.ResourceManager.Models.TrackedResourceData - { - public GraphResourceGetResultData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.GraphResourceGetPropertiesOptions Options { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } - } - public partial class GraphResourceGetResultResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected GraphResourceGetResultResource() { } - public virtual Azure.ResourceManager.CosmosDB.GraphResourceGetResultData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string graphName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.GraphResourceGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.GraphResourceGetResultCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class GremlinDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected GremlinDatabaseCollection() { } @@ -1289,7 +1024,6 @@ protected GremlinDatabaseCollection() { } public partial class GremlinDatabaseData : Azure.ResourceManager.Models.TrackedResourceData { public GremlinDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GremlinDatabasePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinDatabaseResourceInfo Resource { get { throw null; } set { } } } @@ -1357,7 +1091,6 @@ protected GremlinGraphCollection() { } public partial class GremlinGraphData : Azure.ResourceManager.Models.TrackedResourceData { public GremlinGraphData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GremlinGraphPropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinGraphResourceInfo Resource { get { throw null; } set { } } } @@ -1406,60 +1139,6 @@ protected GremlinGraphThroughputSettingResource() { } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MongoClusterCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected MongoClusterCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string mongoClusterName, Azure.ResourceManager.CosmosDB.MongoClusterData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string mongoClusterName, Azure.ResourceManager.CosmosDB.MongoClusterData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string mongoClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string mongoClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string mongoClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string mongoClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class MongoClusterData : Azure.ResourceManager.Models.TrackedResourceData - { - public MongoClusterData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public string AdministratorLogin { get { throw null; } set { } } - public string AdministratorLoginPassword { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus? ClusterStatus { get { throw null; } } - public string ConnectionString { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } - public string EarliestRestoreTime { get { throw null; } } - public System.Collections.Generic.IList NodeGroupSpecs { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.MongoClusterRestoreParameters RestoreParameters { get { throw null; } set { } } - public string ServerVersion { get { throw null; } set { } } - } - public partial class MongoClusterResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected MongoClusterResource() { } - public virtual Azure.ResourceManager.CosmosDB.MongoClusterData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mongoClusterName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetConnectionStrings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetConnectionStringsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetCosmosDBFirewallRule(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCosmosDBFirewallRuleAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleCollection GetCosmosDBFirewallRules() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MongoClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MongoClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class MongoDBCollectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected MongoDBCollectionCollection() { } @@ -1478,7 +1157,6 @@ protected MongoDBCollectionCollection() { } public partial class MongoDBCollectionData : Azure.ResourceManager.Models.TrackedResourceData { public MongoDBCollectionData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionPropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBCollectionResourceInfo Resource { get { throw null; } set { } } } @@ -1495,8 +1173,6 @@ protected MongoDBCollectionResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation GetMongoDBCollectionPartitionMerge(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetMongoDBCollectionPartitionMergeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.CosmosDB.MongoDBCollectionThroughputSettingResource GetMongoDBCollectionThroughputSetting() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1524,10 +1200,6 @@ protected MongoDBCollectionThroughputSettingResource() { } public virtual System.Threading.Tasks.Task> MigrateMongoDBCollectionToAutoscaleAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrateMongoDBCollectionToManualThroughput(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MigrateMongoDBCollectionToManualThroughputAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation MongoDBContainerRedistributeThroughput(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MongoDBContainerRedistributeThroughputAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation MongoDBContainerRetrieveThroughputDistribution(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MongoDBContainerRetrieveThroughputDistributionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1551,7 +1223,6 @@ protected MongoDBDatabaseCollection() { } public partial class MongoDBDatabaseData : Azure.ResourceManager.Models.TrackedResourceData { public MongoDBDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.MongoDBDatabasePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBDatabaseResourceInfo Resource { get { throw null; } set { } } } @@ -1572,8 +1243,6 @@ protected MongoDBDatabaseResource() { } public virtual System.Threading.Tasks.Task> GetMongoDBCollectionAsync(string collectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.CosmosDB.MongoDBCollectionCollection GetMongoDBCollections() { throw null; } public virtual Azure.ResourceManager.CosmosDB.MongoDBDatabaseThroughputSettingResource GetMongoDBDatabaseThroughputSetting() { throw null; } - public virtual Azure.ResourceManager.ArmOperation MongoDBDatabasePartitionMerge(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MongoDBDatabasePartitionMergeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.MergeParameters mergeParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1598,10 +1267,6 @@ protected MongoDBDatabaseThroughputSettingResource() { } public virtual System.Threading.Tasks.Task> MigrateMongoDBDatabaseToAutoscaleAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrateMongoDBDatabaseToManualThroughput(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MigrateMongoDBDatabaseToManualThroughputAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation MongoDBDatabaseRedistributeThroughput(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MongoDBDatabaseRedistributeThroughputAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters redistributeThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation MongoDBDatabaseRetrieveThroughputDistribution(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MongoDBDatabaseRetrieveThroughputDistributionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters retrieveThroughputParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1757,7 +1422,6 @@ protected RestorableCosmosDBAccountResource() { } public partial class ThroughputSettingData : Azure.ResourceManager.Models.TrackedResourceData { public ThroughputSettingData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedThroughputSettingsResourceInfo Resource { get { throw null; } set { } } } } @@ -1784,7 +1448,6 @@ namespace Azure.ResourceManager.CosmosDB.Models public static partial class ArmCosmosDBModelFactory { public static Azure.ResourceManager.CosmosDB.Models.AutoscaleSettingsResourceInfo AutoscaleSettingsResourceInfo(int maxThroughput = 0, Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyResourceInfo autoUpgradeThroughputPolicy = null, int? targetMaxThroughput = default(int?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.CassandraClusterBackupResourceData CassandraClusterBackupResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? backupResourceTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.CosmosDB.CassandraClusterData CassandraClusterData(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.CassandraClusterProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CassandraClusterDataCenterNodeItem CassandraClusterDataCenterNodeItem(string address = null, Azure.ResourceManager.CosmosDB.Models.CassandraNodeState? state = default(Azure.ResourceManager.CosmosDB.Models.CassandraNodeState?), string status = null, string cassandraProcessStatus = null, string load = null, System.Collections.Generic.IEnumerable tokens = null, int? size = default(int?), System.Guid? hostId = default(System.Guid?), string rack = null, string timestamp = null, long? diskUsedKB = default(long?), long? diskFreeKB = default(long?), long? memoryUsedKB = default(long?), long? memoryBuffersAndCachedKB = default(long?), long? memoryFreeKB = default(long?), long? memoryTotalKB = default(long?), double? cpuUsage = default(double?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CassandraClusterProperties CassandraClusterProperties(Azure.ResourceManager.CosmosDB.Models.CassandraProvisioningState? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CassandraProvisioningState?), string restoreFromBackupId = null, Azure.Core.ResourceIdentifier delegatedManagementSubnetId = null, string cassandraVersion = null, string clusterNameOverride = null, Azure.ResourceManager.CosmosDB.Models.CassandraAuthenticationMethod? authenticationMethod = default(Azure.ResourceManager.CosmosDB.Models.CassandraAuthenticationMethod?), string initialCassandraAdminPassword = null, string prometheusEndpointIPAddress = null, bool? isRepairEnabled = default(bool?), System.Collections.Generic.IEnumerable clientCertificates = null, System.Collections.Generic.IEnumerable externalGossipCertificates = null, System.Collections.Generic.IEnumerable gossipCertificates = null, System.Collections.Generic.IEnumerable externalSeedNodes = null, System.Collections.Generic.IEnumerable seedNodes = null, int? hoursBetweenBackups = default(int?), bool? isDeallocated = default(bool?), bool? isCassandraAuditLoggingEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.CassandraError provisionError = null) { throw null; } @@ -1794,28 +1457,22 @@ public static partial class ArmCosmosDBModelFactory public static Azure.ResourceManager.CosmosDB.Models.CassandraConnectionError CassandraConnectionError(Azure.ResourceManager.CosmosDB.Models.CassandraConnectionState? connectionState = default(Azure.ResourceManager.CosmosDB.Models.CassandraConnectionState?), string ipFrom = null, string ipTo = null, int? port = default(int?), string exception = null) { throw null; } public static Azure.ResourceManager.CosmosDB.CassandraDataCenterData CassandraDataCenterData(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.CassandraDataCenterProperties properties = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CassandraDataCenterProperties CassandraDataCenterProperties(Azure.ResourceManager.CosmosDB.Models.CassandraProvisioningState? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CassandraProvisioningState?), Azure.Core.AzureLocation? dataCenterLocation = default(Azure.Core.AzureLocation?), Azure.Core.ResourceIdentifier delegatedSubnetId = null, int? nodeCount = default(int?), System.Collections.Generic.IEnumerable seedNodes = null, string base64EncodedCassandraYamlFragment = null, System.Uri managedDiskCustomerKeyUri = null, System.Uri backupStorageCustomerKeyUri = null, string sku = null, string diskSku = null, int? diskCapacity = default(int?), bool? doesSupportAvailabilityZone = default(bool?), Azure.ResourceManager.CosmosDB.Models.AuthenticationMethodLdapProperties authenticationMethodLdapProperties = null, bool? deallocated = default(bool?), Azure.ResourceManager.CosmosDB.Models.CassandraError provisionError = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CassandraKeyspaceCreateOrUpdateContent CassandraKeyspaceCreateOrUpdateContent(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), string resourceKeyspaceName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CassandraKeyspaceData CassandraKeyspaceData(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.ExtendedCassandraKeyspaceResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CassandraKeyspacePropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CassandraKeyspaceCreateOrUpdateContent CassandraKeyspaceCreateOrUpdateContent(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), string resourceKeyspaceName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CassandraKeyspaceData CassandraKeyspaceData(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.ExtendedCassandraKeyspaceResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CassandraKeyspacePropertiesConfig options = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CassandraReaperStatus CassandraReaperStatus(bool? isHealthy = default(bool?), System.Collections.Generic.IReadOnlyDictionary repairRunIds = null, System.Collections.Generic.IReadOnlyDictionary repairSchedules = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CassandraTableCreateOrUpdateContent CassandraTableCreateOrUpdateContent(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.CassandraTableResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CassandraTableData CassandraTableData(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.ExtendedCassandraTableResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CassandraTablePropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesResource CassandraViewGetPropertiesResource(string id = null, string viewDefinition = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CassandraViewGetResultCreateOrUpdateContent CassandraViewGetResultCreateOrUpdateContent(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.CassandraViewResource resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CassandraViewGetResultData CassandraViewGetResultData(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.CassandraViewGetPropertiesResource resource = null, Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesOptions options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CheckCosmosDBNameAvailabilityResponse CheckCosmosDBNameAvailabilityResponse(bool? nameAvailable = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason? reason = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CassandraTableCreateOrUpdateContent CassandraTableCreateOrUpdateContent(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.CassandraTableResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CassandraTableData CassandraTableData(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.ExtendedCassandraTableResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CassandraTablePropertiesConfig options = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountConnectionString CosmosDBAccountConnectionString(string connectionString = null, string description = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBKind? keyKind = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBKind?), Azure.ResourceManager.CosmosDB.Models.CosmosDBType? keyType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBType?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateOrUpdateContent CosmosDBAccountCreateOrUpdateContent(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.CosmosDBAccountKind? kind = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKind?), Azure.ResourceManager.CosmosDB.Models.ConsistencyPolicy consistencyPolicy = null, System.Collections.Generic.IEnumerable locations = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType databaseAccountOfferType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType), System.Collections.Generic.IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), Azure.ResourceManager.CosmosDB.Models.ConnectorOffer? connectorOffer = default(Azure.ResourceManager.CosmosDB.Models.ConnectorOffer?), bool? disableKeyBasedMetadataWriteAccess = default(bool?), System.Uri keyVaultKeyUri = null, string defaultIdentity = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess?), bool? isFreeTierEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion? apiServerVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion?), bool? isAnalyticalStorageEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType? analyticalStorageSchemaType = default(Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountBackupPolicy backupPolicy = null, System.Collections.Generic.IEnumerable cors = null, Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass? networkAclBypass = default(Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass?), System.Collections.Generic.IEnumerable networkAclBypassResourceIds = null, Azure.ResourceManager.CosmosDB.Models.EnableFullTextQuery? diagnosticLogEnableFullTextQuery = default(Azure.ResourceManager.CosmosDB.Models.EnableFullTextQuery?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreParameters restoreParameters = null, int? capacityTotalThroughputLimit = default(int?), bool? enableMaterializedViews = default(bool?), Azure.ResourceManager.CosmosDB.Models.DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = default(bool?), bool? enableBurstCapacity = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion? minimalTlsVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBAccountData CosmosDBAccountData(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.CosmosDBAccountKind? kind = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKind?), string provisioningState = null, string documentEndpoint = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType? databaseAccountOfferType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType?), System.Collections.Generic.IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), Azure.ResourceManager.CosmosDB.Models.ConsistencyPolicy consistencyPolicy = null, System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable writeLocations = null, System.Collections.Generic.IEnumerable readLocations = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable failoverPolicies = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), Azure.ResourceManager.CosmosDB.Models.ConnectorOffer? connectorOffer = default(Azure.ResourceManager.CosmosDB.Models.ConnectorOffer?), bool? disableKeyBasedMetadataWriteAccess = default(bool?), System.Uri keyVaultKeyUri = null, string defaultIdentity = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess?), bool? isFreeTierEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion? apiServerVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion?), bool? isAnalyticalStorageEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType? analyticalStorageSchemaType = default(Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType?), System.Guid? instanceId = default(System.Guid?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountBackupPolicy backupPolicy = null, System.Collections.Generic.IEnumerable cors = null, Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass? networkAclBypass = default(Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass?), System.Collections.Generic.IEnumerable networkAclBypassResourceIds = null, Azure.ResourceManager.CosmosDB.Models.EnableFullTextQuery? diagnosticLogEnableFullTextQuery = default(Azure.ResourceManager.CosmosDB.Models.EnableFullTextQuery?), bool? disableLocalAuth = default(bool?), int? capacityTotalThroughputLimit = default(int?), bool? enableMaterializedViews = default(bool?), Azure.ResourceManager.CosmosDB.Models.DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = default(bool?), bool? enableBurstCapacity = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion? minimalTlsVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateOrUpdateContent CosmosDBAccountCreateOrUpdateContent(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.CosmosDBAccountKind? kind = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKind?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.CosmosDB.Models.ConsistencyPolicy consistencyPolicy = null, System.Collections.Generic.IEnumerable locations = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType databaseAccountOfferType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType), System.Collections.Generic.IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), Azure.ResourceManager.CosmosDB.Models.ConnectorOffer? connectorOffer = default(Azure.ResourceManager.CosmosDB.Models.ConnectorOffer?), bool? disableKeyBasedMetadataWriteAccess = default(bool?), System.Uri keyVaultKeyUri = null, string defaultIdentity = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess?), bool? isFreeTierEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion? apiServerVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion?), bool? isAnalyticalStorageEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType? analyticalStorageSchemaType = default(Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountBackupPolicy backupPolicy = null, System.Collections.Generic.IEnumerable cors = null, Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass? networkAclBypass = default(Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass?), System.Collections.Generic.IEnumerable networkAclBypassResourceIds = null, bool? disableLocalAuth = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreParameters restoreParameters = null, int? capacityTotalThroughputLimit = default(int?), Azure.ResourceManager.CosmosDB.Models.DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion? minimalTlsVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion?), bool? enableBurstCapacity = default(bool?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.CosmosDBAccountData CosmosDBAccountData(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.CosmosDBAccountKind? kind = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKind?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, string documentEndpoint = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType? databaseAccountOfferType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType?), System.Collections.Generic.IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), Azure.ResourceManager.CosmosDB.Models.ConsistencyPolicy consistencyPolicy = null, System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable writeLocations = null, System.Collections.Generic.IEnumerable readLocations = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable failoverPolicies = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), Azure.ResourceManager.CosmosDB.Models.ConnectorOffer? connectorOffer = default(Azure.ResourceManager.CosmosDB.Models.ConnectorOffer?), bool? disableKeyBasedMetadataWriteAccess = default(bool?), System.Uri keyVaultKeyUri = null, string defaultIdentity = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess?), bool? isFreeTierEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion? apiServerVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServerVersion?), bool? isAnalyticalStorageEnabled = default(bool?), Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType? analyticalStorageSchemaType = default(Azure.ResourceManager.CosmosDB.Models.AnalyticalStorageSchemaType?), System.Guid? instanceId = default(System.Guid?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountBackupPolicy backupPolicy = null, System.Collections.Generic.IEnumerable cors = null, Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass? networkAclBypass = default(Azure.ResourceManager.CosmosDB.Models.NetworkAclBypass?), System.Collections.Generic.IEnumerable networkAclBypassResourceIds = null, bool? disableLocalAuth = default(bool?), int? capacityTotalThroughputLimit = default(int?), Azure.ResourceManager.CosmosDB.Models.DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion? minimalTlsVersion = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMinimalTlsVersion?), bool? enableBurstCapacity = default(bool?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKeyList CosmosDBAccountKeyList(string primaryReadonlyMasterKey = null, string secondaryReadonlyMasterKey = null, string primaryMasterKey = null, string secondaryMasterKey = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountLocation CosmosDBAccountLocation(string id = null, Azure.Core.AzureLocation? locationName = default(Azure.Core.AzureLocation?), string documentEndpoint = null, string provisioningState = null, int? failoverPriority = default(int?), bool? isZoneRedundant = default(bool?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountReadOnlyKeyList CosmosDBAccountReadOnlyKeyList(string primaryReadonlyMasterKey = null, string secondaryReadonlyMasterKey = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBBackupInformation CosmosDBBackupInformation(System.DateTimeOffset? continuousBackupInformationLatestRestorableTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseMetric CosmosDBBaseMetric(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string timeGrain = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? unit = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricName name = null, System.Collections.Generic.IEnumerable metricValues = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseUsage CosmosDBBaseUsage(Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? unit = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricName name = null, string quotaPeriod = null, long? limit = default(long?), long? currentValue = default(long?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBConnectionString CosmosDBConnectionString(string connectionString = null, string description = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey CosmosDBContainerPartitionKey(System.Collections.Generic.IEnumerable paths = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBPartitionKind? kind = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBPartitionKind?), int? version = default(int?), bool? isSystemKey = default(bool?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBFailoverPolicy CosmosDBFailoverPolicy(string id = null, Azure.Core.AzureLocation? locationName = default(Azure.Core.AzureLocation?), int? failoverPriority = default(int?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBFirewallRuleData CosmosDBFirewallRuleData(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.CosmosDBProvisioningState? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState?), string startIPAddress = null, string endIPAddress = null) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBLocationData CosmosDBLocationData(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.CosmosDBLocationProperties properties = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBLocationProperties CosmosDBLocationProperties(bool? doesSupportAvailabilityZone = default(bool?), bool? isResidencyRestricted = default(bool?), System.Collections.Generic.IEnumerable backupStorageRedundancies = null, bool? isSubscriptionRegionAccessAllowedForRegular = default(bool?), bool? isSubscriptionRegionAccessAllowedForAz = default(bool?), Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricAvailability CosmosDBMetricAvailability(string timeGrain = null, string retention = null) { throw null; } @@ -1831,39 +1488,35 @@ public static partial class ArmCosmosDBModelFactory public static Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceProperties CosmosDBServiceProperties(System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize? instanceSize = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize?), int? instanceCount = default(int?), string serviceType = "Unknown", Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus?), System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBSqlClientEncryptionKeyData CosmosDBSqlClientEncryptionKeyData(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.CosmosDBSqlClientEncryptionKeyProperties resource = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyProperties CosmosDBSqlClientEncryptionKeyProperties(string id = null, string encryptionAlgorithm = null, byte[] wrappedDataEncryptionKey = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBKeyWrapMetadata keyWrapMetadata = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerCreateOrUpdateContent CosmosDBSqlContainerCreateOrUpdateContent(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.CosmosDBSqlContainerResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBSqlContainerData CosmosDBSqlContainerData(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.ExtendedCosmosDBSqlContainerResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerPropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseCreateOrUpdateContent CosmosDBSqlDatabaseCreateOrUpdateContent(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.CosmosDBSqlDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBSqlDatabaseData CosmosDBSqlDatabaseData(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.ExtendedCosmosDBSqlDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabasePropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerCreateOrUpdateContent CosmosDBSqlContainerCreateOrUpdateContent(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.CosmosDBSqlContainerResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CosmosDBSqlContainerData CosmosDBSqlContainerData(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.ExtendedCosmosDBSqlContainerResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerPropertiesConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseCreateOrUpdateContent CosmosDBSqlDatabaseCreateOrUpdateContent(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), string resourceDatabaseName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CosmosDBSqlDatabaseData CosmosDBSqlDatabaseData(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.ExtendedCosmosDBSqlDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabasePropertiesConfig options = null) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBSqlRoleAssignmentData CosmosDBSqlRoleAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier roleDefinitionId = null, string scope = null, System.Guid? principalId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.CosmosDB.CosmosDBSqlRoleDefinitionData CosmosDBSqlRoleDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string roleName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlRoleDefinitionType? roleDefinitionType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlRoleDefinitionType?), System.Collections.Generic.IEnumerable assignableScopes = null, System.Collections.Generic.IEnumerable permissions = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlStoredProcedureCreateOrUpdateContent CosmosDBSqlStoredProcedureCreateOrUpdateContent(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.CosmosDBSqlStoredProcedureResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBSqlStoredProcedureData CosmosDBSqlStoredProcedureData(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.ExtendedCosmosDBSqlStoredProcedureResourceInfo resource = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerCreateOrUpdateContent CosmosDBSqlTriggerCreateOrUpdateContent(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.CosmosDBSqlTriggerResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBSqlTriggerData CosmosDBSqlTriggerData(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.ExtendedCosmosDBSqlTriggerResourceInfo resource = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(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.CosmosDBSqlUserDefinedFunctionResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBSqlUserDefinedFunctionData CosmosDBSqlUserDefinedFunctionData(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.ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo resource = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBTableCreateOrUpdateContent CosmosDBTableCreateOrUpdateContent(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.CosmosDBTableResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.CosmosDBTableData CosmosDBTableData(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.CosmosDBTablePropertiesResource resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesOptions options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesResource CosmosDBTablePropertiesResource(string tableName = null, Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlStoredProcedureCreateOrUpdateContent CosmosDBSqlStoredProcedureCreateOrUpdateContent(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.CosmosDBSqlStoredProcedureResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CosmosDBSqlStoredProcedureData CosmosDBSqlStoredProcedureData(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.ExtendedCosmosDBSqlStoredProcedureResourceInfo resource = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerCreateOrUpdateContent CosmosDBSqlTriggerCreateOrUpdateContent(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.CosmosDBSqlTriggerResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CosmosDBSqlTriggerData CosmosDBSqlTriggerData(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.ExtendedCosmosDBSqlTriggerResourceInfo resource = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(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.CosmosDBSqlUserDefinedFunctionResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CosmosDBSqlUserDefinedFunctionData CosmosDBSqlUserDefinedFunctionData(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.ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo resource = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBTableCreateOrUpdateContent CosmosDBTableCreateOrUpdateContent(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), string resourceTableName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.CosmosDBTableData CosmosDBTableData(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.CosmosDBTablePropertiesResource resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesOptions options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesResource CosmosDBTablePropertiesResource(string tableName = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { 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.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.ErrorResponse error = null) { 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.ErrorResponse error = null) { 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.ErrorResponse ErrorResponse(string code = null, string message = 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; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraTableResourceInfo ExtendedCassandraTableResourceInfo(string tableName = null, int? defaultTtl = default(int?), Azure.ResourceManager.CosmosDB.Models.CassandraSchema schema = null, int? analyticalStorageTtl = default(int?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlContainerResourceInfo ExtendedCosmosDBSqlContainerResourceInfo(string containerName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy indexingPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = default(int?), System.Collections.Generic.IEnumerable uniqueKeys = null, Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy conflictResolutionPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = default(long?), Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), Azure.ResourceManager.CosmosDB.Models.MaterializedViewDefinition materializedViewDefinition = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlDatabaseResourceInfo ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName = null, Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), string colls = null, string users = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlContainerResourceInfo ExtendedCosmosDBSqlContainerResourceInfo(string containerName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy indexingPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = default(int?), System.Collections.Generic.IEnumerable uniqueKeys = null, Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy conflictResolutionPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = default(long?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlDatabaseResourceInfo ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName = null, string colls = null, string users = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlStoredProcedureResourceInfo ExtendedCosmosDBSqlStoredProcedureResourceInfo(string storedProcedureName = null, string body = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlTriggerResourceInfo ExtendedCosmosDBSqlTriggerResourceInfo(string triggerName = null, string body = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerType? triggerType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerType?), Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerOperation? triggerOperation = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerOperation?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo(string functionName = null, string body = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinDatabaseResourceInfo ExtendedGremlinDatabaseResourceInfo(string databaseName = null, Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinGraphResourceInfo ExtendedGremlinGraphResourceInfo(string graphName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy indexingPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = default(int?), System.Collections.Generic.IEnumerable uniqueKeys = null, Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy conflictResolutionPolicy = null, long? analyticalStorageTtl = default(long?), Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBCollectionResourceInfo ExtendedMongoDBCollectionResourceInfo(string collectionName = null, System.Collections.Generic.IDictionary shardKey = null, System.Collections.Generic.IEnumerable indexes = null, int? analyticalStorageTtl = default(int?), Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBDatabaseResourceInfo ExtendedMongoDBDatabaseResourceInfo(string databaseName = null, Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinDatabaseResourceInfo ExtendedGremlinDatabaseResourceInfo(string databaseName = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinGraphResourceInfo ExtendedGremlinGraphResourceInfo(string graphName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy indexingPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = default(int?), System.Collections.Generic.IEnumerable uniqueKeys = null, Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy conflictResolutionPolicy = null, long? analyticalStorageTtl = default(long?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBCollectionResourceInfo ExtendedMongoDBCollectionResourceInfo(string collectionName = null, System.Collections.Generic.IDictionary shardKey = null, System.Collections.Generic.IEnumerable indexes = null, int? analyticalStorageTtl = default(int?), string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBDatabaseResourceInfo ExtendedMongoDBDatabaseResourceInfo(string databaseName = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableGremlinDatabaseResourceInfo ExtendedRestorableGremlinDatabaseResourceInfo(string rid = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? operationType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType?), string eventTimestamp = null, string databaseName = null, string databaseId = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableGremlinGraphResourceInfo ExtendedRestorableGremlinGraphResourceInfo(string rid = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? operationType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType?), string eventTimestamp = null, string graphName = null, string graphId = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableMongoDBCollectionResourceInfo ExtendedRestorableMongoDBCollectionResourceInfo(string rid = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? operationType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType?), string eventTimestamp = null, string collectionName = null, string collectionId = null) { throw null; } @@ -1871,34 +1524,25 @@ public static partial class ArmCosmosDBModelFactory public static Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableSqlContainerResourceInfo ExtendedRestorableSqlContainerResourceInfo(string rid = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? operationType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType?), string eventTimestamp = null, string containerName = null, string containerId = null, Azure.ResourceManager.CosmosDB.Models.RestorableSqlContainerPropertiesResourceContainer container = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableSqlDatabaseResourceInfo ExtendedRestorableSqlDatabaseResourceInfo(string rid = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? operationType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType?), string eventTimestamp = null, string databaseName = null, string databaseId = null, Azure.ResourceManager.CosmosDB.Models.RestorableSqlDatabasePropertiesResourceDatabase database = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableTableResourceInfo ExtendedRestorableTableResourceInfo(string rid = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? operationType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType?), string eventTimestamp = null, string tableName = null, string tableId = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ExtendedThroughputSettingsResourceInfo ExtendedThroughputSettingsResourceInfo(int? throughput = default(int?), Azure.ResourceManager.CosmosDB.Models.AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ExtendedThroughputSettingsResourceInfo ExtendedThroughputSettingsResourceInfo(int? throughput = default(int?), Azure.ResourceManager.CosmosDB.Models.AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null, string instantMaximumThroughput = null, string softAllowedMaximumThroughput = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.GraphApiComputeRegionalService GraphApiComputeRegionalService(string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus?), string graphApiComputeEndpoint = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.GraphApiComputeServiceProperties GraphApiComputeServiceProperties(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, string graphApiComputeEndpoint = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.GraphResourceGetResultCreateOrUpdateContent GraphResourceGetResultCreateOrUpdateContent(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.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.GraphResourceGetResultData GraphResourceGetResultData(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.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.CosmosDB.Models.GraphResourceGetPropertiesOptions options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseCreateOrUpdateContent GremlinDatabaseCreateOrUpdateContent(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.GremlinDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.GremlinDatabaseData GremlinDatabaseData(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.ExtendedGremlinDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.GremlinDatabasePropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.GremlinGraphCreateOrUpdateContent GremlinGraphCreateOrUpdateContent(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.GremlinGraphResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.GremlinGraphData GremlinGraphData(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.ExtendedGremlinGraphResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.GremlinGraphPropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ListConnectionStringsResult ListConnectionStringsResult(System.Collections.Generic.IEnumerable connectionStrings = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.MaterializedViewDefinition MaterializedViewDefinition(string sourceCollectionRid = null, string sourceCollectionId = null, string definition = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseCreateOrUpdateContent GremlinDatabaseCreateOrUpdateContent(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), string resourceDatabaseName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.GremlinDatabaseData GremlinDatabaseData(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.ExtendedGremlinDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.GremlinDatabasePropertiesConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.GremlinGraphCreateOrUpdateContent GremlinGraphCreateOrUpdateContent(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.GremlinGraphResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.GremlinGraphData GremlinGraphData(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.ExtendedGremlinGraphResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.GremlinGraphPropertiesConfig options = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.MaterializedViewsBuilderRegionalService MaterializedViewsBuilderRegionalService(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.MaterializedViewsBuilderServiceProperties MaterializedViewsBuilderServiceProperties(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.MongoClusterData MongoClusterData(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.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), Azure.ResourceManager.CosmosDB.Models.MongoClusterRestoreParameters restoreParameters = null, string administratorLogin = null, string administratorLoginPassword = null, string serverVersion = null, string connectionString = null, string earliestRestoreTime = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState? provisioningState = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState?), Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus?), System.Collections.Generic.IEnumerable nodeGroupSpecs = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionCreateOrUpdateContent MongoDBCollectionCreateOrUpdateContent(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.MongoDBCollectionResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.MongoDBCollectionData MongoDBCollectionData(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.ExtendedMongoDBCollectionResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionPropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.MongoDBDatabaseCreateOrUpdateContent MongoDBDatabaseCreateOrUpdateContent(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.MongoDBDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.MongoDBDatabaseData MongoDBDatabaseData(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.ExtendedMongoDBDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.MongoDBDatabasePropertiesConfig options = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionCreateOrUpdateContent MongoDBCollectionCreateOrUpdateContent(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.MongoDBCollectionResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.MongoDBCollectionData MongoDBCollectionData(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.ExtendedMongoDBCollectionResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionPropertiesConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.MongoDBDatabaseCreateOrUpdateContent MongoDBDatabaseCreateOrUpdateContent(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), string resourceDatabaseName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig options = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.MongoDBDatabaseData MongoDBDatabaseData(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.ExtendedMongoDBDatabaseResourceInfo resource = null, Azure.ResourceManager.CosmosDB.Models.MongoDBDatabasePropertiesConfig options = null) { throw null; } public static Azure.ResourceManager.CosmosDB.MongoDBRoleDefinitionData MongoDBRoleDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string roleName = null, Azure.ResourceManager.CosmosDB.Models.MongoDBRoleDefinitionType? roleDefinitionType = default(Azure.ResourceManager.CosmosDB.Models.MongoDBRoleDefinitionType?), string databaseName = null, System.Collections.Generic.IEnumerable privileges = null, System.Collections.Generic.IEnumerable roles = null) { throw null; } public static Azure.ResourceManager.CosmosDB.MongoDBUserDefinitionData MongoDBUserDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string userName = null, string password = null, string databaseName = null, string customData = null, System.Collections.Generic.IEnumerable roles = null, string mechanisms = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.PartitionMetric PartitionMetric(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string timeGrain = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? unit = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricName name = null, System.Collections.Generic.IEnumerable metricValues = null, System.Guid? partitionId = default(System.Guid?), string partitionKeyRangeId = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.PartitionUsage PartitionUsage(Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? unit = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType?), Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricName name = null, string quotaPeriod = null, long? limit = default(long?), long? currentValue = default(long?), System.Guid? partitionId = default(System.Guid?), string partitionKeyRangeId = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.PercentileMetricValue PercentileMetricValue(int? count = default(int?), double? average = default(double?), double? maximum = default(double?), double? minimum = default(double?), System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), double? total = default(double?), double? p10 = default(double?), double? p25 = default(double?), double? p50 = default(double?), double? p75 = default(double?), double? p90 = default(double?), double? p95 = default(double?), double? p99 = default(double?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.PhysicalPartitionStorageInfo PhysicalPartitionStorageInfo(string id = null, double? storageInKB = default(double?)) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.PhysicalPartitionStorageInfoCollection PhysicalPartitionStorageInfoCollection(System.Collections.Generic.IEnumerable physicalPartitionStorageInfoCollectionValue = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.PhysicalPartitionThroughputInfoResult PhysicalPartitionThroughputInfoResult(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), System.Collections.Generic.IEnumerable resourcePhysicalPartitionThroughputInfo = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters RedistributeThroughputParameters(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.RedistributeThroughputPropertiesResource resource = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.RestorableCosmosDBAccountData RestorableCosmosDBAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string accountName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? oldestRestorableOn = default(System.DateTimeOffset?), System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), Azure.ResourceManager.CosmosDB.Models.CosmosDBApiType? apiType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBApiType?), System.Collections.Generic.IEnumerable restorableLocations = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.RestorableCosmosDBAccountData RestorableCosmosDBAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string accountName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), System.DateTimeOffset? oldestRestorableOn = default(System.DateTimeOffset?), Azure.ResourceManager.CosmosDB.Models.CosmosDBApiType? apiType = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBApiType?), System.Collections.Generic.IEnumerable restorableLocations = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableGremlinDatabase RestorableGremlinDatabase(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.ExtendedRestorableGremlinDatabaseResourceInfo resource = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableGremlinGraph RestorableGremlinGraph(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.ExtendedRestorableGremlinGraphResourceInfo resource = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableGremlinResourceData RestorableGremlinResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, System.Collections.Generic.IEnumerable graphNames = null) { throw null; } @@ -1907,18 +1551,17 @@ public static partial class ArmCosmosDBModelFactory public static Azure.ResourceManager.CosmosDB.Models.RestorableMongoDBDatabase RestorableMongoDBDatabase(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.ExtendedRestorableMongoDBDatabaseResourceInfo resource = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableMongoDBResourceData RestorableMongoDBResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, System.Collections.Generic.IEnumerable collectionNames = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableSqlContainer RestorableSqlContainer(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.ExtendedRestorableSqlContainerResourceInfo resource = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.RestorableSqlContainerPropertiesResourceContainer RestorableSqlContainerPropertiesResourceContainer(string containerName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy indexingPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = default(int?), System.Collections.Generic.IEnumerable uniqueKeys = null, Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy conflictResolutionPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = default(long?), Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), Azure.ResourceManager.CosmosDB.Models.MaterializedViewDefinition materializedViewDefinition = null, string self = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.RestorableSqlContainerPropertiesResourceContainer RestorableSqlContainerPropertiesResourceContainer(string containerName = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy indexingPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = default(int?), System.Collections.Generic.IEnumerable uniqueKeys = null, Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy conflictResolutionPolicy = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = default(long?), string self = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableSqlDatabase RestorableSqlDatabase(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.ExtendedRestorableSqlDatabaseResourceInfo resource = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.RestorableSqlDatabasePropertiesResourceDatabase RestorableSqlDatabasePropertiesResourceDatabase(string databaseName = null, Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters restoreParameters = null, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? createMode = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode?), string colls = null, string users = null, string self = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.RestorableSqlDatabasePropertiesResourceDatabase RestorableSqlDatabasePropertiesResourceDatabase(string databaseName = null, string colls = null, string users = null, string self = null, string rid = null, float? timestamp = default(float?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableSqlResourceData RestorableSqlResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, System.Collections.Generic.IEnumerable collectionNames = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableTable RestorableTable(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.ExtendedRestorableTableResourceInfo resource = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.RestorableTableResourceData RestorableTableResourceData(string id = null, string name = null, string resourceType = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters RetrieveThroughputParameters(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), System.Collections.Generic.IEnumerable resourcePhysicalPartitionIds = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.SqlDedicatedGatewayRegionalService SqlDedicatedGatewayRegionalService(string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? status = default(Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus?), string sqlDedicatedGatewayEndpoint = null) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.SqlDedicatedGatewayServiceProperties SqlDedicatedGatewayServiceProperties(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, string sqlDedicatedGatewayEndpoint = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.ThroughputSettingData ThroughputSettingData(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.ExtendedThroughputSettingsResourceInfo resource = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsResourceInfo ThroughputSettingsResourceInfo(int? throughput = default(int?), Azure.ResourceManager.CosmosDB.Models.AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsUpdateData ThroughputSettingsUpdateData(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.ThroughputSettingsResourceInfo resource = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.ThroughputSettingData ThroughputSettingData(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.ExtendedThroughputSettingsResourceInfo resource = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsResourceInfo ThroughputSettingsResourceInfo(int? throughput = default(int?), Azure.ResourceManager.CosmosDB.Models.AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null, string instantMaximumThroughput = null, string softAllowedMaximumThroughput = null) { throw null; } + public static Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsUpdateData ThroughputSettingsUpdateData(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.ThroughputSettingsResourceInfo resource = null) { throw null; } } public partial class AuthenticationMethodLdapProperties { @@ -1939,12 +1582,6 @@ public AutoscaleSettingsResourceInfo(int maxThroughput) { } public int MaxThroughput { get { throw null; } set { } } public int? TargetMaxThroughput { get { throw null; } } } - public partial class AzureBlobDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink - { - public AzureBlobDataTransferDataSourceSink(string containerName) { } - public string ContainerName { get { throw null; } set { } } - public System.Uri EndpointUri { get { throw null; } set { } } - } public partial class BackupPolicyMigrationState { public BackupPolicyMigrationState() { } @@ -2165,7 +1802,6 @@ public CassandraError() { } public partial class CassandraKeyspaceCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CassandraKeyspaceCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CassandraKeyspaceResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public string ResourceKeyspaceName { get { throw null; } set { } } } @@ -2243,7 +1879,6 @@ public CassandraSchema() { } public partial class CassandraTableCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CassandraTableCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CassandraTableResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraTableResourceInfo Resource { get { throw null; } set { } } } @@ -2259,43 +1894,6 @@ public CassandraTableResourceInfo(string tableName) { } public Azure.ResourceManager.CosmosDB.Models.CassandraSchema Schema { get { throw null; } set { } } public string TableName { get { throw null; } set { } } } - public partial class CassandraViewGetPropertiesOptions : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig - { - public CassandraViewGetPropertiesOptions() { } - } - public partial class CassandraViewGetPropertiesResource : Azure.ResourceManager.CosmosDB.Models.CassandraViewResource - { - public CassandraViewGetPropertiesResource(string id, string viewDefinition) : base (default(string), default(string)) { } - public Azure.ETag? ETag { get { throw null; } } - public string Rid { get { throw null; } } - public float? Timestamp { get { throw null; } } - } - public partial class CassandraViewGetResultCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData - { - public CassandraViewGetResultCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CassandraViewResource resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CassandraViewResource Resource { get { throw null; } set { } } - } - public partial class CassandraViewResource - { - public CassandraViewResource(string id, string viewDefinition) { } - public string Id { get { throw null; } set { } } - public string ViewDefinition { get { throw null; } set { } } - } - public partial class CheckCosmosDBNameAvailabilityContent - { - public CheckCosmosDBNameAvailabilityContent() { } - public string Name { get { throw null; } set { } } - public string ResourceType { get { throw null; } set { } } - } - public partial class CheckCosmosDBNameAvailabilityResponse - { - internal CheckCosmosDBNameAvailabilityResponse() { } - public string Message { get { throw null; } } - public bool? NameAvailable { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason? Reason { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CompositePathSortOrder : System.IEquatable { @@ -2391,12 +1989,6 @@ public ContinuousModeBackupPolicy() { } 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 CosmosCassandraDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink - { - public CosmosCassandraDataTransferDataSourceSink(string keyspaceName, string tableName) { } - public string KeyspaceName { get { throw null; } set { } } - public string TableName { get { throw null; } set { } } - } public abstract partial class CosmosDBAccountBackupPolicy { protected CosmosDBAccountBackupPolicy() { } @@ -2431,7 +2023,6 @@ public CosmosDBAccountCorsPolicy(string allowedOrigins) { } private readonly int _dummyPrimitive; public CosmosDBAccountCreateMode(string value) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode Default { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode PointInTimeRestore { get { throw null; } } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode Restore { get { throw null; } } public bool Equals(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -2457,13 +2048,11 @@ public CosmosDBAccountCreateOrUpdateContent(Azure.Core.AzureLocation location, S public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountOfferType DatabaseAccountOfferType { get { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] set { } } public string DefaultIdentity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.EnableFullTextQuery? DiagnosticLogEnableFullTextQuery { get { throw null; } set { } } public bool? DisableKeyBasedMetadataWriteAccess { get { throw null; } set { } } public bool? DisableLocalAuth { get { throw null; } set { } } public bool? EnableAutomaticFailover { get { throw null; } set { } } public bool? EnableBurstCapacity { get { throw null; } set { } } public bool? EnableCassandraConnector { get { throw null; } set { } } - public bool? EnableMaterializedViews { get { throw null; } set { } } public bool? EnableMultipleWriteLocations { get { throw null; } set { } } public bool? EnablePartitionMerge { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } @@ -2566,13 +2155,11 @@ public CosmosDBAccountPatch() { } public Azure.ResourceManager.CosmosDB.Models.ConsistencyPolicy ConsistencyPolicy { get { throw null; } set { } } public System.Collections.Generic.IList Cors { get { throw null; } } public string DefaultIdentity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.EnableFullTextQuery? DiagnosticLogEnableFullTextQuery { get { throw null; } set { } } public bool? DisableKeyBasedMetadataWriteAccess { get { throw null; } set { } } public bool? DisableLocalAuth { get { throw null; } set { } } public bool? EnableAutomaticFailover { get { throw null; } set { } } public bool? EnableBurstCapacity { get { throw null; } set { } } public bool? EnableCassandraConnector { get { throw null; } set { } } - public bool? EnableMaterializedViews { get { throw null; } set { } } public bool? EnableMultipleWriteLocations { get { throw null; } set { } } public bool? EnablePartitionMerge { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } @@ -2619,13 +2206,14 @@ public CosmosDBAccountRegenerateKeyContent(Azure.ResourceManager.CosmosDB.Models public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreMode left, Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreMode right) { throw null; } public override string ToString() { throw null; } } - public partial class CosmosDBAccountRestoreParameters : Azure.ResourceManager.CosmosDB.Models.RestoreParametersBase + public partial class CosmosDBAccountRestoreParameters { public CosmosDBAccountRestoreParameters() { } public System.Collections.Generic.IList DatabasesToRestore { get { throw null; } } public System.Collections.Generic.IList GremlinDatabasesToRestore { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreMode? RestoreMode { get { throw null; } set { } } - public string SourceBackupLocation { get { throw null; } set { } } + public string RestoreSource { get { throw null; } set { } } + public System.DateTimeOffset? RestoreTimestampInUtc { get { throw null; } set { } } public System.Collections.Generic.IList TablesToRestore { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -2719,12 +2307,6 @@ public CosmosDBCompositePath() { } public Azure.ResourceManager.CosmosDB.Models.CompositePathSortOrder? Order { get { throw null; } set { } } public string Path { get { throw null; } set { } } } - public partial class CosmosDBConnectionString - { - internal CosmosDBConnectionString() { } - public string ConnectionString { get { throw null; } } - public string Description { get { throw null; } } - } public partial class CosmosDBContainerPartitionKey { public CosmosDBContainerPartitionKey() { } @@ -2971,24 +2553,6 @@ internal CosmosDBMetricValue() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CosmosDBNameUnavailableReason : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public CosmosDBNameUnavailableReason(string value) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason AlreadyExists { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason Invalid { get { throw null; } } - public bool Equals(Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason left, Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason right) { throw null; } - public static implicit operator Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason left, Azure.ResourceManager.CosmosDB.Models.CosmosDBNameUnavailableReason right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CosmosDBOperationType : System.IEquatable { private readonly object _dummy; @@ -2996,7 +2560,6 @@ internal CosmosDBMetricValue() { } public CosmosDBOperationType(string value) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType Create { get { throw null; } } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType Delete { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType Recreate { get { throw null; } } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType Replace { get { throw null; } } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType SystemOperation { get { throw null; } } public bool Equals(Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType other) { throw null; } @@ -3053,28 +2616,6 @@ public CosmosDBPrivateLinkServiceConnectionStateProperty() { } public string Status { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CosmosDBProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public CosmosDBProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState Dropping { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState InProgress { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState left, Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState left, Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CosmosDBPublicNetworkAccess : System.IEquatable { private readonly object _dummy; @@ -3082,6 +2623,7 @@ public CosmosDBPrivateLinkServiceConnectionStateProperty() { } public CosmosDBPublicNetworkAccess(string value) { throw null; } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess Disabled { get { throw null; } } public static Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess Enabled { get { throw null; } } + public static Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess SecuredByPerimeter { get { throw null; } } public bool Equals(Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -3239,7 +2781,6 @@ public CosmosDBSqlClientEncryptionKeyResourceInfo() { } public partial class CosmosDBSqlContainerCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlContainerCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerResourceInfo Resource { get { throw null; } set { } } } @@ -3254,20 +2795,15 @@ public CosmosDBSqlContainerResourceInfo(string containerName) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBClientEncryptionPolicy ClientEncryptionPolicy { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy ConflictResolutionPolicy { get { throw null; } set { } } public string ContainerName { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public int? DefaultTtl { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy IndexingPolicy { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.MaterializedViewDefinition MaterializedViewDefinition { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey PartitionKey { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IList UniqueKeys { get { throw null; } } } public partial class CosmosDBSqlDatabaseCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseResourceInfo Resource { get { throw null; } set { } } public string ResourceDatabaseName { get { throw null; } set { } } } public partial class CosmosDBSqlDatabasePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig @@ -3277,9 +2813,7 @@ public CosmosDBSqlDatabasePropertiesConfig() { } public partial class CosmosDBSqlDatabaseResourceInfo { public CosmosDBSqlDatabaseResourceInfo(string databaseName) { } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } } public partial class CosmosDBSqlRoleAssignmentCreateOrUpdateContent { @@ -3310,7 +2844,6 @@ public CosmosDBSqlRolePermission() { } public partial class CosmosDBSqlStoredProcedureCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlStoredProcedureCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlStoredProcedureResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlStoredProcedureResourceInfo Resource { get { throw null; } set { } } } @@ -3323,7 +2856,6 @@ public CosmosDBSqlStoredProcedureResourceInfo(string storedProcedureName) { } public partial class CosmosDBSqlTriggerCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlTriggerCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerResourceInfo Resource { get { throw null; } set { } } } @@ -3377,7 +2909,6 @@ public CosmosDBSqlTriggerResourceInfo(string triggerName) { } public partial class CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionResourceInfo Resource { get { throw null; } set { } } } @@ -3411,9 +2942,7 @@ public CosmosDBSqlUserDefinedFunctionResourceInfo(string functionName) { } public partial class CosmosDBTableCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public CosmosDBTableCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.CosmosDBTableResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBTableResourceInfo Resource { get { throw null; } set { } } public string ResourceTableName { get { throw null; } set { } } } public partial class CosmosDBTablePropertiesOptions : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig @@ -3430,8 +2959,6 @@ public CosmosDBTablePropertiesResource(string tableName) : base (default(string) public partial class CosmosDBTableResourceInfo { public CosmosDBTableResourceInfo(string tableName) { } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public string TableName { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -3470,18 +2997,6 @@ public CosmosDBVirtualNetworkRule() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public bool? IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } } - public partial class CosmosMongoDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink - { - public CosmosMongoDataTransferDataSourceSink(string databaseName, string collectionName) { } - public string CollectionName { get { throw null; } set { } } - public string DatabaseName { get { throw null; } set { } } - } - public partial class CosmosSqlDataTransferDataSourceSink : Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink - { - public CosmosSqlDataTransferDataSourceSink(string databaseName, string containerName) { } - public string ContainerName { get { throw null; } set { } } - public string DatabaseName { get { throw null; } set { } } - } public partial class DatabaseAccountKeysMetadata { internal DatabaseAccountKeysMetadata() { } @@ -3496,28 +3011,6 @@ public DatabaseRestoreResourceInfo() { } public System.Collections.Generic.IList CollectionNames { get { throw null; } } public string DatabaseName { get { throw null; } set { } } } - public abstract partial class DataTransferDataSourceSink - { - protected DataTransferDataSourceSink() { } - } - public partial class DataTransferJobGetResultCreateOrUpdateContent : Azure.ResourceManager.Models.ResourceData - { - public DataTransferJobGetResultCreateOrUpdateContent(Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties properties) { } - public Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties Properties { get { throw null; } set { } } - } - public partial class DataTransferJobProperties - { - public DataTransferJobProperties(Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink source, Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink destination) { } - public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Destination { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ErrorResponse Error { get { throw null; } } - public string JobName { get { throw null; } } - public System.DateTimeOffset? LastUpdatedUtcOn { get { throw null; } } - public long? ProcessedCount { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink Source { get { throw null; } set { } } - public string Status { get { throw null; } } - public long? TotalCount { get { throw null; } } - public int? WorkerCount { get { throw null; } set { } } - } public partial class DataTransferRegionalService : Azure.ResourceManager.CosmosDB.Models.CosmosDBRegionalService { internal DataTransferRegionalService() { } @@ -3535,18 +3028,6 @@ public enum DefaultConsistencyLevel Strong = 3, ConsistentPrefix = 4, } - public enum EnableFullTextQuery - { - None = 0, - True = 1, - False = 2, - } - public partial class ErrorResponse - { - internal ErrorResponse() { } - public string Code { get { throw null; } } - public string Message { get { throw null; } } - } public partial class ExtendedCassandraKeyspaceResourceInfo : Azure.ResourceManager.CosmosDB.Models.CassandraKeyspaceResourceInfo { public ExtendedCassandraKeyspaceResourceInfo(string keyspaceName) : base (default(string)) { } @@ -3709,23 +3190,10 @@ public GraphApiComputeServiceProperties() { } public string GraphApiComputeEndpoint { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } } - public partial class GraphResourceGetPropertiesOptions : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig - { - public GraphResourceGetPropertiesOptions() { } - } - public partial class GraphResourceGetResultCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData - { - public GraphResourceGetResultCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.Resources.Models.WritableSubResource resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } - } public partial class GremlinDatabaseCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public GremlinDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseResourceInfo Resource { get { throw null; } set { } } public string ResourceDatabaseName { get { throw null; } set { } } } public partial class GremlinDatabasePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig @@ -3735,9 +3203,7 @@ public GremlinDatabasePropertiesConfig() { } public partial class GremlinDatabaseResourceInfo { public GremlinDatabaseResourceInfo(string databaseName) { } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } } public partial class GremlinDatabaseRestoreResourceInfo { @@ -3748,7 +3214,6 @@ public GremlinDatabaseRestoreResourceInfo() { } public partial class GremlinGraphCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public GremlinGraphCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.GremlinGraphResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GremlinGraphResourceInfo Resource { get { throw null; } set { } } } @@ -3761,26 +3226,12 @@ public partial class GremlinGraphResourceInfo public GremlinGraphResourceInfo(string graphName) { } public long? AnalyticalStorageTtl { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy ConflictResolutionPolicy { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public int? DefaultTtl { get { throw null; } set { } } public string GraphName { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy IndexingPolicy { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey PartitionKey { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IList UniqueKeys { get { throw null; } } } - public partial class ListConnectionStringsResult - { - internal ListConnectionStringsResult() { } - public System.Collections.Generic.IReadOnlyList ConnectionStrings { get { throw null; } } - } - public partial class MaterializedViewDefinition - { - public MaterializedViewDefinition(string sourceCollectionId, string definition) { } - public string Definition { get { throw null; } set { } } - public string SourceCollectionId { get { throw null; } set { } } - public string SourceCollectionRid { get { throw null; } } - } public partial class MaterializedViewsBuilderRegionalService : Azure.ResourceManager.CosmosDB.Models.CosmosDBRegionalService { internal MaterializedViewsBuilderRegionalService() { } @@ -3790,59 +3241,9 @@ public partial class MaterializedViewsBuilderServiceProperties : Azure.ResourceM public MaterializedViewsBuilderServiceProperties() { } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } } - public partial class MergeParameters - { - public MergeParameters() { } - public bool? IsDryRun { get { throw null; } set { } } - } - public partial class MongoClusterPatch - { - public MongoClusterPatch() { } - public string AdministratorLogin { get { throw null; } set { } } - public string AdministratorLoginPassword { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus? ClusterStatus { get { throw null; } } - public string ConnectionString { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } - public string EarliestRestoreTime { get { throw null; } } - public System.Collections.Generic.IList NodeGroupSpecs { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.MongoClusterRestoreParameters RestoreParameters { get { throw null; } set { } } - public string ServerVersion { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - public partial class MongoClusterRestoreParameters - { - public MongoClusterRestoreParameters() { } - public System.DateTimeOffset? PointInTimeUTC { get { throw null; } set { } } - public string SourceResourceId { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MongoClusterStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MongoClusterStatus(string value) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus Dropping { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus Provisioning { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus Ready { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus Starting { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus Stopped { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus Stopping { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus left, Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus left, Azure.ResourceManager.CosmosDB.Models.MongoClusterStatus right) { throw null; } - public override string ToString() { throw null; } - } public partial class MongoDBCollectionCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public MongoDBCollectionCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionResourceInfo Resource { get { throw null; } set { } } } @@ -3855,17 +3256,13 @@ public partial class MongoDBCollectionResourceInfo public MongoDBCollectionResourceInfo(string collectionName) { } public int? AnalyticalStorageTtl { get { throw null; } set { } } public string CollectionName { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public System.Collections.Generic.IList Indexes { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IDictionary ShardKey { get { throw null; } } } public partial class MongoDBDatabaseCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData { public MongoDBDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.MongoDBDatabaseResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.MongoDBDatabaseResourceInfo Resource { get { throw null; } set { } } public string ResourceDatabaseName { get { throw null; } set { } } } public partial class MongoDBDatabasePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig @@ -3875,9 +3272,7 @@ public MongoDBDatabasePropertiesConfig() { } public partial class MongoDBDatabaseResourceInfo { public MongoDBDatabaseResourceInfo(string databaseName) { } - public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } } public partial class MongoDBIndex { @@ -3938,36 +3333,6 @@ public enum NetworkAclBypass None = 0, AzureServices = 1, } - public partial class NodeGroupProperties - { - public NodeGroupProperties() { } - public long? DiskSizeInGB { get { throw null; } set { } } - public bool? EnableHa { get { throw null; } set { } } - public string Sku { get { throw null; } set { } } - } - public partial class NodeGroupSpec : Azure.ResourceManager.CosmosDB.Models.NodeGroupProperties - { - public NodeGroupSpec() { } - public Azure.ResourceManager.CosmosDB.Models.NodeKind? Kind { get { throw null; } set { } } - public int? NodeCount { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NodeKind : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public NodeKind(string value) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.NodeKind Shard { get { throw null; } } - public bool Equals(Azure.ResourceManager.CosmosDB.Models.NodeKind other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.CosmosDB.Models.NodeKind left, Azure.ResourceManager.CosmosDB.Models.NodeKind right) { throw null; } - public static implicit operator Azure.ResourceManager.CosmosDB.Models.NodeKind (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.NodeKind left, Azure.ResourceManager.CosmosDB.Models.NodeKind right) { throw null; } - public override string ToString() { throw null; } - } public partial class PartitionMetric : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseMetric { internal PartitionMetric() { } @@ -4003,51 +3368,11 @@ public PeriodicModeProperties() { } public int? BackupRetentionIntervalInHours { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBBackupStorageRedundancy? BackupStorageRedundancy { get { throw null; } set { } } } - public partial class PhysicalPartitionStorageInfo - { - internal PhysicalPartitionStorageInfo() { } - public string Id { get { throw null; } } - public double? StorageInKB { get { throw null; } } - } - public partial class PhysicalPartitionStorageInfoCollection - { - internal PhysicalPartitionStorageInfoCollection() { } - public System.Collections.Generic.IReadOnlyList PhysicalPartitionStorageInfoCollectionValue { get { throw null; } } - } - public partial class PhysicalPartitionThroughputInfoResource - { - public PhysicalPartitionThroughputInfoResource(string id) { } - public string Id { get { throw null; } set { } } - public double? Throughput { get { throw null; } set { } } - } - public partial class PhysicalPartitionThroughputInfoResult : Azure.ResourceManager.Models.TrackedResourceData - { - public PhysicalPartitionThroughputInfoResult(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public System.Collections.Generic.IList ResourcePhysicalPartitionThroughputInfo { get { throw null; } } - } - public partial class RedistributeThroughputParameters : Azure.ResourceManager.Models.TrackedResourceData - { - public RedistributeThroughputParameters(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputPropertiesResource resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputPropertiesResource Resource { get { throw null; } set { } } - } - public partial class RedistributeThroughputPropertiesResource - { - public RedistributeThroughputPropertiesResource(Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType throughputPolicy, System.Collections.Generic.IEnumerable targetPhysicalPartitionThroughputInfo, System.Collections.Generic.IEnumerable sourcePhysicalPartitionThroughputInfo) { } - public System.Collections.Generic.IList SourcePhysicalPartitionThroughputInfo { get { throw null; } } - public System.Collections.Generic.IList TargetPhysicalPartitionThroughputInfo { get { throw null; } } - public Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType ThroughputPolicy { get { throw null; } set { } } - } public partial class RegionForOnlineOffline { public RegionForOnlineOffline(string region) { } public string Region { get { throw null; } } } - public partial class ResourceRestoreParameters : Azure.ResourceManager.CosmosDB.Models.RestoreParametersBase - { - public ResourceRestoreParameters() { } - } public partial class RestorableGremlinDatabase : Azure.ResourceManager.Models.ResourceData { internal RestorableGremlinDatabase() { } @@ -4134,23 +3459,6 @@ internal RestorableTableResourceData() { } public string Name { get { throw null; } } public string ResourceType { get { throw null; } } } - public partial class RestoreParametersBase - { - public RestoreParametersBase() { } - public string RestoreSource { get { throw null; } set { } } - public System.DateTimeOffset? RestoreTimestampInUtc { get { throw null; } set { } } - } - public partial class RetrieveThroughputParameters : Azure.ResourceManager.Models.TrackedResourceData - { - public RetrieveThroughputParameters(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputPropertiesResource resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public System.Collections.Generic.IList ResourcePhysicalPartitionIds { get { throw null; } set { } } - } - public partial class RetrieveThroughputPropertiesResource - { - public RetrieveThroughputPropertiesResource(System.Collections.Generic.IEnumerable physicalPartitionIds) { } - public System.Collections.Generic.IList PhysicalPartitionIds { get { throw null; } } - } public partial class SpatialSpec { public SpatialSpec() { } @@ -4174,37 +3482,19 @@ public ThroughputPolicyResourceInfo() { } public int? IncrementPercent { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ThroughputPolicyType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ThroughputPolicyType(string value) { throw null; } - public static Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType Custom { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType Equal { get { throw null; } } - public static Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType None { get { throw null; } } - public bool Equals(Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType left, Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType right) { throw null; } - public static implicit operator Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType left, Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType right) { throw null; } - public override string ToString() { throw null; } - } public partial class ThroughputSettingsResourceInfo { public ThroughputSettingsResourceInfo() { } public Azure.ResourceManager.CosmosDB.Models.AutoscaleSettingsResourceInfo AutoscaleSettings { get { throw null; } set { } } + public string InstantMaximumThroughput { get { throw null; } } public string MinimumThroughput { get { throw null; } } public string OfferReplacePending { get { throw null; } } + public string SoftAllowedMaximumThroughput { get { throw null; } } public int? Throughput { get { throw null; } set { } } } public partial class ThroughputSettingsUpdateData : Azure.ResourceManager.Models.TrackedResourceData { public ThroughputSettingsUpdateData(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsResourceInfo resource) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsResourceInfo Resource { get { throw null; } set { } } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs index eb6270daaa54..736e1de07dea 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ArmCosmosDBModelFactory.cs @@ -12,7 +12,6 @@ using Azure.Core; using Azure.ResourceManager.CosmosDB; using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.CosmosDB.Models { @@ -27,6 +26,7 @@ public static partial class ArmCosmosDBModelFactory /// The tags. /// The location. /// Indicates the type of database account. This can only be set at database account creation. + /// Identity for the resource. /// The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. /// The connection endpoint for the Cosmos DB database account. /// The offer type for the Cosmos DB database account. Default value: Standard. @@ -63,17 +63,14 @@ public static partial class ArmCosmosDBModelFactory /// The CORS policy for the Cosmos DB database account. /// Indicates what services are allowed to bypass firewall checks. /// An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. - /// The Object representing the different Diagnostic log settings for the Cosmos DB Account. /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. /// The object that represents all properties related to capacity enforcement on an account. - /// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. /// The object that represents the metadata for the Account Keys of the Cosmos DB account. /// Flag to indicate enabling/disabling of Partition Merge feature on the account. + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. /// Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBAccountData CosmosDBAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBAccountKind? kind = null, string provisioningState = null, string documentEndpoint = null, CosmosDBAccountOfferType? databaseAccountOfferType = null, IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = null, bool? enableAutomaticFailover = null, ConsistencyPolicy consistencyPolicy = null, IEnumerable capabilities = null, IEnumerable writeLocations = null, IEnumerable readLocations = null, IEnumerable locations = null, IEnumerable failoverPolicies = null, IEnumerable virtualNetworkRules = null, IEnumerable privateEndpointConnections = null, bool? enableMultipleWriteLocations = null, bool? enableCassandraConnector = null, ConnectorOffer? connectorOffer = null, bool? disableKeyBasedMetadataWriteAccess = null, Uri keyVaultKeyUri = null, string defaultIdentity = null, CosmosDBPublicNetworkAccess? publicNetworkAccess = null, bool? isFreeTierEnabled = null, CosmosDBServerVersion? apiServerVersion = null, bool? isAnalyticalStorageEnabled = null, AnalyticalStorageSchemaType? analyticalStorageSchemaType = null, Guid? instanceId = null, CosmosDBAccountCreateMode? createMode = null, CosmosDBAccountRestoreParameters restoreParameters = null, CosmosDBAccountBackupPolicy backupPolicy = null, IEnumerable cors = null, NetworkAclBypass? networkAclBypass = null, IEnumerable networkAclBypassResourceIds = null, EnableFullTextQuery? diagnosticLogEnableFullTextQuery = null, bool? disableLocalAuth = null, int? capacityTotalThroughputLimit = null, bool? enableMaterializedViews = null, DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = null, bool? enableBurstCapacity = null, CosmosDBMinimalTlsVersion? minimalTlsVersion = null, ManagedServiceIdentity identity = null) + public static CosmosDBAccountData CosmosDBAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBAccountKind? kind = null, ManagedServiceIdentity identity = null, string provisioningState = null, string documentEndpoint = null, CosmosDBAccountOfferType? databaseAccountOfferType = null, IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = null, bool? enableAutomaticFailover = null, ConsistencyPolicy consistencyPolicy = null, IEnumerable capabilities = null, IEnumerable writeLocations = null, IEnumerable readLocations = null, IEnumerable locations = null, IEnumerable failoverPolicies = null, IEnumerable virtualNetworkRules = null, IEnumerable privateEndpointConnections = null, bool? enableMultipleWriteLocations = null, bool? enableCassandraConnector = null, ConnectorOffer? connectorOffer = null, bool? disableKeyBasedMetadataWriteAccess = null, Uri keyVaultKeyUri = null, string defaultIdentity = null, CosmosDBPublicNetworkAccess? publicNetworkAccess = null, bool? isFreeTierEnabled = null, CosmosDBServerVersion? apiServerVersion = null, bool? isAnalyticalStorageEnabled = null, AnalyticalStorageSchemaType? analyticalStorageSchemaType = null, Guid? instanceId = null, CosmosDBAccountCreateMode? createMode = null, CosmosDBAccountRestoreParameters restoreParameters = null, CosmosDBAccountBackupPolicy backupPolicy = null, IEnumerable cors = null, NetworkAclBypass? networkAclBypass = null, IEnumerable networkAclBypassResourceIds = null, bool? disableLocalAuth = null, int? capacityTotalThroughputLimit = null, DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = null, CosmosDBMinimalTlsVersion? minimalTlsVersion = null, bool? enableBurstCapacity = null) { tags ??= new Dictionary(); ipRules ??= new List(); @@ -87,7 +84,7 @@ public static CosmosDBAccountData CosmosDBAccountData(ResourceIdentifier id = nu cors ??= new List(); networkAclBypassResourceIds ??= new List(); - return new CosmosDBAccountData(id, name, resourceType, systemData, tags, location, kind, provisioningState, documentEndpoint, databaseAccountOfferType, ipRules?.ToList(), isVirtualNetworkFilterEnabled, enableAutomaticFailover, consistencyPolicy, capabilities?.ToList(), writeLocations?.ToList(), readLocations?.ToList(), locations?.ToList(), failoverPolicies?.ToList(), virtualNetworkRules?.ToList(), privateEndpointConnections?.ToList(), enableMultipleWriteLocations, enableCassandraConnector, connectorOffer, disableKeyBasedMetadataWriteAccess, keyVaultKeyUri, defaultIdentity, publicNetworkAccess, isFreeTierEnabled, apiServerVersion != null ? new ApiProperties(apiServerVersion) : null, isAnalyticalStorageEnabled, analyticalStorageSchemaType != null ? new AnalyticalStorageConfiguration(analyticalStorageSchemaType) : null, instanceId, createMode, restoreParameters, backupPolicy, cors?.ToList(), networkAclBypass, networkAclBypassResourceIds?.ToList(), diagnosticLogEnableFullTextQuery != null ? new DiagnosticLogSettings(diagnosticLogEnableFullTextQuery) : null, disableLocalAuth, capacityTotalThroughputLimit != null ? new CosmosDBAccountCapacity(capacityTotalThroughputLimit) : null, enableMaterializedViews, keysMetadata, enablePartitionMerge, enableBurstCapacity, minimalTlsVersion, identity); + return new CosmosDBAccountData(id, name, resourceType, systemData, tags, location, kind, identity, provisioningState, documentEndpoint, databaseAccountOfferType, ipRules?.ToList(), isVirtualNetworkFilterEnabled, enableAutomaticFailover, consistencyPolicy, capabilities?.ToList(), writeLocations?.ToList(), readLocations?.ToList(), locations?.ToList(), failoverPolicies?.ToList(), virtualNetworkRules?.ToList(), privateEndpointConnections?.ToList(), enableMultipleWriteLocations, enableCassandraConnector, connectorOffer, disableKeyBasedMetadataWriteAccess, keyVaultKeyUri, defaultIdentity, publicNetworkAccess, isFreeTierEnabled, apiServerVersion != null ? new ApiProperties(apiServerVersion) : null, isAnalyticalStorageEnabled, analyticalStorageSchemaType != null ? new AnalyticalStorageConfiguration(analyticalStorageSchemaType) : null, instanceId, createMode, restoreParameters, backupPolicy, cors?.ToList(), networkAclBypass, networkAclBypassResourceIds?.ToList(), disableLocalAuth, capacityTotalThroughputLimit != null ? new CosmosDBAccountCapacity(capacityTotalThroughputLimit) : null, keysMetadata, enablePartitionMerge, minimalTlsVersion, enableBurstCapacity); } /// Initializes a new instance of CosmosDBAccountLocation. @@ -157,6 +154,7 @@ public static DatabaseAccountKeysMetadata DatabaseAccountKeysMetadata(DateTimeOf /// The tags. /// The location. /// Indicates the type of database account. This can only be set at database account creation. + /// Identity for the resource. /// The consistency policy for the Cosmos DB account. /// An array that contains the georeplication locations enabled for the Cosmos DB account. /// The offer type for the database. @@ -185,18 +183,15 @@ public static DatabaseAccountKeysMetadata DatabaseAccountKeysMetadata(DateTimeOf /// The CORS policy for the Cosmos DB database account. /// Indicates what services are allowed to bypass firewall checks. /// An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. - /// The Object representing the different Diagnostic log settings for the Cosmos DB Account. /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. /// Parameters to indicate the information about the restore. /// The object that represents all properties related to capacity enforcement on an account. - /// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. /// This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. /// Flag to indicate enabling/disabling of Partition Merge feature on the account. + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. /// Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBAccountCreateOrUpdateContent CosmosDBAccountCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBAccountKind? kind = null, ConsistencyPolicy consistencyPolicy = null, IEnumerable locations = null, CosmosDBAccountOfferType databaseAccountOfferType = default, IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = null, bool? enableAutomaticFailover = null, IEnumerable capabilities = null, IEnumerable virtualNetworkRules = null, bool? enableMultipleWriteLocations = null, bool? enableCassandraConnector = null, ConnectorOffer? connectorOffer = null, bool? disableKeyBasedMetadataWriteAccess = null, Uri keyVaultKeyUri = null, string defaultIdentity = null, CosmosDBPublicNetworkAccess? publicNetworkAccess = null, bool? isFreeTierEnabled = null, CosmosDBServerVersion? apiServerVersion = null, bool? isAnalyticalStorageEnabled = null, AnalyticalStorageSchemaType? analyticalStorageSchemaType = null, CosmosDBAccountCreateMode? createMode = null, CosmosDBAccountBackupPolicy backupPolicy = null, IEnumerable cors = null, NetworkAclBypass? networkAclBypass = null, IEnumerable networkAclBypassResourceIds = null, EnableFullTextQuery? diagnosticLogEnableFullTextQuery = null, bool? disableLocalAuth = null, CosmosDBAccountRestoreParameters restoreParameters = null, int? capacityTotalThroughputLimit = null, bool? enableMaterializedViews = null, DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = null, bool? enableBurstCapacity = null, CosmosDBMinimalTlsVersion? minimalTlsVersion = null, ManagedServiceIdentity identity = null) + public static CosmosDBAccountCreateOrUpdateContent CosmosDBAccountCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBAccountKind? kind = null, ManagedServiceIdentity identity = null, ConsistencyPolicy consistencyPolicy = null, IEnumerable locations = null, CosmosDBAccountOfferType databaseAccountOfferType = default, IEnumerable ipRules = null, bool? isVirtualNetworkFilterEnabled = null, bool? enableAutomaticFailover = null, IEnumerable capabilities = null, IEnumerable virtualNetworkRules = null, bool? enableMultipleWriteLocations = null, bool? enableCassandraConnector = null, ConnectorOffer? connectorOffer = null, bool? disableKeyBasedMetadataWriteAccess = null, Uri keyVaultKeyUri = null, string defaultIdentity = null, CosmosDBPublicNetworkAccess? publicNetworkAccess = null, bool? isFreeTierEnabled = null, CosmosDBServerVersion? apiServerVersion = null, bool? isAnalyticalStorageEnabled = null, AnalyticalStorageSchemaType? analyticalStorageSchemaType = null, CosmosDBAccountCreateMode? createMode = null, CosmosDBAccountBackupPolicy backupPolicy = null, IEnumerable cors = null, NetworkAclBypass? networkAclBypass = null, IEnumerable networkAclBypassResourceIds = null, bool? disableLocalAuth = null, CosmosDBAccountRestoreParameters restoreParameters = null, int? capacityTotalThroughputLimit = null, DatabaseAccountKeysMetadata keysMetadata = null, bool? enablePartitionMerge = null, CosmosDBMinimalTlsVersion? minimalTlsVersion = null, bool? enableBurstCapacity = null) { tags ??= new Dictionary(); locations ??= new List(); @@ -206,7 +201,7 @@ public static CosmosDBAccountCreateOrUpdateContent CosmosDBAccountCreateOrUpdate cors ??= new List(); networkAclBypassResourceIds ??= new List(); - return new CosmosDBAccountCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, kind, consistencyPolicy, locations?.ToList(), databaseAccountOfferType, ipRules?.ToList(), isVirtualNetworkFilterEnabled, enableAutomaticFailover, capabilities?.ToList(), virtualNetworkRules?.ToList(), enableMultipleWriteLocations, enableCassandraConnector, connectorOffer, disableKeyBasedMetadataWriteAccess, keyVaultKeyUri, defaultIdentity, publicNetworkAccess, isFreeTierEnabled, apiServerVersion != null ? new ApiProperties(apiServerVersion) : null, isAnalyticalStorageEnabled, analyticalStorageSchemaType != null ? new AnalyticalStorageConfiguration(analyticalStorageSchemaType) : null, createMode, backupPolicy, cors?.ToList(), networkAclBypass, networkAclBypassResourceIds?.ToList(), diagnosticLogEnableFullTextQuery != null ? new DiagnosticLogSettings(diagnosticLogEnableFullTextQuery) : null, disableLocalAuth, restoreParameters, capacityTotalThroughputLimit != null ? new CosmosDBAccountCapacity(capacityTotalThroughputLimit) : null, enableMaterializedViews, keysMetadata, enablePartitionMerge, enableBurstCapacity, minimalTlsVersion, identity); + return new CosmosDBAccountCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, kind, identity, consistencyPolicy, locations?.ToList(), databaseAccountOfferType, ipRules?.ToList(), isVirtualNetworkFilterEnabled, enableAutomaticFailover, capabilities?.ToList(), virtualNetworkRules?.ToList(), enableMultipleWriteLocations, enableCassandraConnector, connectorOffer, disableKeyBasedMetadataWriteAccess, keyVaultKeyUri, defaultIdentity, publicNetworkAccess, isFreeTierEnabled, apiServerVersion != null ? new ApiProperties(apiServerVersion) : null, isAnalyticalStorageEnabled, analyticalStorageSchemaType != null ? new AnalyticalStorageConfiguration(analyticalStorageSchemaType) : null, createMode, backupPolicy, cors?.ToList(), networkAclBypass, networkAclBypassResourceIds?.ToList(), disableLocalAuth, restoreParameters, capacityTotalThroughputLimit != null ? new CosmosDBAccountCapacity(capacityTotalThroughputLimit) : null, keysMetadata, enablePartitionMerge, minimalTlsVersion, enableBurstCapacity); } /// Initializes a new instance of CosmosDBAccountKeyList. @@ -240,15 +235,6 @@ public static CosmosDBAccountConnectionString CosmosDBAccountConnectionString(st return new CosmosDBAccountConnectionString(connectionString, description, keyKind, keyType); } - /// Initializes a new instance of ErrorResponse. - /// Error code. - /// Error message indicating why the operation failed. - /// A new instance for mocking. - public static ErrorResponse ErrorResponse(string code = null, string message = null) - { - return new ErrorResponse(code, message); - } - /// Initializes a new instance of CosmosDBBaseMetric. /// The start time for the metric (ISO-8601 format). /// The end time for the metric (ISO-8601 format). @@ -387,42 +373,6 @@ public static CosmosDBMetricAvailability CosmosDBMetricAvailability(string timeG return new CosmosDBMetricAvailability(timeGrain, retention); } - /// Initializes a new instance of GraphResourceGetResultData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Gets or sets the resource. - /// - /// Identity for the resource. - /// A new instance for mocking. - public static GraphResourceGetResultData GraphResourceGetResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier resourceId = null, GraphResourceGetPropertiesOptions options = null, ManagedServiceIdentity identity = null) - { - tags ??= new Dictionary(); - - return new GraphResourceGetResultData(id, name, resourceType, systemData, tags, location, resourceId != null ? ResourceManagerModelFactory.WritableSubResource(resourceId) : null, options, identity); - } - - /// Initializes a new instance of GraphResourceGetResultCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a Graph resource. - /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - /// A new instance for mocking. - public static GraphResourceGetResultCreateOrUpdateContent GraphResourceGetResultCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier resourceId = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) - { - tags ??= new Dictionary(); - - return new GraphResourceGetResultCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resourceId != null ? ResourceManagerModelFactory.WritableSubResource(resourceId) : null, options, identity); - } - /// Initializes a new instance of CosmosDBSqlDatabaseData. /// The id. /// The name. @@ -432,28 +382,31 @@ public static GraphResourceGetResultCreateOrUpdateContent GraphResourceGetResult /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlDatabaseData CosmosDBSqlDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlDatabaseResourceInfo resource = null, CosmosDBSqlDatabasePropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlDatabaseData CosmosDBSqlDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlDatabaseResourceInfo resource = null, CosmosDBSqlDatabasePropertiesConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBSqlDatabaseData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBSqlDatabaseData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedCosmosDBSqlDatabaseResourceInfo. /// Name of the Cosmos DB SQL database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property that specified the addressable path of the collections resource. /// A system generated property that specifies the addressable path of the users resource. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. + /// is null. /// A new instance for mocking. - public static ExtendedCosmosDBSqlDatabaseResourceInfo ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, string colls = null, string users = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static ExtendedCosmosDBSqlDatabaseResourceInfo ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName = null, string colls = null, string users = null, string rid = null, float? timestamp = null, ETag? etag = null) { - return new ExtendedCosmosDBSqlDatabaseResourceInfo(databaseName, restoreParameters, createMode, colls, users, rid, timestamp, etag); + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + return new ExtendedCosmosDBSqlDatabaseResourceInfo(databaseName, colls, users, rid, timestamp, etag); } /// Initializes a new instance of CosmosDBSqlDatabaseCreateOrUpdateContent. @@ -463,15 +416,14 @@ public static ExtendedCosmosDBSqlDatabaseResourceInfo ExtendedCosmosDBSqlDatabas /// The systemData. /// The tags. /// The location. - /// The standard JSON format of a SQL database. + /// The standard JSON format of a SQL database. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlDatabaseCreateOrUpdateContent CosmosDBSqlDatabaseCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlDatabaseResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlDatabaseCreateOrUpdateContent CosmosDBSqlDatabaseCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string resourceDatabaseName = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBSqlDatabaseCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBSqlDatabaseCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resourceDatabaseName != null ? new CosmosDBSqlDatabaseResourceInfo(resourceDatabaseName) : null, options); } /// Initializes a new instance of ThroughputSettingData. @@ -482,13 +434,12 @@ public static CosmosDBSqlDatabaseCreateOrUpdateContent CosmosDBSqlDatabaseCreate /// The tags. /// The location. /// - /// Identity for the resource. /// A new instance for mocking. - public static ThroughputSettingData ThroughputSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedThroughputSettingsResourceInfo resource = null, ManagedServiceIdentity identity = null) + public static ThroughputSettingData ThroughputSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedThroughputSettingsResourceInfo resource = null) { tags ??= new Dictionary(); - return new ThroughputSettingData(id, name, resourceType, systemData, tags, location, resource, identity); + return new ThroughputSettingData(id, name, resourceType, systemData, tags, location, resource); } /// Initializes a new instance of ExtendedThroughputSettingsResourceInfo. @@ -496,13 +447,15 @@ public static ThroughputSettingData ThroughputSettingData(ResourceIdentifier id /// Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. /// The minimum throughput of the resource. /// The throughput replace is pending. + /// The offer throughput value to instantly scale up without triggering splits. + /// The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. /// A new instance for mocking. - public static ExtendedThroughputSettingsResourceInfo ExtendedThroughputSettingsResourceInfo(int? throughput = null, AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static ExtendedThroughputSettingsResourceInfo ExtendedThroughputSettingsResourceInfo(int? throughput = null, AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null, string instantMaximumThroughput = null, string softAllowedMaximumThroughput = null, string rid = null, float? timestamp = null, ETag? etag = null) { - return new ExtendedThroughputSettingsResourceInfo(throughput, autoscaleSettings, minimumThroughput, offerReplacePending, rid, timestamp, etag); + return new ExtendedThroughputSettingsResourceInfo(throughput, autoscaleSettings, minimumThroughput, offerReplacePending, instantMaximumThroughput, softAllowedMaximumThroughput, rid, timestamp, etag); } /// Initializes a new instance of ThroughputSettingsResourceInfo. @@ -510,10 +463,12 @@ public static ExtendedThroughputSettingsResourceInfo ExtendedThroughputSettingsR /// Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. /// The minimum throughput of the resource. /// The throughput replace is pending. + /// The offer throughput value to instantly scale up without triggering splits. + /// The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified. /// A new instance for mocking. - public static ThroughputSettingsResourceInfo ThroughputSettingsResourceInfo(int? throughput = null, AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null) + public static ThroughputSettingsResourceInfo ThroughputSettingsResourceInfo(int? throughput = null, AutoscaleSettingsResourceInfo autoscaleSettings = null, string minimumThroughput = null, string offerReplacePending = null, string instantMaximumThroughput = null, string softAllowedMaximumThroughput = null) { - return new ThroughputSettingsResourceInfo(throughput, autoscaleSettings, minimumThroughput, offerReplacePending); + return new ThroughputSettingsResourceInfo(throughput, autoscaleSettings, minimumThroughput, offerReplacePending, instantMaximumThroughput, softAllowedMaximumThroughput); } /// Initializes a new instance of AutoscaleSettingsResourceInfo. @@ -534,39 +489,12 @@ public static AutoscaleSettingsResourceInfo AutoscaleSettingsResourceInfo(int ma /// The tags. /// The location. /// The standard JSON format of a resource throughput. - /// Identity for the resource. /// A new instance for mocking. - public static ThroughputSettingsUpdateData ThroughputSettingsUpdateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ThroughputSettingsResourceInfo resource = null, ManagedServiceIdentity identity = null) + public static ThroughputSettingsUpdateData ThroughputSettingsUpdateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ThroughputSettingsResourceInfo resource = null) { tags ??= new Dictionary(); - return new ThroughputSettingsUpdateData(id, name, resourceType, systemData, tags, location, resource, identity); - } - - /// Initializes a new instance of CosmosDBSqlClientEncryptionKeyData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// A new instance for mocking. - public static CosmosDBSqlClientEncryptionKeyData CosmosDBSqlClientEncryptionKeyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CosmosDBSqlClientEncryptionKeyProperties resource = null) - { - return new CosmosDBSqlClientEncryptionKeyData(id, name, resourceType, systemData, resource); - } - - /// Initializes a new instance of CosmosDBSqlClientEncryptionKeyProperties. - /// Name of the ClientEncryptionKey. - /// Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. - /// Wrapped (encrypted) form of the key represented as a byte array. - /// Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. - /// A system generated property. A unique identifier. - /// A system generated property that denotes the last updated timestamp of the resource. - /// A system generated property representing the resource etag required for optimistic concurrency control. - /// A new instance for mocking. - public static CosmosDBSqlClientEncryptionKeyProperties CosmosDBSqlClientEncryptionKeyProperties(string id = null, string encryptionAlgorithm = null, byte[] wrappedDataEncryptionKey = null, CosmosDBKeyWrapMetadata keyWrapMetadata = null, string rid = null, float? timestamp = null, ETag? etag = null) - { - return new CosmosDBSqlClientEncryptionKeyProperties(id, encryptionAlgorithm, wrappedDataEncryptionKey, keyWrapMetadata, rid, timestamp, etag); + return new ThroughputSettingsUpdateData(id, name, resourceType, systemData, tags, location, resource); } /// Initializes a new instance of CosmosDBSqlContainerData. @@ -578,13 +506,12 @@ public static CosmosDBSqlClientEncryptionKeyProperties CosmosDBSqlClientEncrypti /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlContainerData CosmosDBSqlContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlContainerResourceInfo resource = null, CosmosDBSqlContainerPropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlContainerData CosmosDBSqlContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlContainerResourceInfo resource = null, CosmosDBSqlContainerPropertiesConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBSqlContainerData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBSqlContainerData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedCosmosDBSqlContainerResourceInfo. @@ -596,18 +523,15 @@ public static CosmosDBSqlContainerData CosmosDBSqlContainerData(ResourceIdentifi /// The conflict resolution policy for the container. /// The client encryption policy for the container. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - /// The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. /// A new instance for mocking. - public static ExtendedCosmosDBSqlContainerResourceInfo ExtendedCosmosDBSqlContainerResourceInfo(string containerName = null, CosmosDBIndexingPolicy indexingPolicy = null, CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = null, IEnumerable uniqueKeys = null, ConflictResolutionPolicy conflictResolutionPolicy = null, CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, MaterializedViewDefinition materializedViewDefinition = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static ExtendedCosmosDBSqlContainerResourceInfo ExtendedCosmosDBSqlContainerResourceInfo(string containerName = null, CosmosDBIndexingPolicy indexingPolicy = null, CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = null, IEnumerable uniqueKeys = null, ConflictResolutionPolicy conflictResolutionPolicy = null, CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = null, string rid = null, float? timestamp = null, ETag? etag = null) { uniqueKeys ??= new List(); - return new ExtendedCosmosDBSqlContainerResourceInfo(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeys != null ? new CosmosDBUniqueKeyPolicy(uniqueKeys?.ToList()) : null, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl, restoreParameters, createMode, materializedViewDefinition, rid, timestamp, etag); + return new ExtendedCosmosDBSqlContainerResourceInfo(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeys != null ? new CosmosDBUniqueKeyPolicy(uniqueKeys?.ToList()) : null, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl, rid, timestamp, etag); } /// Initializes a new instance of CosmosDBContainerPartitionKey. @@ -623,16 +547,6 @@ public static CosmosDBContainerPartitionKey CosmosDBContainerPartitionKey(IEnume return new CosmosDBContainerPartitionKey(paths?.ToList(), kind, version, isSystemKey); } - /// Initializes a new instance of MaterializedViewDefinition. - /// An unique identifier for the source collection. This is a system generated property. - /// The name of the source container on which the Materialized View will be created. - /// The definition should be an SQL query which would be used to fetch data from the source container to populate into the Materialized View container. - /// A new instance for mocking. - public static MaterializedViewDefinition MaterializedViewDefinition(string sourceCollectionRid = null, string sourceCollectionId = null, string definition = null) - { - return new MaterializedViewDefinition(sourceCollectionRid, sourceCollectionId, definition); - } - /// Initializes a new instance of CosmosDBSqlContainerCreateOrUpdateContent. /// The id. /// The name. @@ -642,85 +556,38 @@ public static MaterializedViewDefinition MaterializedViewDefinition(string sourc /// The location. /// The standard JSON format of a container. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlContainerCreateOrUpdateContent CosmosDBSqlContainerCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlContainerResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlContainerCreateOrUpdateContent CosmosDBSqlContainerCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlContainerResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBSqlContainerCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBSqlContainerCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options); } - /// Initializes a new instance of PhysicalPartitionStorageInfoCollection. - /// List of physical partitions and their properties. - /// A new instance for mocking. - public static PhysicalPartitionStorageInfoCollection PhysicalPartitionStorageInfoCollection(IEnumerable physicalPartitionStorageInfoCollectionValue = null) - { - physicalPartitionStorageInfoCollectionValue ??= new List(); - - return new PhysicalPartitionStorageInfoCollection(physicalPartitionStorageInfoCollectionValue?.ToList()); - } - - /// Initializes a new instance of PhysicalPartitionStorageInfo. - /// The unique identifier of the partition. - /// The storage in KB for the physical partition. - /// A new instance for mocking. - public static PhysicalPartitionStorageInfo PhysicalPartitionStorageInfo(string id = null, double? storageInKB = null) - { - return new PhysicalPartitionStorageInfo(id, storageInKB); - } - - /// Initializes a new instance of RetrieveThroughputParameters. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a resource throughput. - /// Identity for the resource. - /// A new instance for mocking. - public static RetrieveThroughputParameters RetrieveThroughputParameters(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable resourcePhysicalPartitionIds = null, ManagedServiceIdentity identity = null) - { - tags ??= new Dictionary(); - resourcePhysicalPartitionIds ??= new List(); - - return new RetrieveThroughputParameters(id, name, resourceType, systemData, tags, location, resourcePhysicalPartitionIds != null ? new RetrieveThroughputPropertiesResource(resourcePhysicalPartitionIds?.ToList()) : null, identity); - } - - /// Initializes a new instance of PhysicalPartitionThroughputInfoResult. + /// Initializes a new instance of CosmosDBSqlClientEncryptionKeyData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// properties of physical partition throughput info. - /// Identity for the resource. - /// A new instance for mocking. - public static PhysicalPartitionThroughputInfoResult PhysicalPartitionThroughputInfoResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable resourcePhysicalPartitionThroughputInfo = null, ManagedServiceIdentity identity = null) + /// + /// A new instance for mocking. + public static CosmosDBSqlClientEncryptionKeyData CosmosDBSqlClientEncryptionKeyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CosmosDBSqlClientEncryptionKeyProperties resource = null) { - tags ??= new Dictionary(); - resourcePhysicalPartitionThroughputInfo ??= new List(); - - return new PhysicalPartitionThroughputInfoResult(id, name, resourceType, systemData, tags, location, resourcePhysicalPartitionThroughputInfo != null ? new PhysicalPartitionThroughputInfoResultPropertiesResource(resourcePhysicalPartitionThroughputInfo?.ToList()) : null, identity); + return new CosmosDBSqlClientEncryptionKeyData(id, name, resourceType, systemData, resource); } - /// Initializes a new instance of RedistributeThroughputParameters. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a resource throughput. - /// Identity for the resource. - /// A new instance for mocking. - public static RedistributeThroughputParameters RedistributeThroughputParameters(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, RedistributeThroughputPropertiesResource resource = null, ManagedServiceIdentity identity = null) + /// Initializes a new instance of CosmosDBSqlClientEncryptionKeyProperties. + /// Name of the ClientEncryptionKey. + /// Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. + /// Wrapped (encrypted) form of the key represented as a byte array. + /// Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. + /// A system generated property. A unique identifier. + /// A system generated property that denotes the last updated timestamp of the resource. + /// A system generated property representing the resource etag required for optimistic concurrency control. + /// A new instance for mocking. + public static CosmosDBSqlClientEncryptionKeyProperties CosmosDBSqlClientEncryptionKeyProperties(string id = null, string encryptionAlgorithm = null, byte[] wrappedDataEncryptionKey = null, CosmosDBKeyWrapMetadata keyWrapMetadata = null, string rid = null, float? timestamp = null, ETag? etag = null) { - tags ??= new Dictionary(); - - return new RedistributeThroughputParameters(id, name, resourceType, systemData, tags, location, resource, identity); + return new CosmosDBSqlClientEncryptionKeyProperties(id, encryptionAlgorithm, wrappedDataEncryptionKey, keyWrapMetadata, rid, timestamp, etag); } /// Initializes a new instance of CosmosDBSqlStoredProcedureData. @@ -731,13 +598,12 @@ public static RedistributeThroughputParameters RedistributeThroughputParameters( /// The tags. /// The location. /// - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlStoredProcedureData CosmosDBSqlStoredProcedureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlStoredProcedureResourceInfo resource = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlStoredProcedureData CosmosDBSqlStoredProcedureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlStoredProcedureResourceInfo resource = null) { tags ??= new Dictionary(); - return new CosmosDBSqlStoredProcedureData(id, name, resourceType, systemData, tags, location, resource, identity); + return new CosmosDBSqlStoredProcedureData(id, name, resourceType, systemData, tags, location, resource); } /// Initializes a new instance of ExtendedCosmosDBSqlStoredProcedureResourceInfo. @@ -761,13 +627,12 @@ public static ExtendedCosmosDBSqlStoredProcedureResourceInfo ExtendedCosmosDBSql /// The location. /// The standard JSON format of a storedProcedure. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlStoredProcedureCreateOrUpdateContent CosmosDBSqlStoredProcedureCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlStoredProcedureResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlStoredProcedureCreateOrUpdateContent CosmosDBSqlStoredProcedureCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlStoredProcedureResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBSqlStoredProcedureCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBSqlStoredProcedureCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of CosmosDBSqlUserDefinedFunctionData. @@ -778,13 +643,12 @@ public static CosmosDBSqlStoredProcedureCreateOrUpdateContent CosmosDBSqlStoredP /// The tags. /// The location. /// - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlUserDefinedFunctionData CosmosDBSqlUserDefinedFunctionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo resource = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlUserDefinedFunctionData CosmosDBSqlUserDefinedFunctionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo resource = null) { tags ??= new Dictionary(); - return new CosmosDBSqlUserDefinedFunctionData(id, name, resourceType, systemData, tags, location, resource, identity); + return new CosmosDBSqlUserDefinedFunctionData(id, name, resourceType, systemData, tags, location, resource); } /// Initializes a new instance of ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo. @@ -808,13 +672,12 @@ public static ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo ExtendedCosmosD /// The location. /// The standard JSON format of a userDefinedFunction. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlUserDefinedFunctionResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlUserDefinedFunctionResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of CosmosDBSqlTriggerData. @@ -825,13 +688,12 @@ public static CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent CosmosDBSqlUse /// The tags. /// The location. /// - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlTriggerData CosmosDBSqlTriggerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlTriggerResourceInfo resource = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlTriggerData CosmosDBSqlTriggerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCosmosDBSqlTriggerResourceInfo resource = null) { tags ??= new Dictionary(); - return new CosmosDBSqlTriggerData(id, name, resourceType, systemData, tags, location, resource, identity); + return new CosmosDBSqlTriggerData(id, name, resourceType, systemData, tags, location, resource); } /// Initializes a new instance of ExtendedCosmosDBSqlTriggerResourceInfo. @@ -857,13 +719,12 @@ public static ExtendedCosmosDBSqlTriggerResourceInfo ExtendedCosmosDBSqlTriggerR /// The location. /// The standard JSON format of a trigger. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBSqlTriggerCreateOrUpdateContent CosmosDBSqlTriggerCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlTriggerResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBSqlTriggerCreateOrUpdateContent CosmosDBSqlTriggerCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBSqlTriggerResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBSqlTriggerCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBSqlTriggerCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of MongoDBDatabaseData. @@ -875,26 +736,29 @@ public static CosmosDBSqlTriggerCreateOrUpdateContent CosmosDBSqlTriggerCreateOr /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static MongoDBDatabaseData MongoDBDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedMongoDBDatabaseResourceInfo resource = null, MongoDBDatabasePropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static MongoDBDatabaseData MongoDBDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedMongoDBDatabaseResourceInfo resource = null, MongoDBDatabasePropertiesConfig options = null) { tags ??= new Dictionary(); - return new MongoDBDatabaseData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new MongoDBDatabaseData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedMongoDBDatabaseResourceInfo. /// Name of the Cosmos DB MongoDB database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. + /// is null. /// A new instance for mocking. - public static ExtendedMongoDBDatabaseResourceInfo ExtendedMongoDBDatabaseResourceInfo(string databaseName = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static ExtendedMongoDBDatabaseResourceInfo ExtendedMongoDBDatabaseResourceInfo(string databaseName = null, string rid = null, float? timestamp = null, ETag? etag = null) { - return new ExtendedMongoDBDatabaseResourceInfo(databaseName, restoreParameters, createMode, rid, timestamp, etag); + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + return new ExtendedMongoDBDatabaseResourceInfo(databaseName, rid, timestamp, etag); } /// Initializes a new instance of MongoDBDatabaseCreateOrUpdateContent. @@ -904,15 +768,14 @@ public static ExtendedMongoDBDatabaseResourceInfo ExtendedMongoDBDatabaseResourc /// The systemData. /// The tags. /// The location. - /// The standard JSON format of a MongoDB database. + /// The standard JSON format of a MongoDB database. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static MongoDBDatabaseCreateOrUpdateContent MongoDBDatabaseCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MongoDBDatabaseResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static MongoDBDatabaseCreateOrUpdateContent MongoDBDatabaseCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string resourceDatabaseName = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new MongoDBDatabaseCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new MongoDBDatabaseCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resourceDatabaseName != null ? new MongoDBDatabaseResourceInfo(resourceDatabaseName) : null, options); } /// Initializes a new instance of MongoDBCollectionData. @@ -924,13 +787,12 @@ public static MongoDBDatabaseCreateOrUpdateContent MongoDBDatabaseCreateOrUpdate /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static MongoDBCollectionData MongoDBCollectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedMongoDBCollectionResourceInfo resource = null, MongoDBCollectionPropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static MongoDBCollectionData MongoDBCollectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedMongoDBCollectionResourceInfo resource = null, MongoDBCollectionPropertiesConfig options = null) { tags ??= new Dictionary(); - return new MongoDBCollectionData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new MongoDBCollectionData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedMongoDBCollectionResourceInfo. @@ -938,18 +800,16 @@ public static MongoDBCollectionData MongoDBCollectionData(ResourceIdentifier id /// A key-value pair of shard keys to be applied for the request. /// List of index keys. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. /// A new instance for mocking. - public static ExtendedMongoDBCollectionResourceInfo ExtendedMongoDBCollectionResourceInfo(string collectionName = null, IDictionary shardKey = null, IEnumerable indexes = null, int? analyticalStorageTtl = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static ExtendedMongoDBCollectionResourceInfo ExtendedMongoDBCollectionResourceInfo(string collectionName = null, IDictionary shardKey = null, IEnumerable indexes = null, int? analyticalStorageTtl = null, string rid = null, float? timestamp = null, ETag? etag = null) { shardKey ??= new Dictionary(); indexes ??= new List(); - return new ExtendedMongoDBCollectionResourceInfo(collectionName, shardKey, indexes?.ToList(), analyticalStorageTtl, restoreParameters, createMode, rid, timestamp, etag); + return new ExtendedMongoDBCollectionResourceInfo(collectionName, shardKey, indexes?.ToList(), analyticalStorageTtl, rid, timestamp, etag); } /// Initializes a new instance of MongoDBCollectionCreateOrUpdateContent. @@ -961,13 +821,12 @@ public static ExtendedMongoDBCollectionResourceInfo ExtendedMongoDBCollectionRes /// The location. /// The standard JSON format of a MongoDB collection. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static MongoDBCollectionCreateOrUpdateContent MongoDBCollectionCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MongoDBCollectionResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static MongoDBCollectionCreateOrUpdateContent MongoDBCollectionCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MongoDBCollectionResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new MongoDBCollectionCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new MongoDBCollectionCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of CosmosDBTableData. @@ -979,26 +838,29 @@ public static MongoDBCollectionCreateOrUpdateContent MongoDBCollectionCreateOrUp /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBTableData CosmosDBTableData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBTablePropertiesResource resource = null, CosmosDBTablePropertiesOptions options = null, ManagedServiceIdentity identity = null) + public static CosmosDBTableData CosmosDBTableData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBTablePropertiesResource resource = null, CosmosDBTablePropertiesOptions options = null) { tags ??= new Dictionary(); - return new CosmosDBTableData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBTableData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of CosmosDBTablePropertiesResource. /// Name of the Cosmos DB table. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. + /// is null. /// A new instance for mocking. - public static CosmosDBTablePropertiesResource CosmosDBTablePropertiesResource(string tableName = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static CosmosDBTablePropertiesResource CosmosDBTablePropertiesResource(string tableName = null, string rid = null, float? timestamp = null, ETag? etag = null) { - return new CosmosDBTablePropertiesResource(tableName, restoreParameters, createMode, rid, timestamp, etag); + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + return new CosmosDBTablePropertiesResource(tableName, rid, timestamp, etag); } /// Initializes a new instance of CosmosDBTableCreateOrUpdateContent. @@ -1008,15 +870,14 @@ public static CosmosDBTablePropertiesResource CosmosDBTablePropertiesResource(st /// The systemData. /// The tags. /// The location. - /// The standard JSON format of a Table. + /// The standard JSON format of a Table. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CosmosDBTableCreateOrUpdateContent CosmosDBTableCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBTableResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CosmosDBTableCreateOrUpdateContent CosmosDBTableCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string resourceTableName = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CosmosDBTableCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CosmosDBTableCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resourceTableName != null ? new CosmosDBTableResourceInfo(resourceTableName) : null, options); } /// Initializes a new instance of CassandraKeyspaceData. @@ -1028,13 +889,12 @@ public static CosmosDBTableCreateOrUpdateContent CosmosDBTableCreateOrUpdateCont /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static CassandraKeyspaceData CassandraKeyspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCassandraKeyspaceResourceInfo resource = null, CassandraKeyspacePropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static CassandraKeyspaceData CassandraKeyspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCassandraKeyspaceResourceInfo resource = null, CassandraKeyspacePropertiesConfig options = null) { tags ??= new Dictionary(); - return new CassandraKeyspaceData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CassandraKeyspaceData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedCassandraKeyspaceResourceInfo. @@ -1063,13 +923,12 @@ public static ExtendedCassandraKeyspaceResourceInfo ExtendedCassandraKeyspaceRes /// The location. /// The standard JSON format of a Cassandra keyspace. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CassandraKeyspaceCreateOrUpdateContent CassandraKeyspaceCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string resourceKeyspaceName = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CassandraKeyspaceCreateOrUpdateContent CassandraKeyspaceCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string resourceKeyspaceName = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CassandraKeyspaceCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resourceKeyspaceName != null ? new CassandraKeyspaceResourceInfo(resourceKeyspaceName) : null, options, identity); + return new CassandraKeyspaceCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resourceKeyspaceName != null ? new CassandraKeyspaceResourceInfo(resourceKeyspaceName) : null, options); } /// Initializes a new instance of CassandraTableData. @@ -1081,13 +940,12 @@ public static CassandraKeyspaceCreateOrUpdateContent CassandraKeyspaceCreateOrUp /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static CassandraTableData CassandraTableData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCassandraTableResourceInfo resource = null, CassandraTablePropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static CassandraTableData CassandraTableData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedCassandraTableResourceInfo resource = null, CassandraTablePropertiesConfig options = null) { tags ??= new Dictionary(); - return new CassandraTableData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CassandraTableData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedCassandraTableResourceInfo. @@ -1113,13 +971,12 @@ public static ExtendedCassandraTableResourceInfo ExtendedCassandraTableResourceI /// The location. /// The standard JSON format of a Cassandra table. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static CassandraTableCreateOrUpdateContent CassandraTableCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CassandraTableResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static CassandraTableCreateOrUpdateContent CassandraTableCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CassandraTableResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new CassandraTableCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new CassandraTableCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of GremlinDatabaseData. @@ -1131,26 +988,29 @@ public static CassandraTableCreateOrUpdateContent CassandraTableCreateOrUpdateCo /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static GremlinDatabaseData GremlinDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedGremlinDatabaseResourceInfo resource = null, GremlinDatabasePropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static GremlinDatabaseData GremlinDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedGremlinDatabaseResourceInfo resource = null, GremlinDatabasePropertiesConfig options = null) { tags ??= new Dictionary(); - return new GremlinDatabaseData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new GremlinDatabaseData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedGremlinDatabaseResourceInfo. /// Name of the Cosmos DB Gremlin database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. + /// is null. /// A new instance for mocking. - public static ExtendedGremlinDatabaseResourceInfo ExtendedGremlinDatabaseResourceInfo(string databaseName = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static ExtendedGremlinDatabaseResourceInfo ExtendedGremlinDatabaseResourceInfo(string databaseName = null, string rid = null, float? timestamp = null, ETag? etag = null) { - return new ExtendedGremlinDatabaseResourceInfo(databaseName, restoreParameters, createMode, rid, timestamp, etag); + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + return new ExtendedGremlinDatabaseResourceInfo(databaseName, rid, timestamp, etag); } /// Initializes a new instance of GremlinDatabaseCreateOrUpdateContent. @@ -1160,15 +1020,14 @@ public static ExtendedGremlinDatabaseResourceInfo ExtendedGremlinDatabaseResourc /// The systemData. /// The tags. /// The location. - /// The standard JSON format of a Gremlin database. + /// The standard JSON format of a Gremlin database. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static GremlinDatabaseCreateOrUpdateContent GremlinDatabaseCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GremlinDatabaseResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static GremlinDatabaseCreateOrUpdateContent GremlinDatabaseCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string resourceDatabaseName = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new GremlinDatabaseCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new GremlinDatabaseCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resourceDatabaseName != null ? new GremlinDatabaseResourceInfo(resourceDatabaseName) : null, options); } /// Initializes a new instance of GremlinGraphData. @@ -1180,13 +1039,12 @@ public static GremlinDatabaseCreateOrUpdateContent GremlinDatabaseCreateOrUpdate /// The location. /// /// - /// Identity for the resource. /// A new instance for mocking. - public static GremlinGraphData GremlinGraphData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedGremlinGraphResourceInfo resource = null, GremlinGraphPropertiesConfig options = null, ManagedServiceIdentity identity = null) + public static GremlinGraphData GremlinGraphData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedGremlinGraphResourceInfo resource = null, GremlinGraphPropertiesConfig options = null) { tags ??= new Dictionary(); - return new GremlinGraphData(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new GremlinGraphData(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of ExtendedGremlinGraphResourceInfo. @@ -1197,17 +1055,15 @@ public static GremlinGraphData GremlinGraphData(ResourceIdentifier id = null, st /// The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. /// The conflict resolution policy for the graph. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. /// A new instance for mocking. - public static ExtendedGremlinGraphResourceInfo ExtendedGremlinGraphResourceInfo(string graphName = null, CosmosDBIndexingPolicy indexingPolicy = null, CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = null, IEnumerable uniqueKeys = null, ConflictResolutionPolicy conflictResolutionPolicy = null, long? analyticalStorageTtl = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static ExtendedGremlinGraphResourceInfo ExtendedGremlinGraphResourceInfo(string graphName = null, CosmosDBIndexingPolicy indexingPolicy = null, CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = null, IEnumerable uniqueKeys = null, ConflictResolutionPolicy conflictResolutionPolicy = null, long? analyticalStorageTtl = null, string rid = null, float? timestamp = null, ETag? etag = null) { uniqueKeys ??= new List(); - return new ExtendedGremlinGraphResourceInfo(graphName, indexingPolicy, partitionKey, defaultTtl, uniqueKeys != null ? new CosmosDBUniqueKeyPolicy(uniqueKeys?.ToList()) : null, conflictResolutionPolicy, analyticalStorageTtl, restoreParameters, createMode, rid, timestamp, etag); + return new ExtendedGremlinGraphResourceInfo(graphName, indexingPolicy, partitionKey, defaultTtl, uniqueKeys != null ? new CosmosDBUniqueKeyPolicy(uniqueKeys?.ToList()) : null, conflictResolutionPolicy, analyticalStorageTtl, rid, timestamp, etag); } /// Initializes a new instance of GremlinGraphCreateOrUpdateContent. @@ -1219,13 +1075,12 @@ public static ExtendedGremlinGraphResourceInfo ExtendedGremlinGraphResourceInfo( /// The location. /// The standard JSON format of a Gremlin graph. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. /// A new instance for mocking. - public static GremlinGraphCreateOrUpdateContent GremlinGraphCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GremlinGraphResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) + public static GremlinGraphCreateOrUpdateContent GremlinGraphCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GremlinGraphResourceInfo resource = null, CosmosDBCreateUpdateConfig options = null) { tags ??= new Dictionary(); - return new GremlinGraphCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); + return new GremlinGraphCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options); } /// Initializes a new instance of CosmosDBLocationData. @@ -1255,128 +1110,6 @@ public static CosmosDBLocationProperties CosmosDBLocationProperties(bool? doesSu return new CosmosDBLocationProperties(doesSupportAvailabilityZone, isResidencyRestricted, backupStorageRedundancies?.ToList(), isSubscriptionRegionAccessAllowedForRegular, isSubscriptionRegionAccessAllowedForAz, status); } - /// Initializes a new instance of CassandraViewGetResultData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// - /// Identity for the resource. - /// A new instance for mocking. - public static CassandraViewGetResultData CassandraViewGetResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CassandraViewGetPropertiesResource resource = null, CassandraViewGetPropertiesOptions options = null, ManagedServiceIdentity identity = null) - { - tags ??= new Dictionary(); - - return new CassandraViewGetResultData(id, name, resourceType, systemData, tags, location, resource, options, identity); - } - - /// Initializes a new instance of CassandraViewGetPropertiesResource. - /// Name of the Cosmos DB Cassandra view. - /// View Definition of the Cosmos DB Cassandra view. - /// A system generated property. A unique identifier. - /// A system generated property that denotes the last updated timestamp of the resource. - /// A system generated property representing the resource etag required for optimistic concurrency control. - /// or is null. - /// A new instance for mocking. - public static CassandraViewGetPropertiesResource CassandraViewGetPropertiesResource(string id = null, string viewDefinition = null, string rid = null, float? timestamp = null, ETag? etag = null) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (viewDefinition == null) - { - throw new ArgumentNullException(nameof(viewDefinition)); - } - - return new CassandraViewGetPropertiesResource(id, viewDefinition, rid, timestamp, etag); - } - - /// Initializes a new instance of CassandraViewGetResultCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a Cassandra view. - /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - /// A new instance for mocking. - public static CassandraViewGetResultCreateOrUpdateContent CassandraViewGetResultCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CassandraViewResource resource = null, CosmosDBCreateUpdateConfig options = null, ManagedServiceIdentity identity = null) - { - tags ??= new Dictionary(); - - return new CassandraViewGetResultCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, resource, options, identity); - } - - /// Initializes a new instance of DataTransferJobGetResultCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Data Transfer Create Job Properties. - /// A new instance for mocking. - public static DataTransferJobGetResultCreateOrUpdateContent DataTransferJobGetResultCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataTransferJobProperties properties = null) - { - return new DataTransferJobGetResultCreateOrUpdateContent(id, name, resourceType, systemData, properties); - } - - /// Initializes a new instance of DataTransferJobProperties. - /// Job Name. - /// - /// Source DataStore details - /// 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 . - /// - /// - /// Destination DataStore details - /// 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. - /// Last Updated Time (ISO-8601 format). - /// Worker count. - /// Error response for Faulted job. - /// 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, ErrorResponse error = null) - { - return new DataTransferJobProperties(jobName, source, destination, status, processedCount, totalCount, lastUpdatedUtcOn, workerCount, error); - } - - /// Initializes a new instance of DataTransferJobGetResultData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Job Name. - /// - /// Source DataStore details - /// 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 . - /// - /// - /// Destination DataStore details - /// 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. - /// Last Updated Time (ISO-8601 format). - /// Worker count. - /// Error response for Faulted job. - /// 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, ErrorResponse error = null) - { - return new DataTransferJobGetResultData(id, name, resourceType, systemData, jobName, source, destination, status, processedCount, totalCount, lastUpdatedUtcOn, workerCount, error); - } - /// Initializes a new instance of CassandraClusterData. /// The id. /// The name. @@ -1433,18 +1166,6 @@ public static CassandraCommandOutput CassandraCommandOutput(string commandOutput return new CassandraCommandOutput(commandOutput); } - /// Initializes a new instance of CassandraClusterBackupResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// A new instance for mocking. - public static CassandraClusterBackupResourceData CassandraClusterBackupResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? backupResourceTimestamp = null) - { - return new CassandraClusterBackupResourceData(id, name, resourceType, systemData, backupResourceTimestamp != null ? new BackupResourceProperties(backupResourceTimestamp) : null); - } - /// Initializes a new instance of CassandraDataCenterData. /// The id. /// The name. @@ -1561,75 +1282,6 @@ public static CassandraClusterDataCenterNodeItem CassandraClusterDataCenterNodeI return new CassandraClusterDataCenterNodeItem(address, state, status, cassandraProcessStatus, load, tokens?.ToList(), size, hostId, rack, timestamp, diskUsedKB, diskFreeKB, memoryUsedKB, memoryBuffersAndCachedKB, memoryFreeKB, memoryTotalKB, cpuUsage); } - /// Initializes a new instance of MongoClusterData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The mode to create a mongo cluster. - /// Parameters used for restore operations. - /// The administrator's login for the mongo cluster. - /// The password of the administrator login. - /// The Mongo DB server version. Defaults to the latest available version if not specified. - /// The default mongo connection string for the cluster. - /// Earliest restore timestamp in UTC ISO8601 format. - /// A provisioning state of the mongo cluster. - /// A status of the mongo cluster. - /// The list of node group specs in the cluster. - /// A new instance for mocking. - public static MongoClusterData MongoClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CosmosDBAccountCreateMode? createMode = null, MongoClusterRestoreParameters restoreParameters = null, string administratorLogin = null, string administratorLoginPassword = null, string serverVersion = null, string connectionString = null, string earliestRestoreTime = null, CosmosDBProvisioningState? provisioningState = null, MongoClusterStatus? clusterStatus = null, IEnumerable nodeGroupSpecs = null) - { - tags ??= new Dictionary(); - nodeGroupSpecs ??= new List(); - - return new MongoClusterData(id, name, resourceType, systemData, tags, location, createMode, restoreParameters, administratorLogin, administratorLoginPassword, serverVersion, connectionString, earliestRestoreTime, provisioningState, clusterStatus, nodeGroupSpecs?.ToList()); - } - - /// Initializes a new instance of CosmosDBFirewallRuleData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of the firewall rule. - /// The start IP address of the mongo cluster firewall rule. Must be IPv4 format. - /// The end IP address of the mongo cluster firewall rule. Must be IPv4 format. - /// A new instance for mocking. - public static CosmosDBFirewallRuleData CosmosDBFirewallRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CosmosDBProvisioningState? provisioningState = null, string startIPAddress = null, string endIPAddress = null) - { - return new CosmosDBFirewallRuleData(id, name, resourceType, systemData, provisioningState, startIPAddress, endIPAddress); - } - - /// Initializes a new instance of CheckCosmosDBNameAvailabilityResponse. - /// Indicates if the resource name is available. - /// The reason why the given name is not available. - /// Detailed reason why the given name is available. - /// A new instance for mocking. - public static CheckCosmosDBNameAvailabilityResponse CheckCosmosDBNameAvailabilityResponse(bool? nameAvailable = null, CosmosDBNameUnavailableReason? reason = null, string message = null) - { - return new CheckCosmosDBNameAvailabilityResponse(nameAvailable, reason, message); - } - - /// Initializes a new instance of ListConnectionStringsResult. - /// An array that contains the connection strings for a mongo cluster. - /// A new instance for mocking. - public static ListConnectionStringsResult ListConnectionStringsResult(IEnumerable connectionStrings = null) - { - connectionStrings ??= new List(); - - return new ListConnectionStringsResult(connectionStrings?.ToList()); - } - - /// Initializes a new instance of CosmosDBConnectionString. - /// Value of the connection string. - /// Description of the connection string. - /// A new instance for mocking. - public static CosmosDBConnectionString CosmosDBConnectionString(string connectionString = null, string description = null) - { - return new CosmosDBConnectionString(connectionString, description); - } - /// Initializes a new instance of MongoDBRoleDefinitionData. /// The id. /// The name. @@ -1725,16 +1377,16 @@ public static CosmosDBSqlRoleAssignmentData CosmosDBSqlRoleAssignmentData(Resour /// The location of the resource group to which the resource belongs. /// The name of the global database account. /// The creation time of the restorable database account (ISO-8601 format). - /// The least recent time at which the database account can be restored to (ISO-8601 format). /// The time at which the restorable database account has been deleted (ISO-8601 format). + /// The least recent time at which the database account can be restored to (ISO-8601 format). /// The API type of the restorable database account. /// List of regions where the of the database account can be restored from. /// A new instance for mocking. - public static RestorableCosmosDBAccountData RestorableCosmosDBAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string accountName = null, DateTimeOffset? createdOn = null, DateTimeOffset? oldestRestorableOn = null, DateTimeOffset? deletedOn = null, CosmosDBApiType? apiType = null, IEnumerable restorableLocations = null) + public static RestorableCosmosDBAccountData RestorableCosmosDBAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string accountName = null, DateTimeOffset? createdOn = null, DateTimeOffset? deletedOn = null, DateTimeOffset? oldestRestorableOn = null, CosmosDBApiType? apiType = null, IEnumerable restorableLocations = null) { restorableLocations ??= new List(); - return new RestorableCosmosDBAccountData(id, name, resourceType, systemData, location, accountName, createdOn, oldestRestorableOn, deletedOn, apiType, restorableLocations?.ToList()); + return new RestorableCosmosDBAccountData(id, name, resourceType, systemData, location, accountName, createdOn, deletedOn, oldestRestorableOn, apiType, restorableLocations?.ToList()); } /// Initializes a new instance of RestorableLocationResourceInfo. @@ -1783,18 +1435,22 @@ public static ExtendedRestorableSqlDatabaseResourceInfo ExtendedRestorableSqlDat /// Initializes a new instance of RestorableSqlDatabasePropertiesResourceDatabase. /// Name of the Cosmos DB SQL database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property that specified the addressable path of the collections resource. /// A system generated property that specifies the addressable path of the users resource. /// A system generated property that specifies the addressable path of the database resource. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. + /// is null. /// A new instance for mocking. - public static RestorableSqlDatabasePropertiesResourceDatabase RestorableSqlDatabasePropertiesResourceDatabase(string databaseName = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, string colls = null, string users = null, string self = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static RestorableSqlDatabasePropertiesResourceDatabase RestorableSqlDatabasePropertiesResourceDatabase(string databaseName = null, string colls = null, string users = null, string self = null, string rid = null, float? timestamp = null, ETag? etag = null) { - return new RestorableSqlDatabasePropertiesResourceDatabase(databaseName, restoreParameters, createMode, colls, users, self, rid, timestamp, etag); + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + return new RestorableSqlDatabasePropertiesResourceDatabase(databaseName, colls, users, self, rid, timestamp, etag); } /// Initializes a new instance of RestorableSqlContainer. @@ -1831,19 +1487,16 @@ public static ExtendedRestorableSqlContainerResourceInfo ExtendedRestorableSqlCo /// The conflict resolution policy for the container. /// The client encryption policy for the container. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - /// The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. /// A system generated property that specifies the addressable path of the container resource. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. /// A new instance for mocking. - public static RestorableSqlContainerPropertiesResourceContainer RestorableSqlContainerPropertiesResourceContainer(string containerName = null, CosmosDBIndexingPolicy indexingPolicy = null, CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = null, IEnumerable uniqueKeys = null, ConflictResolutionPolicy conflictResolutionPolicy = null, CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = null, ResourceRestoreParameters restoreParameters = null, CosmosDBAccountCreateMode? createMode = null, MaterializedViewDefinition materializedViewDefinition = null, string self = null, string rid = null, float? timestamp = null, ETag? etag = null) + public static RestorableSqlContainerPropertiesResourceContainer RestorableSqlContainerPropertiesResourceContainer(string containerName = null, CosmosDBIndexingPolicy indexingPolicy = null, CosmosDBContainerPartitionKey partitionKey = null, int? defaultTtl = null, IEnumerable uniqueKeys = null, ConflictResolutionPolicy conflictResolutionPolicy = null, CosmosDBClientEncryptionPolicy clientEncryptionPolicy = null, long? analyticalStorageTtl = null, string self = null, string rid = null, float? timestamp = null, ETag? etag = null) { uniqueKeys ??= new List(); - return new RestorableSqlContainerPropertiesResourceContainer(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeys != null ? new CosmosDBUniqueKeyPolicy(uniqueKeys?.ToList()) : null, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl, restoreParameters, createMode, materializedViewDefinition, self, rid, timestamp, etag); + return new RestorableSqlContainerPropertiesResourceContainer(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeys != null ? new CosmosDBUniqueKeyPolicy(uniqueKeys?.ToList()) : null, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl, self, rid, timestamp, etag); } /// Initializes a new instance of RestorableSqlResourceData. diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResource.cs deleted file mode 100644 index 61e4c289ee16..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResource.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A Class representing a CassandraClusterBackupResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetCassandraClusterBackupResource method. - /// Otherwise you can get one from its parent resource using the GetCassandraClusterBackupResource method. - /// - public partial class CassandraClusterBackupResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string backupId) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _cassandraClusterBackupResourceCassandraClustersClientDiagnostics; - private readonly CassandraClustersRestOperations _cassandraClusterBackupResourceCassandraClustersRestClient; - private readonly CassandraClusterBackupResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected CassandraClusterBackupResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CassandraClusterBackupResource(ArmClient client, CassandraClusterBackupResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal CassandraClusterBackupResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _cassandraClusterBackupResourceCassandraClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string cassandraClusterBackupResourceCassandraClustersApiVersion); - _cassandraClusterBackupResourceCassandraClustersRestClient = new CassandraClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cassandraClusterBackupResourceCassandraClustersApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DocumentDB/cassandraClusters/backups"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual CassandraClusterBackupResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get the properties of an individual backup of this cluster that is available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _cassandraClusterBackupResourceCassandraClustersClientDiagnostics.CreateScope("CassandraClusterBackupResource.Get"); - scope.Start(); - try - { - var response = await _cassandraClusterBackupResourceCassandraClustersRestClient.GetBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraClusterBackupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the properties of an individual backup of this cluster that is available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _cassandraClusterBackupResourceCassandraClustersClientDiagnostics.CreateScope("CassandraClusterBackupResource.Get"); - scope.Start(); - try - { - var response = _cassandraClusterBackupResourceCassandraClustersRestClient.GetBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraClusterBackupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResourceCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResourceCollection.cs deleted file mode 100644 index 30384ec0625a..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResourceCollection.cs +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetCassandraClusterBackupResources method from an instance of . - /// - public partial class CassandraClusterBackupResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _cassandraClusterBackupResourceCassandraClustersClientDiagnostics; - private readonly CassandraClustersRestOperations _cassandraClusterBackupResourceCassandraClustersRestClient; - - /// Initializes a new instance of the class for mocking. - protected CassandraClusterBackupResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal CassandraClusterBackupResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _cassandraClusterBackupResourceCassandraClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", CassandraClusterBackupResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CassandraClusterBackupResource.ResourceType, out string cassandraClusterBackupResourceCassandraClustersApiVersion); - _cassandraClusterBackupResourceCassandraClustersRestClient = new CassandraClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cassandraClusterBackupResourceCassandraClustersApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != CassandraClusterResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CassandraClusterResource.ResourceType), nameof(id)); - } - - /// - /// Get the properties of an individual backup of this cluster that is available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string backupId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(backupId, nameof(backupId)); - - using var scope = _cassandraClusterBackupResourceCassandraClustersClientDiagnostics.CreateScope("CassandraClusterBackupResourceCollection.Get"); - scope.Start(); - try - { - var response = await _cassandraClusterBackupResourceCassandraClustersRestClient.GetBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupId, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraClusterBackupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the properties of an individual backup of this cluster that is available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string backupId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(backupId, nameof(backupId)); - - using var scope = _cassandraClusterBackupResourceCassandraClustersClientDiagnostics.CreateScope("CassandraClusterBackupResourceCollection.Get"); - scope.Start(); - try - { - var response = _cassandraClusterBackupResourceCassandraClustersRestClient.GetBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupId, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraClusterBackupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List the backups of this cluster that are available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups - /// - /// - /// Operation Id - /// CassandraClusters_ListBackups - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cassandraClusterBackupResourceCassandraClustersRestClient.CreateListBackupsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new CassandraClusterBackupResource(Client, CassandraClusterBackupResourceData.DeserializeCassandraClusterBackupResourceData(e)), _cassandraClusterBackupResourceCassandraClustersClientDiagnostics, Pipeline, "CassandraClusterBackupResourceCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// List the backups of this cluster that are available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups - /// - /// - /// Operation Id - /// CassandraClusters_ListBackups - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cassandraClusterBackupResourceCassandraClustersRestClient.CreateListBackupsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new CassandraClusterBackupResource(Client, CassandraClusterBackupResourceData.DeserializeCassandraClusterBackupResourceData(e)), _cassandraClusterBackupResourceCassandraClustersClientDiagnostics, Pipeline, "CassandraClusterBackupResourceCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string backupId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(backupId, nameof(backupId)); - - using var scope = _cassandraClusterBackupResourceCassandraClustersClientDiagnostics.CreateScope("CassandraClusterBackupResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _cassandraClusterBackupResourceCassandraClustersRestClient.GetBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string backupId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(backupId, nameof(backupId)); - - using var scope = _cassandraClusterBackupResourceCassandraClustersClientDiagnostics.CreateScope("CassandraClusterBackupResourceCollection.Exists"); - scope.Start(); - try - { - var response = _cassandraClusterBackupResourceCassandraClustersRestClient.GetBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupId, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResourceData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResourceData.cs deleted file mode 100644 index 34396aff9db2..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterBackupResourceData.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing the CassandraClusterBackupResource data model. - /// A restorable backup of a Cassandra cluster. - /// - public partial class CassandraClusterBackupResourceData : ResourceData - { - /// Initializes a new instance of CassandraClusterBackupResourceData. - public CassandraClusterBackupResourceData() - { - } - - /// Initializes a new instance of CassandraClusterBackupResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - internal CassandraClusterBackupResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BackupResourceProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// Gets or sets the properties. - internal BackupResourceProperties Properties { get; set; } - /// The time this backup was taken, formatted like 2021-01-21T17:35:21. - public DateTimeOffset? BackupResourceTimestamp - { - get => Properties is null ? default : Properties.Timestamp; - set - { - if (Properties is null) - Properties = new BackupResourceProperties(); - Properties.Timestamp = value; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.cs index 3c08d622e83c..479ddaa3d011 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.cs @@ -89,59 +89,6 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of CassandraClusterBackupResources in the CassandraCluster. - /// An object representing collection of CassandraClusterBackupResources and their operations over a CassandraClusterBackupResource. - public virtual CassandraClusterBackupResourceCollection GetCassandraClusterBackupResources() - { - return GetCachedClient(Client => new CassandraClusterBackupResourceCollection(Client, Id)); - } - - /// - /// Get the properties of an individual backup of this cluster that is available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetCassandraClusterBackupResourceAsync(string backupId, CancellationToken cancellationToken = default) - { - return await GetCassandraClusterBackupResources().GetAsync(backupId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the properties of an individual backup of this cluster that is available to restore. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId} - /// - /// - /// Operation Id - /// CassandraClusters_GetBackup - /// - /// - /// - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetCassandraClusterBackupResource(string backupId, CancellationToken cancellationToken = default) - { - return GetCassandraClusterBackupResources().Get(backupId, cancellationToken); - } - /// Gets a collection of CassandraDataCenterResources in the CassandraCluster. /// An object representing collection of CassandraDataCenterResources and their operations over a CassandraDataCenterResource. public virtual CassandraDataCenterCollection GetCassandraDataCenters() diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.cs index d297dbcca7bb..3664db915120 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.cs @@ -33,19 +33,15 @@ public CassandraKeyspaceData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal CassandraKeyspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCassandraKeyspaceResourceInfo resource, CassandraKeyspacePropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CassandraKeyspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCassandraKeyspaceResourceInfo resource, CassandraKeyspacePropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedCassandraKeyspaceResourceInfo Resource { get; set; } /// Gets or sets the options. public CassandraKeyspacePropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.cs index c21c4e04cd1d..8e9f8dbe2b6d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.cs @@ -148,59 +148,6 @@ public virtual Response GetCassandraTable(string tableNa return GetCassandraTables().Get(tableName, cancellationToken); } - /// Gets a collection of CassandraViewGetResultResources in the CassandraKeyspace. - /// An object representing collection of CassandraViewGetResultResources and their operations over a CassandraViewGetResultResource. - public virtual CassandraViewGetResultCollection GetCassandraViewGetResults() - { - return GetCachedClient(Client => new CassandraViewGetResultCollection(Client, Id)); - } - - /// - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// Cosmos DB view name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetCassandraViewGetResultAsync(string viewName, CancellationToken cancellationToken = default) - { - return await GetCassandraViewGetResults().GetAsync(viewName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// Cosmos DB view name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetCassandraViewGetResult(string viewName, CancellationToken cancellationToken = default) - { - return GetCassandraViewGetResults().Get(viewName, cancellationToken); - } - /// /// Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.cs index 60b12f4d0039..faa54bba34e7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.cs @@ -33,19 +33,15 @@ public CassandraTableData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal CassandraTableData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCassandraTableResourceInfo resource, CassandraTablePropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CassandraTableData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCassandraTableResourceInfo resource, CassandraTablePropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedCassandraTableResourceInfo Resource { get; set; } /// Gets or sets the options. public CassandraTablePropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultCollection.cs deleted file mode 100644 index 5d543681009c..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultCollection.cs +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetCassandraViewGetResults method from an instance of . - /// - public partial class CassandraViewGetResultCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _cassandraViewGetResultCassandraResourcesClientDiagnostics; - private readonly CassandraResourcesRestOperations _cassandraViewGetResultCassandraResourcesRestClient; - - /// Initializes a new instance of the class for mocking. - protected CassandraViewGetResultCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal CassandraViewGetResultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _cassandraViewGetResultCassandraResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", CassandraViewGetResultResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CassandraViewGetResultResource.ResourceType, out string cassandraViewGetResultCassandraResourcesApiVersion); - _cassandraViewGetResultCassandraResourcesRestClient = new CassandraResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cassandraViewGetResultCassandraResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != CassandraKeyspaceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CassandraKeyspaceResource.ResourceType), nameof(id)); - } - - /// - /// Create or update an Azure Cosmos DB Cassandra View - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_CreateUpdateCassandraView - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Cosmos DB view name. - /// The parameters to provide for the current Cassandra View. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string viewName, CassandraViewGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _cassandraViewGetResultCassandraResourcesRestClient.CreateUpdateCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, content, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new CassandraViewGetResultOperationSource(Client), _cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewGetResultCassandraResourcesRestClient.CreateCreateUpdateCassandraViewRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update an Azure Cosmos DB Cassandra View - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_CreateUpdateCassandraView - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Cosmos DB view name. - /// The parameters to provide for the current Cassandra View. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string viewName, CassandraViewGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _cassandraViewGetResultCassandraResourcesRestClient.CreateUpdateCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, content, cancellationToken); - var operation = new CosmosDBArmOperation(new CassandraViewGetResultOperationSource(Client), _cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewGetResultCassandraResourcesRestClient.CreateCreateUpdateCassandraViewRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// Cosmos DB view name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultCollection.Get"); - scope.Start(); - try - { - var response = await _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraViewGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// Cosmos DB view name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultCollection.Get"); - scope.Start(); - try - { - var response = _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraViewGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views - /// - /// - /// Operation Id - /// CassandraResources_ListCassandraViews - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cassandraViewGetResultCassandraResourcesRestClient.CreateListCassandraViewsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new CassandraViewGetResultResource(Client, CassandraViewGetResultData.DeserializeCassandraViewGetResultData(e)), _cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, "CassandraViewGetResultCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views - /// - /// - /// Operation Id - /// CassandraResources_ListCassandraViews - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cassandraViewGetResultCassandraResourcesRestClient.CreateListCassandraViewsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new CassandraViewGetResultResource(Client, CassandraViewGetResultData.DeserializeCassandraViewGetResultData(e)), _cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, "CassandraViewGetResultCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// Cosmos DB view name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultCollection.Exists"); - scope.Start(); - try - { - var response = await _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// Cosmos DB view name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultCollection.Exists"); - scope.Start(); - try - { - var response = _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, viewName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultData.cs deleted file mode 100644 index eea495edc02f..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultData.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing the CassandraViewGetResult data model. - /// An Azure Cosmos DB Cassandra view. - /// - public partial class CassandraViewGetResultData : TrackedResourceData - { - /// Initializes a new instance of CassandraViewGetResultData. - /// The location. - public CassandraViewGetResultData(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of CassandraViewGetResultData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// - /// Identity for the resource. - internal CassandraViewGetResultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CassandraViewGetPropertiesResource resource, CassandraViewGetPropertiesOptions options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) - { - Resource = resource; - Options = options; - Identity = identity; - } - - /// Gets or sets the resource. - public CassandraViewGetPropertiesResource Resource { get; set; } - /// Gets or sets the options. - public CassandraViewGetPropertiesOptions Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultResource.cs deleted file mode 100644 index 0ef04bef6d4c..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultResource.cs +++ /dev/null @@ -1,616 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A Class representing a CassandraViewGetResult along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetCassandraViewGetResultResource method. - /// Otherwise you can get one from its parent resource using the GetCassandraViewGetResult method. - /// - public partial class CassandraViewGetResultResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _cassandraViewGetResultCassandraResourcesClientDiagnostics; - private readonly CassandraResourcesRestOperations _cassandraViewGetResultCassandraResourcesRestClient; - private readonly CassandraViewGetResultData _data; - - /// Initializes a new instance of the class for mocking. - protected CassandraViewGetResultResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CassandraViewGetResultResource(ArmClient client, CassandraViewGetResultData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal CassandraViewGetResultResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _cassandraViewGetResultCassandraResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string cassandraViewGetResultCassandraResourcesApiVersion); - _cassandraViewGetResultCassandraResourcesRestClient = new CassandraResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cassandraViewGetResultCassandraResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual CassandraViewGetResultData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets an object representing a CassandraViewThroughputSettingResource along with the instance operations that can be performed on it in the CassandraViewGetResult. - /// Returns a object. - public virtual CassandraViewThroughputSettingResource GetCassandraViewThroughputSetting() - { - return new CassandraViewThroughputSettingResource(Client, Id.AppendChildResource("throughputSettings", "default")); - } - - /// - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.Get"); - scope.Start(); - try - { - var response = await _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraViewGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.Get"); - scope.Start(); - try - { - var response = _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraViewGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an existing Azure Cosmos DB Cassandra view. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_DeleteCassandraView - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.Delete"); - scope.Start(); - try - { - var response = await _cassandraViewGetResultCassandraResourcesRestClient.DeleteCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(_cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewGetResultCassandraResourcesRestClient.CreateDeleteCassandraViewRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an existing Azure Cosmos DB Cassandra view. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_DeleteCassandraView - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.Delete"); - scope.Start(); - try - { - var response = _cassandraViewGetResultCassandraResourcesRestClient.DeleteCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new CosmosDBArmOperation(_cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewGetResultCassandraResourcesRestClient.CreateDeleteCassandraViewRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update an Azure Cosmos DB Cassandra View - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_CreateUpdateCassandraView - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for the current Cassandra View. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CassandraViewGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.Update"); - scope.Start(); - try - { - var response = await _cassandraViewGetResultCassandraResourcesRestClient.CreateUpdateCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new CassandraViewGetResultOperationSource(Client), _cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewGetResultCassandraResourcesRestClient.CreateCreateUpdateCassandraViewRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update an Azure Cosmos DB Cassandra View - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_CreateUpdateCassandraView - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for the current Cassandra View. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CassandraViewGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.Update"); - scope.Start(); - try - { - var response = _cassandraViewGetResultCassandraResourcesRestClient.CreateUpdateCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new CosmosDBArmOperation(new CassandraViewGetResultOperationSource(Client), _cassandraViewGetResultCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewGetResultCassandraResourcesRestClient.CreateCreateUpdateCassandraViewRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new CassandraViewGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new CassandraViewGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new CassandraViewGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new CassandraViewGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new CassandraViewGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new CassandraViewGetResultCreateOrUpdateContent(current.Location, current.Resource); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new CassandraViewGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new CassandraViewGetResultCreateOrUpdateContent(current.Location, current.Resource); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new CassandraViewGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new CassandraViewGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName} - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraView - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _cassandraViewGetResultCassandraResourcesClientDiagnostics.CreateScope("CassandraViewGetResultResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _cassandraViewGetResultCassandraResourcesRestClient.GetCassandraView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new CassandraViewGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new CassandraViewGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewThroughputSettingResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewThroughputSettingResource.cs deleted file mode 100644 index 2c76ac6c9b48..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewThroughputSettingResource.cs +++ /dev/null @@ -1,677 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A Class representing a CassandraViewThroughputSetting along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetCassandraViewThroughputSettingResource method. - /// Otherwise you can get one from its parent resource using the GetCassandraViewThroughputSetting method. - /// - public partial class CassandraViewThroughputSettingResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics; - private readonly CassandraResourcesRestOperations _cassandraViewThroughputSettingCassandraResourcesRestClient; - private readonly ThroughputSettingData _data; - - /// Initializes a new instance of the class for mocking. - protected CassandraViewThroughputSettingResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CassandraViewThroughputSettingResource(ArmClient client, ThroughputSettingData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal CassandraViewThroughputSettingResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string cassandraViewThroughputSettingCassandraResourcesApiVersion); - _cassandraViewThroughputSettingCassandraResourcesRestClient = new CassandraResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cassandraViewThroughputSettingCassandraResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views/throughputSettings"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual ThroughputSettingData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.Get"); - scope.Start(); - try - { - var response = await _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.Get"); - scope.Start(); - try - { - var response = _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update RUs per second of an Azure Cosmos DB Cassandra view - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_UpdateCassandraViewThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The RUs per second of the parameters to provide for the current Cassandra view. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, ThroughputSettingsUpdateData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _cassandraViewThroughputSettingCassandraResourcesRestClient.UpdateCassandraViewThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new CassandraViewThroughputSettingOperationSource(Client), _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewThroughputSettingCassandraResourcesRestClient.CreateUpdateCassandraViewThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update RUs per second of an Azure Cosmos DB Cassandra view - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_UpdateCassandraViewThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The RUs per second of the parameters to provide for the current Cassandra view. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, ThroughputSettingsUpdateData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.CreateOrUpdate"); - scope.Start(); - try - { - var response = _cassandraViewThroughputSettingCassandraResourcesRestClient.UpdateCassandraViewThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, data, cancellationToken); - var operation = new CosmosDBArmOperation(new CassandraViewThroughputSettingOperationSource(Client), _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewThroughputSettingCassandraResourcesRestClient.CreateUpdateCassandraViewThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale - /// - /// - /// Operation Id - /// CassandraResources_MigrateCassandraViewToAutoscale - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> MigrateCassandraViewToAutoscaleAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.MigrateCassandraViewToAutoscale"); - scope.Start(); - try - { - var response = await _cassandraViewThroughputSettingCassandraResourcesRestClient.MigrateCassandraViewToAutoscaleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new CassandraViewThroughputSettingOperationSource(Client), _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewThroughputSettingCassandraResourcesRestClient.CreateMigrateCassandraViewToAutoscaleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale - /// - /// - /// Operation Id - /// CassandraResources_MigrateCassandraViewToAutoscale - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation MigrateCassandraViewToAutoscale(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.MigrateCassandraViewToAutoscale"); - scope.Start(); - try - { - var response = _cassandraViewThroughputSettingCassandraResourcesRestClient.MigrateCassandraViewToAutoscale(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); - var operation = new CosmosDBArmOperation(new CassandraViewThroughputSettingOperationSource(Client), _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewThroughputSettingCassandraResourcesRestClient.CreateMigrateCassandraViewToAutoscaleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput - /// - /// - /// Operation Id - /// CassandraResources_MigrateCassandraViewToManualThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> MigrateCassandraViewToManualThroughputAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.MigrateCassandraViewToManualThroughput"); - scope.Start(); - try - { - var response = await _cassandraViewThroughputSettingCassandraResourcesRestClient.MigrateCassandraViewToManualThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new CassandraViewThroughputSettingOperationSource(Client), _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewThroughputSettingCassandraResourcesRestClient.CreateMigrateCassandraViewToManualThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput - /// - /// - /// Operation Id - /// CassandraResources_MigrateCassandraViewToManualThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation MigrateCassandraViewToManualThroughput(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.MigrateCassandraViewToManualThroughput"); - scope.Start(); - try - { - var response = _cassandraViewThroughputSettingCassandraResourcesRestClient.MigrateCassandraViewToManualThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); - var operation = new CosmosDBArmOperation(new CassandraViewThroughputSettingOperationSource(Client), _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics, Pipeline, _cassandraViewThroughputSettingCassandraResourcesRestClient.CreateMigrateCassandraViewToManualThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new ThroughputSettingsUpdateData(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await CreateOrUpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new ThroughputSettingsUpdateData(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = CreateOrUpdate(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new ThroughputSettingsUpdateData(current.Location, current.Resource); - patch.Tags.ReplaceWith(tags); - var result = await CreateOrUpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new ThroughputSettingsUpdateData(current.Location, current.Resource); - patch.Tags.ReplaceWith(tags); - var result = CreateOrUpdate(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new ThroughputSettingsUpdateData(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await CreateOrUpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default - /// - /// - /// Operation Id - /// CassandraResources_GetCassandraViewThroughput - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _cassandraViewThroughputSettingCassandraResourcesClientDiagnostics.CreateScope("CassandraViewThroughputSettingResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _cassandraViewThroughputSettingCassandraResourcesRestClient.GetCassandraViewThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); - return Response.FromValue(new CassandraViewThroughputSettingResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new ThroughputSettingsUpdateData(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = CreateOrUpdate(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.cs index 3172aa3a75dc..f5e2eade3dc7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.cs @@ -43,6 +43,7 @@ public CosmosDBAccountData(AzureLocation location) : base(location) /// The tags. /// The location. /// Indicates the type of database account. This can only be set at database account creation. + /// Identity for the resource. /// The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. /// The connection endpoint for the Cosmos DB database account. /// The offer type for the Cosmos DB database account. Default value: Standard. @@ -79,18 +80,16 @@ public CosmosDBAccountData(AzureLocation location) : base(location) /// The CORS policy for the Cosmos DB database account. /// Indicates what services are allowed to bypass firewall checks. /// An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. - /// The Object representing the different Diagnostic log settings for the Cosmos DB Account. /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. /// The object that represents all properties related to capacity enforcement on an account. - /// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. /// The object that represents the metadata for the Account Keys of the Cosmos DB account. /// Flag to indicate enabling/disabling of Partition Merge feature on the account. + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. /// Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. - /// Identity for the resource. - internal CosmosDBAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBAccountKind? kind, string provisioningState, string documentEndpoint, CosmosDBAccountOfferType? databaseAccountOfferType, IList ipRules, bool? isVirtualNetworkFilterEnabled, bool? enableAutomaticFailover, ConsistencyPolicy consistencyPolicy, IList capabilities, IReadOnlyList writeLocations, IReadOnlyList readLocations, IReadOnlyList locations, IReadOnlyList failoverPolicies, IList virtualNetworkRules, IReadOnlyList privateEndpointConnections, bool? enableMultipleWriteLocations, bool? enableCassandraConnector, ConnectorOffer? connectorOffer, bool? disableKeyBasedMetadataWriteAccess, Uri keyVaultKeyUri, string defaultIdentity, CosmosDBPublicNetworkAccess? publicNetworkAccess, bool? isFreeTierEnabled, ApiProperties apiProperties, bool? isAnalyticalStorageEnabled, AnalyticalStorageConfiguration analyticalStorageConfiguration, Guid? instanceId, CosmosDBAccountCreateMode? createMode, CosmosDBAccountRestoreParameters restoreParameters, CosmosDBAccountBackupPolicy backupPolicy, IList cors, NetworkAclBypass? networkAclBypass, IList networkAclBypassResourceIds, DiagnosticLogSettings diagnosticLogSettings, bool? disableLocalAuth, CosmosDBAccountCapacity capacity, bool? enableMaterializedViews, DatabaseAccountKeysMetadata keysMetadata, bool? enablePartitionMerge, bool? enableBurstCapacity, CosmosDBMinimalTlsVersion? minimalTlsVersion, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBAccountKind? kind, ManagedServiceIdentity identity, string provisioningState, string documentEndpoint, CosmosDBAccountOfferType? databaseAccountOfferType, IList ipRules, bool? isVirtualNetworkFilterEnabled, bool? enableAutomaticFailover, ConsistencyPolicy consistencyPolicy, IList capabilities, IReadOnlyList writeLocations, IReadOnlyList readLocations, IReadOnlyList locations, IReadOnlyList failoverPolicies, IList virtualNetworkRules, IReadOnlyList privateEndpointConnections, bool? enableMultipleWriteLocations, bool? enableCassandraConnector, ConnectorOffer? connectorOffer, bool? disableKeyBasedMetadataWriteAccess, Uri keyVaultKeyUri, string defaultIdentity, CosmosDBPublicNetworkAccess? publicNetworkAccess, bool? isFreeTierEnabled, ApiProperties apiProperties, bool? isAnalyticalStorageEnabled, AnalyticalStorageConfiguration analyticalStorageConfiguration, Guid? instanceId, CosmosDBAccountCreateMode? createMode, CosmosDBAccountRestoreParameters restoreParameters, CosmosDBAccountBackupPolicy backupPolicy, IList cors, NetworkAclBypass? networkAclBypass, IList networkAclBypassResourceIds, bool? disableLocalAuth, CosmosDBAccountCapacity capacity, DatabaseAccountKeysMetadata keysMetadata, bool? enablePartitionMerge, CosmosDBMinimalTlsVersion? minimalTlsVersion, bool? enableBurstCapacity) : base(id, name, resourceType, systemData, tags, location) { Kind = kind; + Identity = identity; ProvisioningState = provisioningState; DocumentEndpoint = documentEndpoint; DatabaseAccountOfferType = databaseAccountOfferType; @@ -123,19 +122,18 @@ internal CosmosDBAccountData(ResourceIdentifier id, string name, ResourceType re Cors = cors; NetworkAclBypass = networkAclBypass; NetworkAclBypassResourceIds = networkAclBypassResourceIds; - DiagnosticLogSettings = diagnosticLogSettings; DisableLocalAuth = disableLocalAuth; Capacity = capacity; - EnableMaterializedViews = enableMaterializedViews; KeysMetadata = keysMetadata; EnablePartitionMerge = enablePartitionMerge; - EnableBurstCapacity = enableBurstCapacity; MinimalTlsVersion = minimalTlsVersion; - Identity = identity; + EnableBurstCapacity = enableBurstCapacity; } /// Indicates the type of database account. This can only be set at database account creation. public CosmosDBAccountKind? Kind { get; set; } + /// Identity for the resource. + public ManagedServiceIdentity Identity { get; set; } /// The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. public string ProvisioningState { get; } /// The connection endpoint for the Cosmos DB database account. @@ -228,20 +226,6 @@ public AnalyticalStorageSchemaType? AnalyticalStorageSchemaType public NetworkAclBypass? NetworkAclBypass { get; set; } /// An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. public IList NetworkAclBypassResourceIds { get; } - /// The Object representing the different Diagnostic log settings for the Cosmos DB Account. - internal DiagnosticLogSettings DiagnosticLogSettings { get; set; } - /// Describe the level of detail with which queries are to be logged. - public EnableFullTextQuery? DiagnosticLogEnableFullTextQuery - { - get => DiagnosticLogSettings is null ? default : DiagnosticLogSettings.EnableFullTextQuery; - set - { - if (DiagnosticLogSettings is null) - DiagnosticLogSettings = new DiagnosticLogSettings(); - DiagnosticLogSettings.EnableFullTextQuery = value; - } - } - /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. public bool? DisableLocalAuth { get; set; } /// The object that represents all properties related to capacity enforcement on an account. @@ -258,17 +242,13 @@ public int? CapacityTotalThroughputLimit } } - /// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. - public bool? EnableMaterializedViews { get; set; } /// The object that represents the metadata for the Account Keys of the Cosmos DB account. public DatabaseAccountKeysMetadata KeysMetadata { get; } /// Flag to indicate enabling/disabling of Partition Merge feature on the account. public bool? EnablePartitionMerge { get; set; } + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. + public CosmosDBMinimalTlsVersion? MinimalTlsVersion { get; set; } /// Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. public bool? EnableBurstCapacity { get; set; } - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. - public CosmosDBMinimalTlsVersion? MinimalTlsVersion { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.cs index fd5138f5913a..0701df626856 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.cs @@ -133,59 +133,6 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of GraphResourceGetResultResources in the CosmosDBAccount. - /// An object representing collection of GraphResourceGetResultResources and their operations over a GraphResourceGetResultResource. - public virtual GraphResourceGetResultCollection GetGraphResourceGetResults() - { - return GetCachedClient(Client => new GraphResourceGetResultCollection(Client, Id)); - } - - /// - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetGraphResourceGetResultAsync(string graphName, CancellationToken cancellationToken = default) - { - return await GetGraphResourceGetResults().GetAsync(graphName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetGraphResourceGetResult(string graphName, CancellationToken cancellationToken = default) - { - return GetGraphResourceGetResults().Get(graphName, cancellationToken); - } - /// Gets a collection of CosmosDBSqlDatabaseResources in the CosmosDBAccount. /// An object representing collection of CosmosDBSqlDatabaseResources and their operations over a CosmosDBSqlDatabaseResource. public virtual CosmosDBSqlDatabaseCollection GetCosmosDBSqlDatabases() @@ -663,59 +610,6 @@ public virtual Response GetGremlinDatabase(string datab return GetGremlinDatabases().Get(databaseName, cancellationToken); } - /// Gets a collection of DataTransferJobGetResultResources in the CosmosDBAccount. - /// An object representing collection of DataTransferJobGetResultResources and their operations over a DataTransferJobGetResultResource. - public virtual DataTransferJobGetResultCollection GetDataTransferJobGetResults() - { - return GetCachedClient(Client => new DataTransferJobGetResultCollection(Client, Id)); - } - - /// - /// Get a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataTransferJobGetResultAsync(string jobName, CancellationToken cancellationToken = default) - { - return await GetDataTransferJobGetResults().GetAsync(jobName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataTransferJobGetResult(string jobName, CancellationToken cancellationToken = default) - { - return GetDataTransferJobGetResults().Get(jobName, cancellationToken); - } - /// Gets a collection of CosmosDBPrivateEndpointConnectionResources in the CosmosDBAccount. /// An object representing collection of CosmosDBPrivateEndpointConnectionResources and their operations over a CosmosDBPrivateEndpointConnectionResource. public virtual CosmosDBPrivateEndpointConnectionCollection GetCosmosDBPrivateEndpointConnections() diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleCollection.cs deleted file mode 100644 index 64ac908b47d8..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleCollection.cs +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetCosmosDBFirewallRules method from an instance of . - /// - public partial class CosmosDBFirewallRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _cosmosDBFirewallRuleMongoClustersClientDiagnostics; - private readonly MongoClustersRestOperations _cosmosDBFirewallRuleMongoClustersRestClient; - - /// Initializes a new instance of the class for mocking. - protected CosmosDBFirewallRuleCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal CosmosDBFirewallRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _cosmosDBFirewallRuleMongoClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", CosmosDBFirewallRuleResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CosmosDBFirewallRuleResource.ResourceType, out string cosmosDBFirewallRuleMongoClustersApiVersion); - _cosmosDBFirewallRuleMongoClustersRestClient = new MongoClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cosmosDBFirewallRuleMongoClustersApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != MongoClusterResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MongoClusterResource.ResourceType), nameof(id)); - } - - /// - /// Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_CreateOrUpdateFirewallRule - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the mongo cluster firewall rule. - /// The required parameters for creating or updating a firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string firewallRuleName, CosmosDBFirewallRuleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _cosmosDBFirewallRuleMongoClustersRestClient.CreateOrUpdateFirewallRuleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, data, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new CosmosDBFirewallRuleOperationSource(Client), _cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, _cosmosDBFirewallRuleMongoClustersRestClient.CreateCreateOrUpdateFirewallRuleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_CreateOrUpdateFirewallRule - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the mongo cluster firewall rule. - /// The required parameters for creating or updating a firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string firewallRuleName, CosmosDBFirewallRuleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _cosmosDBFirewallRuleMongoClustersRestClient.CreateOrUpdateFirewallRule(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, data, cancellationToken); - var operation = new CosmosDBArmOperation(new CosmosDBFirewallRuleOperationSource(Client), _cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, _cosmosDBFirewallRuleMongoClustersRestClient.CreateCreateOrUpdateFirewallRuleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets information about a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleCollection.Get"); - scope.Start(); - try - { - var response = await _cosmosDBFirewallRuleMongoClustersRestClient.GetFirewallRuleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CosmosDBFirewallRuleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets information about a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleCollection.Get"); - scope.Start(); - try - { - var response = _cosmosDBFirewallRuleMongoClustersRestClient.GetFirewallRule(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CosmosDBFirewallRuleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List all the firewall rules in a given mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules - /// - /// - /// Operation Id - /// MongoClusters_ListFirewallRules - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cosmosDBFirewallRuleMongoClustersRestClient.CreateListFirewallRulesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cosmosDBFirewallRuleMongoClustersRestClient.CreateListFirewallRulesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CosmosDBFirewallRuleResource(Client, CosmosDBFirewallRuleData.DeserializeCosmosDBFirewallRuleData(e)), _cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, "CosmosDBFirewallRuleCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List all the firewall rules in a given mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules - /// - /// - /// Operation Id - /// MongoClusters_ListFirewallRules - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cosmosDBFirewallRuleMongoClustersRestClient.CreateListFirewallRulesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cosmosDBFirewallRuleMongoClustersRestClient.CreateListFirewallRulesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CosmosDBFirewallRuleResource(Client, CosmosDBFirewallRuleData.DeserializeCosmosDBFirewallRuleData(e)), _cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, "CosmosDBFirewallRuleCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleCollection.Exists"); - scope.Start(); - try - { - var response = await _cosmosDBFirewallRuleMongoClustersRestClient.GetFirewallRuleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleCollection.Exists"); - scope.Start(); - try - { - var response = _cosmosDBFirewallRuleMongoClustersRestClient.GetFirewallRule(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, firewallRuleName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleData.cs deleted file mode 100644 index 5d5b980ee757..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleData.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing the CosmosDBFirewallRule data model. - /// Represents a mongo cluster firewall rule. - /// - public partial class CosmosDBFirewallRuleData : ResourceData - { - /// Initializes a new instance of CosmosDBFirewallRuleData. - /// The start IP address of the mongo cluster firewall rule. Must be IPv4 format. - /// The end IP address of the mongo cluster firewall rule. Must be IPv4 format. - /// or is null. - public CosmosDBFirewallRuleData(string startIPAddress, string endIPAddress) - { - Argument.AssertNotNull(startIPAddress, nameof(startIPAddress)); - Argument.AssertNotNull(endIPAddress, nameof(endIPAddress)); - - StartIPAddress = startIPAddress; - EndIPAddress = endIPAddress; - } - - /// Initializes a new instance of CosmosDBFirewallRuleData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of the firewall rule. - /// The start IP address of the mongo cluster firewall rule. Must be IPv4 format. - /// The end IP address of the mongo cluster firewall rule. Must be IPv4 format. - internal CosmosDBFirewallRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CosmosDBProvisioningState? provisioningState, string startIPAddress, string endIPAddress) : base(id, name, resourceType, systemData) - { - ProvisioningState = provisioningState; - StartIPAddress = startIPAddress; - EndIPAddress = endIPAddress; - } - - /// The provisioning state of the firewall rule. - public CosmosDBProvisioningState? ProvisioningState { get; } - /// The start IP address of the mongo cluster firewall rule. Must be IPv4 format. - public string StartIPAddress { get; set; } - /// The end IP address of the mongo cluster firewall rule. Must be IPv4 format. - public string EndIPAddress { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleResource.cs deleted file mode 100644 index 1066bd1d37b7..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBFirewallRuleResource.cs +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A Class representing a CosmosDBFirewallRule along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetCosmosDBFirewallRuleResource method. - /// Otherwise you can get one from its parent resource using the GetCosmosDBFirewallRule method. - /// - public partial class CosmosDBFirewallRuleResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _cosmosDBFirewallRuleMongoClustersClientDiagnostics; - private readonly MongoClustersRestOperations _cosmosDBFirewallRuleMongoClustersRestClient; - private readonly CosmosDBFirewallRuleData _data; - - /// Initializes a new instance of the class for mocking. - protected CosmosDBFirewallRuleResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CosmosDBFirewallRuleResource(ArmClient client, CosmosDBFirewallRuleData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal CosmosDBFirewallRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _cosmosDBFirewallRuleMongoClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string cosmosDBFirewallRuleMongoClustersApiVersion); - _cosmosDBFirewallRuleMongoClustersRestClient = new MongoClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cosmosDBFirewallRuleMongoClustersApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DocumentDB/mongoClusters/firewallRules"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual CosmosDBFirewallRuleData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets information about a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleResource.Get"); - scope.Start(); - try - { - var response = await _cosmosDBFirewallRuleMongoClustersRestClient.GetFirewallRuleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CosmosDBFirewallRuleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets information about a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleResource.Get"); - scope.Start(); - try - { - var response = _cosmosDBFirewallRuleMongoClustersRestClient.GetFirewallRule(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CosmosDBFirewallRuleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_DeleteFirewallRule - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleResource.Delete"); - scope.Start(); - try - { - var response = await _cosmosDBFirewallRuleMongoClustersRestClient.DeleteFirewallRuleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(_cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, _cosmosDBFirewallRuleMongoClustersRestClient.CreateDeleteFirewallRuleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_DeleteFirewallRule - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleResource.Delete"); - scope.Start(); - try - { - var response = _cosmosDBFirewallRuleMongoClustersRestClient.DeleteFirewallRule(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new CosmosDBArmOperation(_cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, _cosmosDBFirewallRuleMongoClustersRestClient.CreateDeleteFirewallRuleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_CreateOrUpdateFirewallRule - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for creating or updating a firewall rule. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CosmosDBFirewallRuleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleResource.Update"); - scope.Start(); - try - { - var response = await _cosmosDBFirewallRuleMongoClustersRestClient.CreateOrUpdateFirewallRuleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new CosmosDBFirewallRuleOperationSource(Client), _cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, _cosmosDBFirewallRuleMongoClustersRestClient.CreateCreateOrUpdateFirewallRuleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_CreateOrUpdateFirewallRule - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for creating or updating a firewall rule. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CosmosDBFirewallRuleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cosmosDBFirewallRuleMongoClustersClientDiagnostics.CreateScope("CosmosDBFirewallRuleResource.Update"); - scope.Start(); - try - { - var response = _cosmosDBFirewallRuleMongoClustersRestClient.CreateOrUpdateFirewallRule(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new CosmosDBArmOperation(new CosmosDBFirewallRuleOperationSource(Client), _cosmosDBFirewallRuleMongoClustersClientDiagnostics, Pipeline, _cosmosDBFirewallRuleMongoClustersRestClient.CreateCreateOrUpdateFirewallRuleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.cs index 7dd363e107a0..ef1567099694 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.CosmosDB @@ -35,8 +34,6 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _cosmosDBLocationLocationsClientDiagnostics; private readonly LocationsRestOperations _cosmosDBLocationLocationsRestClient; - private readonly ClientDiagnostics _mongoClustersClientDiagnostics; - private readonly MongoClustersRestOperations _mongoClustersRestClient; private readonly CosmosDBLocationData _data; /// Initializes a new instance of the class for mocking. @@ -61,8 +58,6 @@ internal CosmosDBLocationResource(ArmClient client, ResourceIdentifier id) : bas _cosmosDBLocationLocationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string cosmosDBLocationLocationsApiVersion); _cosmosDBLocationLocationsRestClient = new LocationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cosmosDBLocationLocationsApiVersion); - _mongoClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _mongoClustersRestClient = new MongoClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -204,73 +199,5 @@ public virtual Response Get(CancellationToken cancella throw; } } - - /// - /// Check the availability of name for resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/checkMongoClusterNameAvailability - /// - /// - /// Operation Id - /// MongoClusters_CheckNameAvailability - /// - /// - /// - /// The required parameters for checking if resource name is available. - /// The cancellation token to use. - /// is null. - public virtual async Task> CheckMongoClusterNameAailabilityAsync(CheckCosmosDBNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _mongoClustersClientDiagnostics.CreateScope("CosmosDBLocationResource.CheckMongoClusterNameAailability"); - scope.Start(); - try - { - var response = await _mongoClustersRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, new AzureLocation(Id.Name), content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Check the availability of name for resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/checkMongoClusterNameAvailability - /// - /// - /// Operation Id - /// MongoClusters_CheckNameAvailability - /// - /// - /// - /// The required parameters for checking if resource name is available. - /// The cancellation token to use. - /// is null. - public virtual Response CheckMongoClusterNameAailability(CheckCosmosDBNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _mongoClustersClientDiagnostics.CreateScope("CosmosDBLocationResource.CheckMongoClusterNameAailability"); - scope.Start(); - try - { - var response = _mongoClustersRestClient.CheckNameAvailability(Id.SubscriptionId, new AzureLocation(Id.Name), content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.cs index ae7e65385444..0efa0cb133e7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.cs @@ -33,19 +33,15 @@ public CosmosDBSqlContainerData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal CosmosDBSqlContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlContainerResourceInfo resource, CosmosDBSqlContainerPropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlContainerResourceInfo resource, CosmosDBSqlContainerPropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedCosmosDBSqlContainerResourceInfo Resource { get; set; } /// Gets or sets the options. public CosmosDBSqlContainerPropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.cs index 9f0adfe24022..db6f90591034 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.cs @@ -462,82 +462,6 @@ public virtual ArmOperation Update(WaitUntil waitU } } - /// - /// Merges the partitions of a SQL Container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge - /// - /// - /// Operation Id - /// SqlResources_ListSqlContainerPartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetSqlContainerPartitionMergeAsync(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _cosmosDBSqlContainerSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlContainerResource.GetSqlContainerPartitionMerge"); - scope.Start(); - try - { - var response = await _cosmosDBSqlContainerSqlResourcesRestClient.ListSqlContainerPartitionMergeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _cosmosDBSqlContainerSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlContainerSqlResourcesRestClient.CreateListSqlContainerPartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Merges the partitions of a SQL Container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge - /// - /// - /// Operation Id - /// SqlResources_ListSqlContainerPartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation GetSqlContainerPartitionMerge(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _cosmosDBSqlContainerSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlContainerResource.GetSqlContainerPartitionMerge"); - scope.Start(); - try - { - var response = _cosmosDBSqlContainerSqlResourcesRestClient.ListSqlContainerPartitionMerge(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _cosmosDBSqlContainerSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlContainerSqlResourcesRestClient.CreateListSqlContainerPartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Retrieves continuous backup information for a container resource. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.cs index 20accb66a806..41e30496af8e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.cs @@ -364,158 +364,6 @@ public virtual ArmOperation Migra } } - /// - /// Retrieve throughput distribution for an Azure Cosmos DB SQL container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// SqlResources_SqlContainerRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current SQL container. - /// The cancellation token to use. - /// is null. - public virtual async Task> SqlContainerRetrieveThroughputDistributionAsync(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlContainerThroughputSettingResource.SqlContainerRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = await _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.SqlContainerRetrieveThroughputDistributionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.CreateSqlContainerRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve throughput distribution for an Azure Cosmos DB SQL container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// SqlResources_SqlContainerRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current SQL container. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation SqlContainerRetrieveThroughputDistribution(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlContainerThroughputSettingResource.SqlContainerRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.SqlContainerRetrieveThroughputDistribution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.CreateSqlContainerRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB SQL container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// SqlResources_SqlContainerRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current SQL container. - /// The cancellation token to use. - /// is null. - public virtual async Task> SqlContainerRedistributeThroughputAsync(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlContainerThroughputSettingResource.SqlContainerRedistributeThroughput"); - scope.Start(); - try - { - var response = await _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.SqlContainerRedistributeThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.CreateSqlContainerRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB SQL container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// SqlResources_SqlContainerRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current SQL container. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation SqlContainerRedistributeThroughput(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlContainerThroughputSettingResource.SqlContainerRedistributeThroughput"); - scope.Start(); - try - { - var response = _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.SqlContainerRedistributeThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlContainerThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlContainerThroughputSettingSqlResourcesRestClient.CreateSqlContainerRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.cs index b7f5ca8cc8f4..86c711fcb630 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.cs @@ -33,19 +33,15 @@ public CosmosDBSqlDatabaseData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal CosmosDBSqlDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlDatabaseResourceInfo resource, CosmosDBSqlDatabasePropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlDatabaseResourceInfo resource, CosmosDBSqlDatabasePropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedCosmosDBSqlDatabaseResourceInfo Resource { get; set; } /// Gets or sets the options. public CosmosDBSqlDatabasePropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.cs index 76c3613af7c8..a0b6850fa3aa 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.cs @@ -95,110 +95,110 @@ public virtual CosmosDBSqlDatabaseThroughputSettingResource GetCosmosDBSqlDataba return new CosmosDBSqlDatabaseThroughputSettingResource(Client, Id.AppendChildResource("throughputSettings", "default")); } - /// Gets a collection of CosmosDBSqlClientEncryptionKeyResources in the CosmosDBSqlDatabase. - /// An object representing collection of CosmosDBSqlClientEncryptionKeyResources and their operations over a CosmosDBSqlClientEncryptionKeyResource. - public virtual CosmosDBSqlClientEncryptionKeyCollection GetCosmosDBSqlClientEncryptionKeys() + /// Gets a collection of CosmosDBSqlContainerResources in the CosmosDBSqlDatabase. + /// An object representing collection of CosmosDBSqlContainerResources and their operations over a CosmosDBSqlContainerResource. + public virtual CosmosDBSqlContainerCollection GetCosmosDBSqlContainers() { - return GetCachedClient(Client => new CosmosDBSqlClientEncryptionKeyCollection(Client, Id)); + return GetCachedClient(Client => new CosmosDBSqlContainerCollection(Client, Id)); } /// - /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + /// Gets the SQL container under an existing Azure Cosmos DB database account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName} /// /// /// Operation Id - /// SqlResources_GetClientEncryptionKey + /// SqlResources_GetSqlContainer /// /// /// - /// Cosmos DB ClientEncryptionKey name. + /// Cosmos DB container name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetCosmosDBSqlClientEncryptionKeyAsync(string clientEncryptionKeyName, CancellationToken cancellationToken = default) + public virtual async Task> GetCosmosDBSqlContainerAsync(string containerName, CancellationToken cancellationToken = default) { - return await GetCosmosDBSqlClientEncryptionKeys().GetAsync(clientEncryptionKeyName, cancellationToken).ConfigureAwait(false); + return await GetCosmosDBSqlContainers().GetAsync(containerName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + /// Gets the SQL container under an existing Azure Cosmos DB database account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName} /// /// /// Operation Id - /// SqlResources_GetClientEncryptionKey + /// SqlResources_GetSqlContainer /// /// /// - /// Cosmos DB ClientEncryptionKey name. + /// Cosmos DB container name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetCosmosDBSqlClientEncryptionKey(string clientEncryptionKeyName, CancellationToken cancellationToken = default) + public virtual Response GetCosmosDBSqlContainer(string containerName, CancellationToken cancellationToken = default) { - return GetCosmosDBSqlClientEncryptionKeys().Get(clientEncryptionKeyName, cancellationToken); + return GetCosmosDBSqlContainers().Get(containerName, cancellationToken); } - /// Gets a collection of CosmosDBSqlContainerResources in the CosmosDBSqlDatabase. - /// An object representing collection of CosmosDBSqlContainerResources and their operations over a CosmosDBSqlContainerResource. - public virtual CosmosDBSqlContainerCollection GetCosmosDBSqlContainers() + /// Gets a collection of CosmosDBSqlClientEncryptionKeyResources in the CosmosDBSqlDatabase. + /// An object representing collection of CosmosDBSqlClientEncryptionKeyResources and their operations over a CosmosDBSqlClientEncryptionKeyResource. + public virtual CosmosDBSqlClientEncryptionKeyCollection GetCosmosDBSqlClientEncryptionKeys() { - return GetCachedClient(Client => new CosmosDBSqlContainerCollection(Client, Id)); + return GetCachedClient(Client => new CosmosDBSqlClientEncryptionKeyCollection(Client, Id)); } /// - /// Gets the SQL container under an existing Azure Cosmos DB database account. + /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName} /// /// /// Operation Id - /// SqlResources_GetSqlContainer + /// SqlResources_GetClientEncryptionKey /// /// /// - /// Cosmos DB container name. + /// Cosmos DB ClientEncryptionKey name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetCosmosDBSqlContainerAsync(string containerName, CancellationToken cancellationToken = default) + public virtual async Task> GetCosmosDBSqlClientEncryptionKeyAsync(string clientEncryptionKeyName, CancellationToken cancellationToken = default) { - return await GetCosmosDBSqlContainers().GetAsync(containerName, cancellationToken).ConfigureAwait(false); + return await GetCosmosDBSqlClientEncryptionKeys().GetAsync(clientEncryptionKeyName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the SQL container under an existing Azure Cosmos DB database account. + /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName} /// /// /// Operation Id - /// SqlResources_GetSqlContainer + /// SqlResources_GetClientEncryptionKey /// /// /// - /// Cosmos DB container name. + /// Cosmos DB ClientEncryptionKey name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetCosmosDBSqlContainer(string containerName, CancellationToken cancellationToken = default) + public virtual Response GetCosmosDBSqlClientEncryptionKey(string clientEncryptionKeyName, CancellationToken cancellationToken = default) { - return GetCosmosDBSqlContainers().Get(containerName, cancellationToken); + return GetCosmosDBSqlClientEncryptionKeys().Get(clientEncryptionKeyName, cancellationToken); } /// @@ -409,82 +409,6 @@ public virtual ArmOperation Update(WaitUntil waitUn } } - /// - /// Merges the partitions of a SQL database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/partitionMerge - /// - /// - /// Operation Id - /// SqlResources_SqlDatabasePartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual async Task> SqlDatabasePartitionMergeAsync(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _cosmosDBSqlDatabaseSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlDatabaseResource.SqlDatabasePartitionMerge"); - scope.Start(); - try - { - var response = await _cosmosDBSqlDatabaseSqlResourcesRestClient.SqlDatabasePartitionMergeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _cosmosDBSqlDatabaseSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlDatabaseSqlResourcesRestClient.CreateSqlDatabasePartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Merges the partitions of a SQL database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/partitionMerge - /// - /// - /// Operation Id - /// SqlResources_SqlDatabasePartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation SqlDatabasePartitionMerge(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _cosmosDBSqlDatabaseSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlDatabaseResource.SqlDatabasePartitionMerge"); - scope.Start(); - try - { - var response = _cosmosDBSqlDatabaseSqlResourcesRestClient.SqlDatabasePartitionMerge(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _cosmosDBSqlDatabaseSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlDatabaseSqlResourcesRestClient.CreateSqlDatabasePartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.cs index 600673a0081f..c1983fc87ae7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.cs @@ -364,158 +364,6 @@ public virtual ArmOperation Migrat } } - /// - /// Retrieve throughput distribution for an Azure Cosmos DB SQL database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// SqlResources_SqlDatabaseRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current SQL database. - /// The cancellation token to use. - /// is null. - public virtual async Task> SqlDatabaseRetrieveThroughputDistributionAsync(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlDatabaseThroughputSettingResource.SqlDatabaseRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = await _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.SqlDatabaseRetrieveThroughputDistributionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.CreateSqlDatabaseRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve throughput distribution for an Azure Cosmos DB SQL database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// SqlResources_SqlDatabaseRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current SQL database. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation SqlDatabaseRetrieveThroughputDistribution(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlDatabaseThroughputSettingResource.SqlDatabaseRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.SqlDatabaseRetrieveThroughputDistribution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.CreateSqlDatabaseRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB SQL database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// SqlResources_SqlDatabaseRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current SQL database. - /// The cancellation token to use. - /// is null. - public virtual async Task> SqlDatabaseRedistributeThroughputAsync(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlDatabaseThroughputSettingResource.SqlDatabaseRedistributeThroughput"); - scope.Start(); - try - { - var response = await _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.SqlDatabaseRedistributeThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.CreateSqlDatabaseRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB SQL database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// SqlResources_SqlDatabaseRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current SQL database. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation SqlDatabaseRedistributeThroughput(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics.CreateScope("CosmosDBSqlDatabaseThroughputSettingResource.SqlDatabaseRedistributeThroughput"); - scope.Start(); - try - { - var response = _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.SqlDatabaseRedistributeThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _cosmosDBSqlDatabaseThroughputSettingSqlResourcesClientDiagnostics, Pipeline, _cosmosDBSqlDatabaseThroughputSettingSqlResourcesRestClient.CreateSqlDatabaseRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.cs index 86a1734b7cc9..f983d94d3a48 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.cs @@ -32,16 +32,12 @@ public CosmosDBSqlStoredProcedureData(AzureLocation location) : base(location) /// The tags. /// The location. /// - /// Identity for the resource. - internal CosmosDBSqlStoredProcedureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlStoredProcedureResourceInfo resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlStoredProcedureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlStoredProcedureResourceInfo resource) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; - Identity = identity; } /// Gets or sets the resource. public ExtendedCosmosDBSqlStoredProcedureResourceInfo Resource { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.cs index 79baac9cd2be..da0a2c372d98 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.cs @@ -32,16 +32,12 @@ public CosmosDBSqlTriggerData(AzureLocation location) : base(location) /// The tags. /// The location. /// - /// Identity for the resource. - internal CosmosDBSqlTriggerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlTriggerResourceInfo resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlTriggerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlTriggerResourceInfo resource) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; - Identity = identity; } /// Gets or sets the resource. public ExtendedCosmosDBSqlTriggerResourceInfo Resource { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.cs index 5a64cdab474c..3f0bcbcfe739 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.cs @@ -32,16 +32,12 @@ public CosmosDBSqlUserDefinedFunctionData(AzureLocation location) : base(locatio /// The tags. /// The location. /// - /// Identity for the resource. - internal CosmosDBSqlUserDefinedFunctionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlUserDefinedFunctionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo resource) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; - Identity = identity; } /// Gets or sets the resource. public ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo Resource { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.cs index 924cddf84198..011e42dfdcb3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.cs @@ -33,19 +33,15 @@ public CosmosDBTableData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal CosmosDBTableData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBTablePropertiesResource resource, CosmosDBTablePropertiesOptions options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBTableData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBTablePropertiesResource resource, CosmosDBTablePropertiesOptions options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public CosmosDBTablePropertiesResource Resource { get; set; } /// Gets or sets the options. public CosmosDBTablePropertiesOptions Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultCollection.cs deleted file mode 100644 index 640228857d9e..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultCollection.cs +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataTransferJobGetResults method from an instance of . - /// - public partial class DataTransferJobGetResultCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataTransferJobGetResultDataTransferJobsClientDiagnostics; - private readonly DataTransferJobsRestOperations _dataTransferJobGetResultDataTransferJobsRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataTransferJobGetResultCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataTransferJobGetResultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataTransferJobGetResultDataTransferJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", DataTransferJobGetResultResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataTransferJobGetResultResource.ResourceType, out string dataTransferJobGetResultDataTransferJobsApiVersion); - _dataTransferJobGetResultDataTransferJobsRestClient = new DataTransferJobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataTransferJobGetResultDataTransferJobsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != CosmosDBAccountResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CosmosDBAccountResource.ResourceType), nameof(id)); - } - - /// - /// Creates a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Data Transfer Job. - /// The DataTransferJobGetResultCreateOrUpdateContent to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string jobName, DataTransferJobGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, content, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(Response.FromValue(new DataTransferJobGetResultResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Data Transfer Job. - /// The DataTransferJobGetResultCreateOrUpdateContent to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string jobName, DataTransferJobGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, content, cancellationToken); - var operation = new CosmosDBArmOperation(Response.FromValue(new DataTransferJobGetResultResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultCollection.Get"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultCollection.Get"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a list of Data Transfer jobs. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs - /// - /// - /// Operation Id - /// DataTransferJobs_ListByDatabaseAccount - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataTransferJobGetResultDataTransferJobsRestClient.CreateListByDatabaseAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataTransferJobGetResultDataTransferJobsRestClient.CreateListByDatabaseAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataTransferJobGetResultResource(Client, DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(e)), _dataTransferJobGetResultDataTransferJobsClientDiagnostics, Pipeline, "DataTransferJobGetResultCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Get a list of Data Transfer jobs. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs - /// - /// - /// Operation Id - /// DataTransferJobs_ListByDatabaseAccount - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataTransferJobGetResultDataTransferJobsRestClient.CreateListByDatabaseAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataTransferJobGetResultDataTransferJobsRestClient.CreateListByDatabaseAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataTransferJobGetResultResource(Client, DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(e)), _dataTransferJobGetResultDataTransferJobsClientDiagnostics, Pipeline, "DataTransferJobGetResultCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultCollection.Exists"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultCollection.Exists"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.cs deleted file mode 100644 index 335de32d2db2..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing the DataTransferJobGetResult data model. - /// A Cosmos DB Data Transfer Job - /// - public partial class DataTransferJobGetResultData : ResourceData - { - /// Initializes a new instance of DataTransferJobGetResultData. - public DataTransferJobGetResultData() - { - } - - /// Initializes a new instance of DataTransferJobGetResultData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Job Name. - /// - /// Source DataStore details - /// 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 . - /// - /// - /// Destination DataStore details - /// 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. - /// Last Updated Time (ISO-8601 format). - /// Worker count. - /// Error response for Faulted job. - 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, ErrorResponse error) : base(id, name, resourceType, systemData) - { - JobName = jobName; - Source = source; - Destination = destination; - Status = status; - ProcessedCount = processedCount; - TotalCount = totalCount; - LastUpdatedUtcOn = lastUpdatedUtcOn; - WorkerCount = workerCount; - Error = error; - } - - /// Job Name. - public string JobName { get; } - /// - /// Source DataStore details - /// 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 DataTransferDataSourceSink Source { get; set; } - /// - /// Destination DataStore details - /// 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 DataTransferDataSourceSink Destination { get; set; } - /// Job Status. - public string Status { get; } - /// Processed Count. - public long? ProcessedCount { get; } - /// Total Count. - public long? TotalCount { get; } - /// Last Updated Time (ISO-8601 format). - public DateTimeOffset? LastUpdatedUtcOn { get; } - /// Worker count. - public int? WorkerCount { get; set; } - /// Error response for Faulted job. - public ErrorResponse Error { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultResource.cs deleted file mode 100644 index 2a9b057da266..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultResource.cs +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A Class representing a DataTransferJobGetResult along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataTransferJobGetResultResource method. - /// Otherwise you can get one from its parent resource using the GetDataTransferJobGetResult method. - /// - public partial class DataTransferJobGetResultResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string jobName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataTransferJobGetResultDataTransferJobsClientDiagnostics; - private readonly DataTransferJobsRestOperations _dataTransferJobGetResultDataTransferJobsRestClient; - private readonly DataTransferJobGetResultData _data; - - /// Initializes a new instance of the class for mocking. - protected DataTransferJobGetResultResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataTransferJobGetResultResource(ArmClient client, DataTransferJobGetResultData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataTransferJobGetResultResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataTransferJobGetResultDataTransferJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataTransferJobGetResultDataTransferJobsApiVersion); - _dataTransferJobGetResultDataTransferJobsRestClient = new DataTransferJobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataTransferJobGetResultDataTransferJobsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DocumentDB/databaseAccounts/dataTransferJobs"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataTransferJobGetResultData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Get"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Get"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The DataTransferJobGetResultCreateOrUpdateContent to use. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataTransferJobGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Update"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(Response.FromValue(new DataTransferJobGetResultResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName} - /// - /// - /// Operation Id - /// DataTransferJobs_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The DataTransferJobGetResultCreateOrUpdateContent to use. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataTransferJobGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Update"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new CosmosDBArmOperation(Response.FromValue(new DataTransferJobGetResultResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Pause a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause - /// - /// - /// Operation Id - /// DataTransferJobs_Pause - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> PauseAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Pause"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.PauseAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Pause a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause - /// - /// - /// Operation Id - /// DataTransferJobs_Pause - /// - /// - /// - /// The cancellation token to use. - public virtual Response Pause(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Pause"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Pause(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Resumes a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume - /// - /// - /// Operation Id - /// DataTransferJobs_Resume - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> ResumeAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Resume"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.ResumeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Resumes a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume - /// - /// - /// Operation Id - /// DataTransferJobs_Resume - /// - /// - /// - /// The cancellation token to use. - public virtual Response Resume(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Resume"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Resume(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Cancels a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel - /// - /// - /// Operation Id - /// DataTransferJobs_Cancel - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> CancelAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Cancel"); - scope.Start(); - try - { - var response = await _dataTransferJobGetResultDataTransferJobsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Cancels a Data Transfer Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel - /// - /// - /// Operation Id - /// DataTransferJobs_Cancel - /// - /// - /// - /// The cancellation token to use. - public virtual Response Cancel(CancellationToken cancellationToken = default) - { - using var scope = _dataTransferJobGetResultDataTransferJobsClientDiagnostics.CreateScope("DataTransferJobGetResultResource.Cancel"); - scope.Start(); - try - { - var response = _dataTransferJobGetResultDataTransferJobsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DataTransferJobGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/CosmosDBExtensions.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/CosmosDBExtensions.cs index b1a35e4957e0..e73204a62f8a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/CosmosDBExtensions.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/CosmosDBExtensions.cs @@ -84,25 +84,6 @@ public static CosmosDBAccountResource GetCosmosDBAccountResource(this ArmClient } #endregion - #region GraphResourceGetResultResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static GraphResourceGetResultResource GetGraphResourceGetResultResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - GraphResourceGetResultResource.ValidateResourceId(id); - return new GraphResourceGetResultResource(client, id); - } - ); - } - #endregion - #region CosmosDBSqlDatabaseResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -255,25 +236,6 @@ public static CassandraTableThroughputSettingResource GetCassandraTableThroughpu } #endregion - #region CassandraViewThroughputSettingResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static CassandraViewThroughputSettingResource GetCassandraViewThroughputSettingResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - CassandraViewThroughputSettingResource.ValidateResourceId(id); - return new CassandraViewThroughputSettingResource(client, id); - } - ); - } - #endregion - #region GremlinDatabaseThroughputSettingResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -312,39 +274,39 @@ public static GremlinGraphThroughputSettingResource GetGremlinGraphThroughputSet } #endregion - #region CosmosDBSqlClientEncryptionKeyResource + #region CosmosDBSqlContainerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static CosmosDBSqlClientEncryptionKeyResource GetCosmosDBSqlClientEncryptionKeyResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static CosmosDBSqlContainerResource GetCosmosDBSqlContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - CosmosDBSqlClientEncryptionKeyResource.ValidateResourceId(id); - return new CosmosDBSqlClientEncryptionKeyResource(client, id); + CosmosDBSqlContainerResource.ValidateResourceId(id); + return new CosmosDBSqlContainerResource(client, id); } ); } #endregion - #region CosmosDBSqlContainerResource + #region CosmosDBSqlClientEncryptionKeyResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static CosmosDBSqlContainerResource GetCosmosDBSqlContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static CosmosDBSqlClientEncryptionKeyResource GetCosmosDBSqlClientEncryptionKeyResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - CosmosDBSqlContainerResource.ValidateResourceId(id); - return new CosmosDBSqlContainerResource(client, id); + CosmosDBSqlClientEncryptionKeyResource.ValidateResourceId(id); + return new CosmosDBSqlClientEncryptionKeyResource(client, id); } ); } @@ -578,25 +540,6 @@ public static CassandraTableResource GetCassandraTableResource(this ArmClient cl } #endregion - #region CassandraViewGetResultResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static CassandraViewGetResultResource GetCassandraViewGetResultResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - CassandraViewGetResultResource.ValidateResourceId(id); - return new CassandraViewGetResultResource(client, id); - } - ); - } - #endregion - #region GremlinDatabaseResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -654,25 +597,6 @@ public static CosmosDBLocationResource GetCosmosDBLocationResource(this ArmClien } #endregion - #region DataTransferJobGetResultResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataTransferJobGetResultResource GetDataTransferJobGetResultResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataTransferJobGetResultResource.ValidateResourceId(id); - return new DataTransferJobGetResultResource(client, id); - } - ); - } - #endregion - #region CassandraClusterResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -692,25 +616,6 @@ public static CassandraClusterResource GetCassandraClusterResource(this ArmClien } #endregion - #region CassandraClusterBackupResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static CassandraClusterBackupResource GetCassandraClusterBackupResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - CassandraClusterBackupResource.ValidateResourceId(id); - return new CassandraClusterBackupResource(client, id); - } - ); - } - #endregion - #region CassandraDataCenterResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -730,44 +635,6 @@ public static CassandraDataCenterResource GetCassandraDataCenterResource(this Ar } #endregion - #region MongoClusterResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static MongoClusterResource GetMongoClusterResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - MongoClusterResource.ValidateResourceId(id); - return new MongoClusterResource(client, id); - } - ); - } - #endregion - - #region CosmosDBFirewallRuleResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static CosmosDBFirewallRuleResource GetCosmosDBFirewallRuleResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - CosmosDBFirewallRuleResource.ValidateResourceId(id); - return new CosmosDBFirewallRuleResource(client, id); - } - ); - } - #endregion - #region CosmosDBPrivateEndpointConnectionResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -956,62 +823,6 @@ public static Response GetCassandraCluster(this Resour return resourceGroupResource.GetCassandraClusters().Get(clusterName, cancellationToken); } - /// Gets a collection of MongoClusterResources in the ResourceGroupResource. - /// The instance the method will execute against. - /// An object representing collection of MongoClusterResources and their operations over a MongoClusterResource. - public static MongoClusterCollection GetMongoClusters(this ResourceGroupResource resourceGroupResource) - { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetMongoClusters(); - } - - /// - /// Gets information about a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetMongoClusterAsync(this ResourceGroupResource resourceGroupResource, string mongoClusterName, CancellationToken cancellationToken = default) - { - return await resourceGroupResource.GetMongoClusters().GetAsync(mongoClusterName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets information about a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetMongoCluster(this ResourceGroupResource resourceGroupResource, string mongoClusterName, CancellationToken cancellationToken = default) - { - return resourceGroupResource.GetMongoClusters().Get(mongoClusterName, cancellationToken); - } - /// Gets a collection of CosmosDBLocationResources in the SubscriptionResource. /// The instance the method will execute against. /// An object representing collection of CosmosDBLocationResources and their operations over a CosmosDBLocationResource. @@ -1148,48 +959,6 @@ public static Pageable GetCassandraClusters(this Subsc return GetSubscriptionResourceExtensionClient(subscriptionResource).GetCassandraClusters(cancellationToken); } - /// - /// List all the mongo clusters in a given subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/mongoClusters - /// - /// - /// Operation Id - /// MongoClusters_List - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetMongoClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMongoClustersAsync(cancellationToken); - } - - /// - /// List all the mongo clusters in a given subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/mongoClusters - /// - /// - /// Operation Id - /// MongoClusters_List - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetMongoClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMongoClusters(cancellationToken); - } - /// /// Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 16288351d958..7e3f846bf4fe 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -44,12 +44,5 @@ public virtual CassandraClusterCollection GetCassandraClusters() { return GetCachedClient(Client => new CassandraClusterCollection(Client, Id)); } - - /// Gets a collection of MongoClusterResources in the ResourceGroupResource. - /// An object representing collection of MongoClusterResources and their operations over a MongoClusterResource. - public virtual MongoClusterCollection GetMongoClusters() - { - return GetCachedClient(Client => new MongoClusterCollection(Client, Id)); - } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 0819db0205f4..f21376ad168c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -20,8 +20,6 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource private DatabaseAccountsRestOperations _cosmosDBAccountDatabaseAccountsRestClient; private ClientDiagnostics _cassandraClusterClientDiagnostics; private CassandraClustersRestOperations _cassandraClusterRestClient; - private ClientDiagnostics _mongoClusterClientDiagnostics; - private MongoClustersRestOperations _mongoClusterRestClient; private ClientDiagnostics _restorableCosmosDBAccountRestorableDatabaseAccountsClientDiagnostics; private RestorableDatabaseAccountsRestOperations _restorableCosmosDBAccountRestorableDatabaseAccountsRestClient; @@ -41,8 +39,6 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie private DatabaseAccountsRestOperations CosmosDBAccountDatabaseAccountsRestClient => _cosmosDBAccountDatabaseAccountsRestClient ??= new DatabaseAccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CosmosDBAccountResource.ResourceType)); private ClientDiagnostics CassandraClusterClientDiagnostics => _cassandraClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CosmosDB", CassandraClusterResource.ResourceType.Namespace, Diagnostics); private CassandraClustersRestOperations CassandraClusterRestClient => _cassandraClusterRestClient ??= new CassandraClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CassandraClusterResource.ResourceType)); - private ClientDiagnostics MongoClusterClientDiagnostics => _mongoClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CosmosDB", MongoClusterResource.ResourceType.Namespace, Diagnostics); - private MongoClustersRestOperations MongoClusterRestClient => _mongoClusterRestClient ??= new MongoClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MongoClusterResource.ResourceType)); private ClientDiagnostics RestorableCosmosDBAccountRestorableDatabaseAccountsClientDiagnostics => _restorableCosmosDBAccountRestorableDatabaseAccountsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CosmosDB", RestorableCosmosDBAccountResource.ResourceType.Namespace, Diagnostics); private RestorableDatabaseAccountsRestOperations RestorableCosmosDBAccountRestorableDatabaseAccountsRestClient => _restorableCosmosDBAccountRestorableDatabaseAccountsRestClient ??= new RestorableDatabaseAccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(RestorableCosmosDBAccountResource.ResourceType)); @@ -143,50 +139,6 @@ public virtual Pageable GetCassandraClusters(Cancellat return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new CassandraClusterResource(Client, CassandraClusterData.DeserializeCassandraClusterData(e)), CassandraClusterClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetCassandraClusters", "value", null, cancellationToken); } - /// - /// List all the mongo clusters in a given subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/mongoClusters - /// - /// - /// Operation Id - /// MongoClusters_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetMongoClustersAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MongoClusterRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MongoClusterRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MongoClusterResource(Client, MongoClusterData.DeserializeMongoClusterData(e)), MongoClusterClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMongoClusters", "value", "nextLink", cancellationToken); - } - - /// - /// List all the mongo clusters in a given subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/mongoClusters - /// - /// - /// Operation Id - /// MongoClusters_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetMongoClusters(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MongoClusterRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MongoClusterRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MongoClusterResource(Client, MongoClusterData.DeserializeMongoClusterData(e)), MongoClusterClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMongoClusters", "value", "nextLink", cancellationToken); - } - /// /// Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultCollection.cs deleted file mode 100644 index 4645e03e7003..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultCollection.cs +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetGraphResourceGetResults method from an instance of . - /// - public partial class GraphResourceGetResultCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _graphResourceGetResultGraphResourcesClientDiagnostics; - private readonly GraphResourcesRestOperations _graphResourceGetResultGraphResourcesRestClient; - - /// Initializes a new instance of the class for mocking. - protected GraphResourceGetResultCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal GraphResourceGetResultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _graphResourceGetResultGraphResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", GraphResourceGetResultResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(GraphResourceGetResultResource.ResourceType, out string graphResourceGetResultGraphResourcesApiVersion); - _graphResourceGetResultGraphResourcesRestClient = new GraphResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, graphResourceGetResultGraphResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != CosmosDBAccountResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CosmosDBAccountResource.ResourceType), nameof(id)); - } - - /// - /// Create or update an Azure Cosmos DB Graph. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_CreateUpdateGraph - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Cosmos DB graph resource name. - /// The parameters to provide for the current graph. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string graphName, GraphResourceGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _graphResourceGetResultGraphResourcesRestClient.CreateUpdateGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, content, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new GraphResourceGetResultOperationSource(Client), _graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, _graphResourceGetResultGraphResourcesRestClient.CreateCreateUpdateGraphRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update an Azure Cosmos DB Graph. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_CreateUpdateGraph - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Cosmos DB graph resource name. - /// The parameters to provide for the current graph. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string graphName, GraphResourceGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _graphResourceGetResultGraphResourcesRestClient.CreateUpdateGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, content, cancellationToken); - var operation = new CosmosDBArmOperation(new GraphResourceGetResultOperationSource(Client), _graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, _graphResourceGetResultGraphResourcesRestClient.CreateCreateUpdateGraphRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultCollection.Get"); - scope.Start(); - try - { - var response = await _graphResourceGetResultGraphResourcesRestClient.GetGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new GraphResourceGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultCollection.Get"); - scope.Start(); - try - { - var response = _graphResourceGetResultGraphResourcesRestClient.GetGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new GraphResourceGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the graphs under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs - /// - /// - /// Operation Id - /// GraphResources_ListGraphs - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _graphResourceGetResultGraphResourcesRestClient.CreateListGraphsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new GraphResourceGetResultResource(Client, GraphResourceGetResultData.DeserializeGraphResourceGetResultData(e)), _graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, "GraphResourceGetResultCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Lists the graphs under an existing Azure Cosmos DB database account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs - /// - /// - /// Operation Id - /// GraphResources_ListGraphs - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _graphResourceGetResultGraphResourcesRestClient.CreateListGraphsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new GraphResourceGetResultResource(Client, GraphResourceGetResultData.DeserializeGraphResourceGetResultData(e)), _graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, "GraphResourceGetResultCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultCollection.Exists"); - scope.Start(); - try - { - var response = await _graphResourceGetResultGraphResourcesRestClient.GetGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultCollection.Exists"); - scope.Start(); - try - { - var response = _graphResourceGetResultGraphResourcesRestClient.GetGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, graphName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultData.cs deleted file mode 100644 index 7d8886fa3f4d..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultData.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing the GraphResourceGetResult data model. - /// An Azure Cosmos DB Graph resource. - /// - public partial class GraphResourceGetResultData : TrackedResourceData - { - /// Initializes a new instance of GraphResourceGetResultData. - /// The location. - public GraphResourceGetResultData(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of GraphResourceGetResultData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Gets or sets the resource. - /// - /// Identity for the resource. - internal GraphResourceGetResultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WritableSubResource resource, GraphResourceGetPropertiesOptions options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) - { - Resource = resource; - Options = options; - Identity = identity; - } - - /// Gets or sets the resource. - internal WritableSubResource Resource { get; set; } - /// Gets or sets Id. - public ResourceIdentifier ResourceId - { - get => Resource is null ? default : Resource.Id; - set - { - if (Resource is null) - Resource = new WritableSubResource(); - Resource.Id = value; - } - } - - /// Gets or sets the options. - public GraphResourceGetPropertiesOptions Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultResource.cs deleted file mode 100644 index 1b4e5c80018d..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultResource.cs +++ /dev/null @@ -1,609 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A Class representing a GraphResourceGetResult along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetGraphResourceGetResultResource method. - /// Otherwise you can get one from its parent resource using the GetGraphResourceGetResult method. - /// - public partial class GraphResourceGetResultResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string graphName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _graphResourceGetResultGraphResourcesClientDiagnostics; - private readonly GraphResourcesRestOperations _graphResourceGetResultGraphResourcesRestClient; - private readonly GraphResourceGetResultData _data; - - /// Initializes a new instance of the class for mocking. - protected GraphResourceGetResultResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal GraphResourceGetResultResource(ArmClient client, GraphResourceGetResultData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal GraphResourceGetResultResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _graphResourceGetResultGraphResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string graphResourceGetResultGraphResourcesApiVersion); - _graphResourceGetResultGraphResourcesRestClient = new GraphResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, graphResourceGetResultGraphResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DocumentDB/databaseAccounts/graphs"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual GraphResourceGetResultData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.Get"); - scope.Start(); - try - { - var response = await _graphResourceGetResultGraphResourcesRestClient.GetGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new GraphResourceGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.Get"); - scope.Start(); - try - { - var response = _graphResourceGetResultGraphResourcesRestClient.GetGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new GraphResourceGetResultResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an existing Azure Cosmos DB Graph Resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_DeleteGraphResource - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.Delete"); - scope.Start(); - try - { - var response = await _graphResourceGetResultGraphResourcesRestClient.DeleteGraphResourceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(_graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, _graphResourceGetResultGraphResourcesRestClient.CreateDeleteGraphResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an existing Azure Cosmos DB Graph Resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_DeleteGraphResource - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.Delete"); - scope.Start(); - try - { - var response = _graphResourceGetResultGraphResourcesRestClient.DeleteGraphResource(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new CosmosDBArmOperation(_graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, _graphResourceGetResultGraphResourcesRestClient.CreateDeleteGraphResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update an Azure Cosmos DB Graph. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_CreateUpdateGraph - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for the current graph. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, GraphResourceGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.Update"); - scope.Start(); - try - { - var response = await _graphResourceGetResultGraphResourcesRestClient.CreateUpdateGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new GraphResourceGetResultOperationSource(Client), _graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, _graphResourceGetResultGraphResourcesRestClient.CreateCreateUpdateGraphRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update an Azure Cosmos DB Graph. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_CreateUpdateGraph - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for the current graph. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, GraphResourceGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.Update"); - scope.Start(); - try - { - var response = _graphResourceGetResultGraphResourcesRestClient.CreateUpdateGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new CosmosDBArmOperation(new GraphResourceGetResultOperationSource(Client), _graphResourceGetResultGraphResourcesClientDiagnostics, Pipeline, _graphResourceGetResultGraphResourcesRestClient.CreateCreateUpdateGraphRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _graphResourceGetResultGraphResourcesRestClient.GetGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new GraphResourceGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new GraphResourceGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _graphResourceGetResultGraphResourcesRestClient.GetGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new GraphResourceGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new GraphResourceGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _graphResourceGetResultGraphResourcesRestClient.GetGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new GraphResourceGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new GraphResourceGetResultCreateOrUpdateContent(current.Location, current.Resource); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _graphResourceGetResultGraphResourcesRestClient.GetGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new GraphResourceGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new GraphResourceGetResultCreateOrUpdateContent(current.Location, current.Resource); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _graphResourceGetResultGraphResourcesRestClient.GetGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new GraphResourceGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new GraphResourceGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName} - /// - /// - /// Operation Id - /// GraphResources_GetGraph - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _graphResourceGetResultGraphResourcesClientDiagnostics.CreateScope("GraphResourceGetResultResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _graphResourceGetResultGraphResourcesRestClient.GetGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new GraphResourceGetResultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new GraphResourceGetResultCreateOrUpdateContent(current.Location, current.Resource); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.cs index a78493b5595f..3bc737033a4a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.cs @@ -33,19 +33,15 @@ public GremlinDatabaseData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal GremlinDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedGremlinDatabaseResourceInfo resource, GremlinDatabasePropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal GremlinDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedGremlinDatabaseResourceInfo resource, GremlinDatabasePropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedGremlinDatabaseResourceInfo Resource { get; set; } /// Gets or sets the options. public GremlinDatabasePropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.cs index 4ae2bcd34a7c..f90ee415deab 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.cs @@ -33,19 +33,15 @@ public GremlinGraphData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal GremlinGraphData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedGremlinGraphResourceInfo resource, GremlinGraphPropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal GremlinGraphData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedGremlinGraphResourceInfo resource, GremlinGraphPropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedGremlinGraphResourceInfo Resource { get; set; } /// Gets or sets the options. public GremlinGraphPropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraKeyspaceThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraKeyspaceThroughputSettingOperationSource.cs index 3c737fca921e..39a9f8980eda 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraKeyspaceThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraKeyspaceThroughputSettingOperationSource.cs @@ -63,8 +63,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraTableThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraTableThroughputSettingOperationSource.cs index e73385bb40b6..ed947f3bfa4b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraTableThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraTableThroughputSettingOperationSource.cs @@ -65,8 +65,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraViewGetResultOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraViewGetResultOperationSource.cs deleted file mode 100644 index 0c7c06da7c52..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraViewGetResultOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - internal class CassandraViewGetResultOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal CassandraViewGetResultOperationSource(ArmClient client) - { - _client = client; - } - - CassandraViewGetResultResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = CassandraViewGetResultData.DeserializeCassandraViewGetResultData(document.RootElement); - return new CassandraViewGetResultResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = CassandraViewGetResultData.DeserializeCassandraViewGetResultData(document.RootElement); - return new CassandraViewGetResultResource(_client, data); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraViewThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraViewThroughputSettingOperationSource.cs deleted file mode 100644 index dd957dd64b40..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CassandraViewThroughputSettingOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - internal class CassandraViewThroughputSettingOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal CassandraViewThroughputSettingOperationSource(ArmClient client) - { - _client = client; - } - - CassandraViewThroughputSettingResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = ThroughputSettingData.DeserializeThroughputSettingData(document.RootElement); - return new CassandraViewThroughputSettingResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = ThroughputSettingData.DeserializeThroughputSettingData(document.RootElement); - return new CassandraViewThroughputSettingResource(_client, data); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBFirewallRuleOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBFirewallRuleOperationSource.cs deleted file mode 100644 index 0e5dbc79f64c..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBFirewallRuleOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - internal class CosmosDBFirewallRuleOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal CosmosDBFirewallRuleOperationSource(ArmClient client) - { - _client = client; - } - - CosmosDBFirewallRuleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = CosmosDBFirewallRuleData.DeserializeCosmosDBFirewallRuleData(document.RootElement); - return new CosmosDBFirewallRuleResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = CosmosDBFirewallRuleData.DeserializeCosmosDBFirewallRuleData(document.RootElement); - return new CosmosDBFirewallRuleResource(_client, data); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlContainerThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlContainerThroughputSettingOperationSource.cs index 322be317a5cf..b4f0aaababc5 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlContainerThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlContainerThroughputSettingOperationSource.cs @@ -65,8 +65,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlDatabaseThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlDatabaseThroughputSettingOperationSource.cs index fe70de90c747..f74729bd14af 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlDatabaseThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosDBSqlDatabaseThroughputSettingOperationSource.cs @@ -63,8 +63,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosTableThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosTableThroughputSettingOperationSource.cs index fea7ab44d676..9b1465497124 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosTableThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/CosmosTableThroughputSettingOperationSource.cs @@ -63,8 +63,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GraphResourceGetResultOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GraphResourceGetResultOperationSource.cs deleted file mode 100644 index e43b064b4649..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GraphResourceGetResultOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - internal class GraphResourceGetResultOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal GraphResourceGetResultOperationSource(ArmClient client) - { - _client = client; - } - - GraphResourceGetResultResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = GraphResourceGetResultData.DeserializeGraphResourceGetResultData(document.RootElement); - return new GraphResourceGetResultResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = GraphResourceGetResultData.DeserializeGraphResourceGetResultData(document.RootElement); - return new GraphResourceGetResultResource(_client, data); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinDatabaseThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinDatabaseThroughputSettingOperationSource.cs index 6a9bfc8ae7cd..deb2dc544af4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinDatabaseThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinDatabaseThroughputSettingOperationSource.cs @@ -63,8 +63,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinGraphThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinGraphThroughputSettingOperationSource.cs index c527142d7541..a35161634a25 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinGraphThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/GremlinGraphThroughputSettingOperationSource.cs @@ -65,8 +65,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoClusterOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoClusterOperationSource.cs deleted file mode 100644 index 41a2039c3e06..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoClusterOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CosmosDB -{ - internal class MongoClusterOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal MongoClusterOperationSource(ArmClient client) - { - _client = client; - } - - MongoClusterResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = MongoClusterData.DeserializeMongoClusterData(document.RootElement); - return new MongoClusterResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = MongoClusterData.DeserializeMongoClusterData(document.RootElement); - return new MongoClusterResource(_client, data); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBCollectionThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBCollectionThroughputSettingOperationSource.cs index 9aada688f912..bdcfb14e1750 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBCollectionThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBCollectionThroughputSettingOperationSource.cs @@ -65,8 +65,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBDatabaseThroughputSettingOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBDatabaseThroughputSettingOperationSource.cs index b6fdba59a563..bab87d7304d6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBDatabaseThroughputSettingOperationSource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/MongoDBDatabaseThroughputSettingOperationSource.cs @@ -63,8 +63,7 @@ private ThroughputSettingData ScrubId(ThroughputSettingData data) data.SystemData, data.Tags, data.Location, - data.Resource, - data.Identity); + data.Resource); } private string GetName(string param, ResourceIdentifier id) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/PhysicalPartitionStorageInfoCollectionOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/PhysicalPartitionStorageInfoCollectionOperationSource.cs deleted file mode 100644 index 0ccc40ff6f28..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/PhysicalPartitionStorageInfoCollectionOperationSource.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - internal class PhysicalPartitionStorageInfoCollectionOperationSource : IOperationSource - { - PhysicalPartitionStorageInfoCollection IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return PhysicalPartitionStorageInfoCollection.DeserializePhysicalPartitionStorageInfoCollection(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return PhysicalPartitionStorageInfoCollection.DeserializePhysicalPartitionStorageInfoCollection(document.RootElement); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/PhysicalPartitionThroughputInfoResultOperationSource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/PhysicalPartitionThroughputInfoResultOperationSource.cs deleted file mode 100644 index fd97947ed5dc..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/LongRunningOperation/PhysicalPartitionThroughputInfoResultOperationSource.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - internal class PhysicalPartitionThroughputInfoResultOperationSource : IOperationSource - { - PhysicalPartitionThroughputInfoResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return PhysicalPartitionThroughputInfoResult.DeserializePhysicalPartitionThroughputInfoResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return PhysicalPartitionThroughputInfoResult.DeserializePhysicalPartitionThroughputInfoResult(document.RootElement); - } - } -} 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 deleted file mode 100644 index 94ade54edd53..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class AzureBlobDataTransferDataSourceSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUrl"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - writer.WriteEndObject(); - } - - internal static AzureBlobDataTransferDataSourceSink DeserializeAzureBlobDataTransferDataSourceSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string containerName = default; - Optional endpointUrl = default; - DataTransferComponent component = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("containerName"u8)) - { - containerName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpointUrl"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointUrl = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("component"u8)) - { - component = new DataTransferComponent(property.Value.GetString()); - continue; - } - } - return new AzureBlobDataTransferDataSourceSink(component, containerName, endpointUrl.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.cs deleted file mode 100644 index ab3c7f67e4a1..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// An Azure Blob Storage data source/sink. - public partial class AzureBlobDataTransferDataSourceSink : DataTransferDataSourceSink - { - /// Initializes a new instance of AzureBlobDataTransferDataSourceSink. - /// - /// is null. - public AzureBlobDataTransferDataSourceSink(string containerName) - { - Argument.AssertNotNull(containerName, nameof(containerName)); - - ContainerName = containerName; - Component = DataTransferComponent.AzureBlobStorage; - } - - /// Initializes a new instance of AzureBlobDataTransferDataSourceSink. - /// - /// - /// - internal AzureBlobDataTransferDataSourceSink(DataTransferComponent component, string containerName, Uri endpointUri) : base(component) - { - ContainerName = containerName; - EndpointUri = endpointUri; - Component = component; - } - - /// Gets or sets the container name. - public string ContainerName { get; set; } - /// Gets or sets the endpoint uri. - public Uri EndpointUri { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupResourceProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupResourceProperties.Serialization.cs deleted file mode 100644 index c3eefe00ba27..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupResourceProperties.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class BackupResourceProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - writer.WriteEndObject(); - } - - internal static BackupResourceProperties DeserializeBackupResourceProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional timestamp = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("timestamp"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timestamp = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new BackupResourceProperties(Optional.ToNullable(timestamp)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupResourceProperties.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupResourceProperties.cs deleted file mode 100644 index 4ebac73a40b3..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupResourceProperties.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The BackupResourceProperties. - internal partial class BackupResourceProperties - { - /// Initializes a new instance of BackupResourceProperties. - public BackupResourceProperties() - { - } - - /// Initializes a new instance of BackupResourceProperties. - /// The time this backup was taken, formatted like 2021-01-21T17:35:21. - internal BackupResourceProperties(DateTimeOffset? timestamp) - { - Timestamp = timestamp; - } - - /// The time this backup was taken, formatted like 2021-01-21T17:35:21. - public DateTimeOffset? Timestamp { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupResourceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupResourceData.Serialization.cs deleted file mode 100644 index 6f2b4ee52dd7..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupResourceData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - public partial class CassandraClusterBackupResourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - writer.WriteEndObject(); - } - - internal static CassandraClusterBackupResourceData DeserializeCassandraClusterBackupResourceData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = BackupResourceProperties.DeserializeBackupResourceProperties(property.Value); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new CassandraClusterBackupResourceData(id, name, type, systemData.Value, properties.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs index 710273fa1ddb..f26ed71dfb85 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CassandraKeyspaceCreateOrUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CassandraKeyspaceCreateOrUpdateContent DeserializeCassandraKeysp { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CassandraKeyspaceCreateOrUpdateContent DeserializeCassandraKeysp Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CassandraKeyspaceCreateOrUpdateContent DeserializeCassandraKeysp continue; } } - return new CassandraKeyspaceCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CassandraKeyspaceCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.cs index 817e47628cd2..98f06b01c837 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.cs @@ -35,12 +35,10 @@ public CassandraKeyspaceCreateOrUpdateContent(AzureLocation location, CassandraK /// The location. /// The standard JSON format of a Cassandra keyspace. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CassandraKeyspaceCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CassandraKeyspaceResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CassandraKeyspaceCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CassandraKeyspaceResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a Cassandra keyspace. @@ -54,7 +52,5 @@ public string ResourceKeyspaceName /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceData.Serialization.cs index f668cc32805e..49671fc14de1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CassandraKeyspaceData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static CassandraKeyspaceData DeserializeCassandraKeyspaceData(JsonEleme { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static CassandraKeyspaceData DeserializeCassandraKeyspaceData(JsonEleme Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static CassandraKeyspaceData DeserializeCassandraKeyspaceData(JsonEleme continue; } } - return new CassandraKeyspaceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new CassandraKeyspaceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs index 1fefbd338866..0c620a0b2fe0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CassandraTableCreateOrUpdateContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CassandraTableCreateOrUpdateContent DeserializeCassandraTableCre { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CassandraTableCreateOrUpdateContent DeserializeCassandraTableCre Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CassandraTableCreateOrUpdateContent DeserializeCassandraTableCre continue; } } - return new CassandraTableCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CassandraTableCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.cs index 18bc4802d0da..36c4326d2914 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.cs @@ -35,19 +35,15 @@ public CassandraTableCreateOrUpdateContent(AzureLocation location, CassandraTabl /// The location. /// The standard JSON format of a Cassandra table. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CassandraTableCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CassandraTableResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CassandraTableCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CassandraTableResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a Cassandra table. public CassandraTableResourceInfo Resource { get; set; } /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableData.Serialization.cs index 50acc6db9cfd..836d817fb40b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CassandraTableData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static CassandraTableData DeserializeCassandraTableData(JsonElement ele { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static CassandraTableData DeserializeCassandraTableData(JsonElement ele Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static CassandraTableData DeserializeCassandraTableData(JsonElement ele continue; } } - return new CassandraTableData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new CassandraTableData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.Serialization.cs deleted file mode 100644 index 7bb286949004..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CassandraViewGetPropertiesOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings); - } - writer.WriteEndObject(); - } - - internal static CassandraViewGetPropertiesOptions DeserializeCassandraViewGetPropertiesOptions(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional throughput = default; - Optional autoscaleSettings = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("throughput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - throughput = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("autoscaleSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoscaleSettings = AutoscaleSettings.DeserializeAutoscaleSettings(property.Value); - continue; - } - } - return new CassandraViewGetPropertiesOptions(Optional.ToNullable(throughput), autoscaleSettings.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.cs deleted file mode 100644 index 4e5806e92c01..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The CassandraViewGetPropertiesOptions. - public partial class CassandraViewGetPropertiesOptions : CosmosDBBaseConfig - { - /// Initializes a new instance of CassandraViewGetPropertiesOptions. - public CassandraViewGetPropertiesOptions() - { - } - - /// Initializes a new instance of CassandraViewGetPropertiesOptions. - /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. - /// Specifies the Autoscale settings. - internal CassandraViewGetPropertiesOptions(int? throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) - { - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.Serialization.cs deleted file mode 100644 index 894a75917545..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CassandraViewGetPropertiesResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("viewDefinition"u8); - writer.WriteStringValue(ViewDefinition); - writer.WriteEndObject(); - } - - internal static CassandraViewGetPropertiesResource DeserializeCassandraViewGetPropertiesResource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional rid = default; - Optional ts = default; - Optional etag = default; - string id = default; - string viewDefinition = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("_rid"u8)) - { - rid = property.Value.GetString(); - continue; - } - if (property.NameEquals("_ts"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ts = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("_etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("viewDefinition"u8)) - { - viewDefinition = property.Value.GetString(); - continue; - } - } - return new CassandraViewGetPropertiesResource(id, viewDefinition, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.cs deleted file mode 100644 index 627c47bac308..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The CassandraViewGetPropertiesResource. - public partial class CassandraViewGetPropertiesResource : CassandraViewResource - { - /// Initializes a new instance of CassandraViewGetPropertiesResource. - /// Name of the Cosmos DB Cassandra view. - /// View Definition of the Cosmos DB Cassandra view. - /// or is null. - public CassandraViewGetPropertiesResource(string id, string viewDefinition) : base(id, viewDefinition) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(viewDefinition, nameof(viewDefinition)); - } - - /// Initializes a new instance of CassandraViewGetPropertiesResource. - /// Name of the Cosmos DB Cassandra view. - /// View Definition of the Cosmos DB Cassandra view. - /// A system generated property. A unique identifier. - /// A system generated property that denotes the last updated timestamp of the resource. - /// A system generated property representing the resource etag required for optimistic concurrency control. - /// or is null. - internal CassandraViewGetPropertiesResource(string id, string viewDefinition, string rid, float? timestamp, ETag? etag) : base(id, viewDefinition) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(viewDefinition, nameof(viewDefinition)); - - Rid = rid; - Timestamp = timestamp; - ETag = etag; - } - - /// A system generated property. A unique identifier. - public string Rid { get; } - /// A system generated property that denotes the last updated timestamp of the resource. - public float? Timestamp { get; } - /// A system generated property representing the resource etag required for optimistic concurrency control. - public ETag? ETag { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index c637517992cf..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CassandraViewGetResultCreateOrUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("resource"u8); - writer.WriteObjectValue(Resource); - if (Optional.IsDefined(Options)) - { - writer.WritePropertyName("options"u8); - writer.WriteObjectValue(Options); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static CassandraViewGetResultCreateOrUpdateContent DeserializeCassandraViewGetResultCreateOrUpdateContent(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - CassandraViewResource resource = default; - Optional options = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resource"u8)) - { - resource = CassandraViewResource.DeserializeCassandraViewResource(property0.Value); - continue; - } - if (property0.NameEquals("options"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - options = CosmosDBCreateUpdateConfig.DeserializeCosmosDBCreateUpdateConfig(property0.Value); - continue; - } - } - continue; - } - } - return new CassandraViewGetResultCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.cs deleted file mode 100644 index d47b2934977d..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Parameters to create and update Cosmos DB Cassandra view. - public partial class CassandraViewGetResultCreateOrUpdateContent : TrackedResourceData - { - /// Initializes a new instance of CassandraViewGetResultCreateOrUpdateContent. - /// The location. - /// The standard JSON format of a Cassandra view. - /// is null. - public CassandraViewGetResultCreateOrUpdateContent(AzureLocation location, CassandraViewResource resource) : base(location) - { - Argument.AssertNotNull(resource, nameof(resource)); - - Resource = resource; - } - - /// Initializes a new instance of CassandraViewGetResultCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a Cassandra view. - /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CassandraViewGetResultCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CassandraViewResource resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) - { - Resource = resource; - Options = options; - Identity = identity; - } - - /// The standard JSON format of a Cassandra view. - public CassandraViewResource Resource { get; set; } - /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultData.Serialization.cs deleted file mode 100644 index 26c5e2bcf0fe..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultData.Serialization.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - public partial class CassandraViewGetResultData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Resource)) - { - writer.WritePropertyName("resource"u8); - writer.WriteObjectValue(Resource); - } - if (Optional.IsDefined(Options)) - { - writer.WritePropertyName("options"u8); - writer.WriteObjectValue(Options); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static CassandraViewGetResultData DeserializeCassandraViewGetResultData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional resource = default; - Optional options = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resource"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resource = CassandraViewGetPropertiesResource.DeserializeCassandraViewGetPropertiesResource(property0.Value); - continue; - } - if (property0.NameEquals("options"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - options = CassandraViewGetPropertiesOptions.DeserializeCassandraViewGetPropertiesOptions(property0.Value); - continue; - } - } - continue; - } - } - return new CassandraViewGetResultData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.Serialization.cs deleted file mode 100644 index 60d6f9c05fda..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class CassandraViewListResult - { - internal static CassandraViewListResult DeserializeCassandraViewListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CassandraViewGetResultData.DeserializeCassandraViewGetResultData(item)); - } - value = array; - continue; - } - } - return new CassandraViewListResult(Optional.ToList(value)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.cs deleted file mode 100644 index 09528f94f148..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The List operation response, that contains the Cassandra views and their properties. - internal partial class CassandraViewListResult - { - /// Initializes a new instance of CassandraViewListResult. - internal CassandraViewListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of CassandraViewListResult. - /// List of Cassandra views and their properties. - internal CassandraViewListResult(IReadOnlyList value) - { - Value = value; - } - - /// List of Cassandra views and their properties. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.Serialization.cs deleted file mode 100644 index a252876efa2b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CassandraViewResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("viewDefinition"u8); - writer.WriteStringValue(ViewDefinition); - writer.WriteEndObject(); - } - - internal static CassandraViewResource DeserializeCassandraViewResource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string viewDefinition = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("viewDefinition"u8)) - { - viewDefinition = property.Value.GetString(); - continue; - } - } - return new CassandraViewResource(id, viewDefinition); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.cs deleted file mode 100644 index 696ebfd1a149..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Cosmos DB Cassandra view resource object. - public partial class CassandraViewResource - { - /// Initializes a new instance of CassandraViewResource. - /// Name of the Cosmos DB Cassandra view. - /// View Definition of the Cosmos DB Cassandra view. - /// or is null. - public CassandraViewResource(string id, string viewDefinition) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(viewDefinition, nameof(viewDefinition)); - - Id = id; - ViewDefinition = viewDefinition; - } - - /// Name of the Cosmos DB Cassandra view. - public string Id { get; set; } - /// View Definition of the Cosmos DB Cassandra view. - public string ViewDefinition { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityContent.Serialization.cs deleted file mode 100644 index bc32d76703d1..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityContent.Serialization.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CheckCosmosDBNameAvailabilityContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityContent.cs deleted file mode 100644 index 0aef1e039e09..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityContent.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The check availability request body. - public partial class CheckCosmosDBNameAvailabilityContent - { - /// Initializes a new instance of CheckCosmosDBNameAvailabilityContent. - public CheckCosmosDBNameAvailabilityContent() - { - } - - /// The name of the resource for which availability needs to be checked. - public string Name { get; set; } - /// The resource type. - public string ResourceType { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityResponse.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityResponse.Serialization.cs deleted file mode 100644 index d2568f41395c..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityResponse.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CheckCosmosDBNameAvailabilityResponse - { - internal static CheckCosmosDBNameAvailabilityResponse DeserializeCheckCosmosDBNameAvailabilityResponse(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional nameAvailable = default; - Optional reason = default; - Optional message = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nameAvailable"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nameAvailable = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("reason"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - reason = new CosmosDBNameUnavailableReason(property.Value.GetString()); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - } - return new CheckCosmosDBNameAvailabilityResponse(Optional.ToNullable(nameAvailable), Optional.ToNullable(reason), message.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityResponse.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityResponse.cs deleted file mode 100644 index 56fe22c17478..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CheckCosmosDBNameAvailabilityResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The check availability result. - public partial class CheckCosmosDBNameAvailabilityResponse - { - /// Initializes a new instance of CheckCosmosDBNameAvailabilityResponse. - internal CheckCosmosDBNameAvailabilityResponse() - { - } - - /// Initializes a new instance of CheckCosmosDBNameAvailabilityResponse. - /// Indicates if the resource name is available. - /// The reason why the given name is not available. - /// Detailed reason why the given name is available. - internal CheckCosmosDBNameAvailabilityResponse(bool? nameAvailable, CosmosDBNameUnavailableReason? reason, string message) - { - NameAvailable = nameAvailable; - Reason = reason; - Message = message; - } - - /// Indicates if the resource name is available. - public bool? NameAvailable { get; } - /// The reason why the given name is not available. - public CosmosDBNameUnavailableReason? Reason { get; } - /// Detailed reason why the given name is available. - public string Message { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs index bd208879c709..774bd18dc7a2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs @@ -28,7 +28,7 @@ internal ContinuousModeBackupPolicy(BackupPolicyType backupPolicyType, BackupPol /// Configuration values for continuous mode backup. internal ContinuousModeProperties ContinuousModeProperties { get; set; } - /// Enum to indicate type of Continuos backup mode. + /// Enum to indicate type of Continuous backup mode. public ContinuousTier? ContinuousModeTier { get => ContinuousModeProperties is null ? default : ContinuousModeProperties.Tier; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.cs index 4fcdcee386c7..bb6dc1af0327 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.cs @@ -16,13 +16,13 @@ public ContinuousModeProperties() } /// Initializes a new instance of ContinuousModeProperties. - /// Enum to indicate type of Continuos backup mode. + /// Enum to indicate type of Continuous backup mode. internal ContinuousModeProperties(ContinuousTier? tier) { Tier = tier; } - /// Enum to indicate type of Continuos backup mode. + /// Enum to indicate type of Continuous backup mode. public ContinuousTier? Tier { 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 deleted file mode 100644 index bbcb69a41a87..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CosmosCassandraDataTransferDataSourceSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keyspaceName"u8); - writer.WriteStringValue(KeyspaceName); - writer.WritePropertyName("tableName"u8); - writer.WriteStringValue(TableName); - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - writer.WriteEndObject(); - } - - internal static CosmosCassandraDataTransferDataSourceSink DeserializeCosmosCassandraDataTransferDataSourceSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string keyspaceName = default; - string tableName = default; - DataTransferComponent component = default; - 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; - } - } - return new CosmosCassandraDataTransferDataSourceSink(component, keyspaceName, tableName); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.cs deleted file mode 100644 index d9eec6cc215b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// A CosmosDB Cassandra API data source/sink. - public partial class CosmosCassandraDataTransferDataSourceSink : DataTransferDataSourceSink - { - /// Initializes a new instance of CosmosCassandraDataTransferDataSourceSink. - /// - /// - /// or is null. - public CosmosCassandraDataTransferDataSourceSink(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 CosmosCassandraDataTransferDataSourceSink. - /// - /// - /// - internal CosmosCassandraDataTransferDataSourceSink(DataTransferComponent component, string keyspaceName, string tableName) : base(component) - { - KeyspaceName = keyspaceName; - TableName = tableName; - Component = component; - } - - /// Gets or sets the keyspace name. - public string KeyspaceName { get; set; } - /// Gets or sets the table name. - public string TableName { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateMode.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateMode.cs index a71314a6225c..34650997e767 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateMode.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateMode.cs @@ -24,14 +24,11 @@ public CosmosDBAccountCreateMode(string value) private const string DefaultValue = "Default"; private const string RestoreValue = "Restore"; - private const string PointInTimeRestoreValue = "PointInTimeRestore"; /// Default. public static CosmosDBAccountCreateMode Default { get; } = new CosmosDBAccountCreateMode(DefaultValue); /// Restore. public static CosmosDBAccountCreateMode Restore { get; } = new CosmosDBAccountCreateMode(RestoreValue); - /// PointInTimeRestore. - public static CosmosDBAccountCreateMode PointInTimeRestore { get; } = new CosmosDBAccountCreateMode(PointInTimeRestoreValue); /// Determines if two values are the same. public static bool operator ==(CosmosDBAccountCreateMode left, CosmosDBAccountCreateMode right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs index 952ffdab53a7..0148441bc4bb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs @@ -193,11 +193,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(DiagnosticLogSettings)) - { - writer.WritePropertyName("diagnosticLogSettings"u8); - writer.WriteObjectValue(DiagnosticLogSettings); - } if (Optional.IsDefined(DisableLocalAuth)) { writer.WritePropertyName("disableLocalAuth"u8); @@ -213,26 +208,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("capacity"u8); writer.WriteObjectValue(Capacity); } - if (Optional.IsDefined(EnableMaterializedViews)) - { - writer.WritePropertyName("enableMaterializedViews"u8); - writer.WriteBooleanValue(EnableMaterializedViews.Value); - } if (Optional.IsDefined(EnablePartitionMerge)) { writer.WritePropertyName("enablePartitionMerge"u8); writer.WriteBooleanValue(EnablePartitionMerge.Value); } - if (Optional.IsDefined(EnableBurstCapacity)) - { - writer.WritePropertyName("enableBurstCapacity"u8); - writer.WriteBooleanValue(EnableBurstCapacity.Value); - } if (Optional.IsDefined(MinimalTlsVersion)) { writer.WritePropertyName("minimalTlsVersion"u8); writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); } + if (Optional.IsDefined(EnableBurstCapacity)) + { + writer.WritePropertyName("enableBurstCapacity"u8); + writer.WriteBooleanValue(EnableBurstCapacity.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -275,15 +265,13 @@ internal static CosmosDBAccountCreateOrUpdateContent DeserializeCosmosDBAccountC Optional> cors = default; Optional networkAclBypass = default; Optional> networkAclBypassResourceIds = default; - Optional diagnosticLogSettings = default; Optional disableLocalAuth = default; Optional restoreParameters = default; Optional capacity = default; - Optional enableMaterializedViews = default; Optional keysMetadata = default; Optional enablePartitionMerge = default; - Optional enableBurstCapacity = default; Optional minimalTlsVersion = default; + Optional enableBurstCapacity = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -598,15 +586,6 @@ internal static CosmosDBAccountCreateOrUpdateContent DeserializeCosmosDBAccountC networkAclBypassResourceIds = array; continue; } - if (property0.NameEquals("diagnosticLogSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - diagnosticLogSettings = DiagnosticLogSettings.DeserializeDiagnosticLogSettings(property0.Value); - continue; - } if (property0.NameEquals("disableLocalAuth"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -634,15 +613,6 @@ internal static CosmosDBAccountCreateOrUpdateContent DeserializeCosmosDBAccountC capacity = CosmosDBAccountCapacity.DeserializeCosmosDBAccountCapacity(property0.Value); continue; } - if (property0.NameEquals("enableMaterializedViews"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableMaterializedViews = property0.Value.GetBoolean(); - continue; - } if (property0.NameEquals("keysMetadata"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -661,29 +631,29 @@ internal static CosmosDBAccountCreateOrUpdateContent DeserializeCosmosDBAccountC enablePartitionMerge = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("enableBurstCapacity"u8)) + if (property0.NameEquals("minimalTlsVersion"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - enableBurstCapacity = property0.Value.GetBoolean(); + minimalTlsVersion = new CosmosDBMinimalTlsVersion(property0.Value.GetString()); continue; } - if (property0.NameEquals("minimalTlsVersion"u8)) + if (property0.NameEquals("enableBurstCapacity"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - minimalTlsVersion = new CosmosDBMinimalTlsVersion(property0.Value.GetString()); + enableBurstCapacity = property0.Value.GetBoolean(); continue; } } continue; } } - return new CosmosDBAccountCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(kind), consistencyPolicy.Value, locations, databaseAccountOfferType, Optional.ToList(ipRules), Optional.ToNullable(isVirtualNetworkFilterEnabled), Optional.ToNullable(enableAutomaticFailover), Optional.ToList(capabilities), Optional.ToList(virtualNetworkRules), Optional.ToNullable(enableMultipleWriteLocations), Optional.ToNullable(enableCassandraConnector), Optional.ToNullable(connectorOffer), Optional.ToNullable(disableKeyBasedMetadataWriteAccess), keyVaultKeyUri.Value, defaultIdentity.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(enableFreeTier), apiProperties.Value, Optional.ToNullable(enableAnalyticalStorage), analyticalStorageConfiguration.Value, Optional.ToNullable(createMode), backupPolicy.Value, Optional.ToList(cors), Optional.ToNullable(networkAclBypass), Optional.ToList(networkAclBypassResourceIds), diagnosticLogSettings.Value, Optional.ToNullable(disableLocalAuth), restoreParameters.Value, capacity.Value, Optional.ToNullable(enableMaterializedViews), keysMetadata.Value, Optional.ToNullable(enablePartitionMerge), Optional.ToNullable(enableBurstCapacity), Optional.ToNullable(minimalTlsVersion), identity); + return new CosmosDBAccountCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(kind), identity, consistencyPolicy.Value, locations, databaseAccountOfferType, Optional.ToList(ipRules), Optional.ToNullable(isVirtualNetworkFilterEnabled), Optional.ToNullable(enableAutomaticFailover), Optional.ToList(capabilities), Optional.ToList(virtualNetworkRules), Optional.ToNullable(enableMultipleWriteLocations), Optional.ToNullable(enableCassandraConnector), Optional.ToNullable(connectorOffer), Optional.ToNullable(disableKeyBasedMetadataWriteAccess), keyVaultKeyUri.Value, defaultIdentity.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(enableFreeTier), apiProperties.Value, Optional.ToNullable(enableAnalyticalStorage), analyticalStorageConfiguration.Value, Optional.ToNullable(createMode), backupPolicy.Value, Optional.ToList(cors), Optional.ToNullable(networkAclBypass), Optional.ToList(networkAclBypassResourceIds), Optional.ToNullable(disableLocalAuth), restoreParameters.Value, capacity.Value, keysMetadata.Value, Optional.ToNullable(enablePartitionMerge), Optional.ToNullable(minimalTlsVersion), Optional.ToNullable(enableBurstCapacity)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.cs index cbd4b75abefb..dcaff2f48889 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.cs @@ -41,6 +41,7 @@ public CosmosDBAccountCreateOrUpdateContent(AzureLocation location, IEnumerable< /// The tags. /// The location. /// Indicates the type of database account. This can only be set at database account creation. + /// Identity for the resource. /// The consistency policy for the Cosmos DB account. /// An array that contains the georeplication locations enabled for the Cosmos DB account. /// The offer type for the database. @@ -69,19 +70,17 @@ public CosmosDBAccountCreateOrUpdateContent(AzureLocation location, IEnumerable< /// The CORS policy for the Cosmos DB database account. /// Indicates what services are allowed to bypass firewall checks. /// An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. - /// The Object representing the different Diagnostic log settings for the Cosmos DB Account. /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. /// Parameters to indicate the information about the restore. /// The object that represents all properties related to capacity enforcement on an account. - /// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. /// This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. /// Flag to indicate enabling/disabling of Partition Merge feature on the account. + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. /// Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. - /// Identity for the resource. - internal CosmosDBAccountCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBAccountKind? kind, ConsistencyPolicy consistencyPolicy, IList locations, CosmosDBAccountOfferType databaseAccountOfferType, IList ipRules, bool? isVirtualNetworkFilterEnabled, bool? enableAutomaticFailover, IList capabilities, IList virtualNetworkRules, bool? enableMultipleWriteLocations, bool? enableCassandraConnector, ConnectorOffer? connectorOffer, bool? disableKeyBasedMetadataWriteAccess, Uri keyVaultKeyUri, string defaultIdentity, CosmosDBPublicNetworkAccess? publicNetworkAccess, bool? isFreeTierEnabled, ApiProperties apiProperties, bool? isAnalyticalStorageEnabled, AnalyticalStorageConfiguration analyticalStorageConfiguration, CosmosDBAccountCreateMode? createMode, CosmosDBAccountBackupPolicy backupPolicy, IList cors, NetworkAclBypass? networkAclBypass, IList networkAclBypassResourceIds, DiagnosticLogSettings diagnosticLogSettings, bool? disableLocalAuth, CosmosDBAccountRestoreParameters restoreParameters, CosmosDBAccountCapacity capacity, bool? enableMaterializedViews, DatabaseAccountKeysMetadata keysMetadata, bool? enablePartitionMerge, bool? enableBurstCapacity, CosmosDBMinimalTlsVersion? minimalTlsVersion, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBAccountCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBAccountKind? kind, ManagedServiceIdentity identity, ConsistencyPolicy consistencyPolicy, IList locations, CosmosDBAccountOfferType databaseAccountOfferType, IList ipRules, bool? isVirtualNetworkFilterEnabled, bool? enableAutomaticFailover, IList capabilities, IList virtualNetworkRules, bool? enableMultipleWriteLocations, bool? enableCassandraConnector, ConnectorOffer? connectorOffer, bool? disableKeyBasedMetadataWriteAccess, Uri keyVaultKeyUri, string defaultIdentity, CosmosDBPublicNetworkAccess? publicNetworkAccess, bool? isFreeTierEnabled, ApiProperties apiProperties, bool? isAnalyticalStorageEnabled, AnalyticalStorageConfiguration analyticalStorageConfiguration, CosmosDBAccountCreateMode? createMode, CosmosDBAccountBackupPolicy backupPolicy, IList cors, NetworkAclBypass? networkAclBypass, IList networkAclBypassResourceIds, bool? disableLocalAuth, CosmosDBAccountRestoreParameters restoreParameters, CosmosDBAccountCapacity capacity, DatabaseAccountKeysMetadata keysMetadata, bool? enablePartitionMerge, CosmosDBMinimalTlsVersion? minimalTlsVersion, bool? enableBurstCapacity) : base(id, name, resourceType, systemData, tags, location) { Kind = kind; + Identity = identity; ConsistencyPolicy = consistencyPolicy; Locations = locations; DatabaseAccountOfferType = databaseAccountOfferType; @@ -106,20 +105,19 @@ internal CosmosDBAccountCreateOrUpdateContent(ResourceIdentifier id, string name Cors = cors; NetworkAclBypass = networkAclBypass; NetworkAclBypassResourceIds = networkAclBypassResourceIds; - DiagnosticLogSettings = diagnosticLogSettings; DisableLocalAuth = disableLocalAuth; RestoreParameters = restoreParameters; Capacity = capacity; - EnableMaterializedViews = enableMaterializedViews; KeysMetadata = keysMetadata; EnablePartitionMerge = enablePartitionMerge; - EnableBurstCapacity = enableBurstCapacity; MinimalTlsVersion = minimalTlsVersion; - Identity = identity; + EnableBurstCapacity = enableBurstCapacity; } /// Indicates the type of database account. This can only be set at database account creation. public CosmosDBAccountKind? Kind { get; set; } + /// Identity for the resource. + public ManagedServiceIdentity Identity { get; set; } /// The consistency policy for the Cosmos DB account. public ConsistencyPolicy ConsistencyPolicy { get; set; } /// An array that contains the georeplication locations enabled for the Cosmos DB account. @@ -194,20 +192,6 @@ public AnalyticalStorageSchemaType? AnalyticalStorageSchemaType public NetworkAclBypass? NetworkAclBypass { get; set; } /// An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. public IList NetworkAclBypassResourceIds { get; } - /// The Object representing the different Diagnostic log settings for the Cosmos DB Account. - internal DiagnosticLogSettings DiagnosticLogSettings { get; set; } - /// Describe the level of detail with which queries are to be logged. - public EnableFullTextQuery? DiagnosticLogEnableFullTextQuery - { - get => DiagnosticLogSettings is null ? default : DiagnosticLogSettings.EnableFullTextQuery; - set - { - if (DiagnosticLogSettings is null) - DiagnosticLogSettings = new DiagnosticLogSettings(); - DiagnosticLogSettings.EnableFullTextQuery = value; - } - } - /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. public bool? DisableLocalAuth { get; set; } /// Parameters to indicate the information about the restore. @@ -226,17 +210,13 @@ public int? CapacityTotalThroughputLimit } } - /// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. - public bool? EnableMaterializedViews { get; set; } /// This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. public DatabaseAccountKeysMetadata KeysMetadata { get; } /// Flag to indicate enabling/disabling of Partition Merge feature on the account. public bool? EnablePartitionMerge { get; set; } + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. + public CosmosDBMinimalTlsVersion? MinimalTlsVersion { get; set; } /// Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. public bool? EnableBurstCapacity { get; set; } - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. - public CosmosDBMinimalTlsVersion? MinimalTlsVersion { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountData.Serialization.cs index f47aaff16686..4fdd6689d583 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountData.Serialization.cs @@ -190,11 +190,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(DiagnosticLogSettings)) - { - writer.WritePropertyName("diagnosticLogSettings"u8); - writer.WriteObjectValue(DiagnosticLogSettings); - } if (Optional.IsDefined(DisableLocalAuth)) { writer.WritePropertyName("disableLocalAuth"u8); @@ -205,26 +200,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("capacity"u8); writer.WriteObjectValue(Capacity); } - if (Optional.IsDefined(EnableMaterializedViews)) - { - writer.WritePropertyName("enableMaterializedViews"u8); - writer.WriteBooleanValue(EnableMaterializedViews.Value); - } if (Optional.IsDefined(EnablePartitionMerge)) { writer.WritePropertyName("enablePartitionMerge"u8); writer.WriteBooleanValue(EnablePartitionMerge.Value); } - if (Optional.IsDefined(EnableBurstCapacity)) - { - writer.WritePropertyName("enableBurstCapacity"u8); - writer.WriteBooleanValue(EnableBurstCapacity.Value); - } if (Optional.IsDefined(MinimalTlsVersion)) { writer.WritePropertyName("minimalTlsVersion"u8); writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); } + if (Optional.IsDefined(EnableBurstCapacity)) + { + writer.WritePropertyName("enableBurstCapacity"u8); + writer.WriteBooleanValue(EnableBurstCapacity.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -275,14 +265,12 @@ internal static CosmosDBAccountData DeserializeCosmosDBAccountData(JsonElement e Optional> cors = default; Optional networkAclBypass = default; Optional> networkAclBypassResourceIds = default; - Optional diagnosticLogSettings = default; Optional disableLocalAuth = default; Optional capacity = default; - Optional enableMaterializedViews = default; Optional keysMetadata = default; Optional enablePartitionMerge = default; - Optional enableBurstCapacity = default; Optional minimalTlsVersion = default; + Optional enableBurstCapacity = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -689,15 +677,6 @@ internal static CosmosDBAccountData DeserializeCosmosDBAccountData(JsonElement e networkAclBypassResourceIds = array; continue; } - if (property0.NameEquals("diagnosticLogSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - diagnosticLogSettings = DiagnosticLogSettings.DeserializeDiagnosticLogSettings(property0.Value); - continue; - } if (property0.NameEquals("disableLocalAuth"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -716,15 +695,6 @@ internal static CosmosDBAccountData DeserializeCosmosDBAccountData(JsonElement e capacity = CosmosDBAccountCapacity.DeserializeCosmosDBAccountCapacity(property0.Value); continue; } - if (property0.NameEquals("enableMaterializedViews"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableMaterializedViews = property0.Value.GetBoolean(); - continue; - } if (property0.NameEquals("keysMetadata"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -743,29 +713,29 @@ internal static CosmosDBAccountData DeserializeCosmosDBAccountData(JsonElement e enablePartitionMerge = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("enableBurstCapacity"u8)) + if (property0.NameEquals("minimalTlsVersion"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - enableBurstCapacity = property0.Value.GetBoolean(); + minimalTlsVersion = new CosmosDBMinimalTlsVersion(property0.Value.GetString()); continue; } - if (property0.NameEquals("minimalTlsVersion"u8)) + if (property0.NameEquals("enableBurstCapacity"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - minimalTlsVersion = new CosmosDBMinimalTlsVersion(property0.Value.GetString()); + enableBurstCapacity = property0.Value.GetBoolean(); continue; } } continue; } } - return new CosmosDBAccountData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(kind), provisioningState.Value, documentEndpoint.Value, Optional.ToNullable(databaseAccountOfferType), Optional.ToList(ipRules), Optional.ToNullable(isVirtualNetworkFilterEnabled), Optional.ToNullable(enableAutomaticFailover), consistencyPolicy.Value, Optional.ToList(capabilities), Optional.ToList(writeLocations), Optional.ToList(readLocations), Optional.ToList(locations), Optional.ToList(failoverPolicies), Optional.ToList(virtualNetworkRules), Optional.ToList(privateEndpointConnections), Optional.ToNullable(enableMultipleWriteLocations), Optional.ToNullable(enableCassandraConnector), Optional.ToNullable(connectorOffer), Optional.ToNullable(disableKeyBasedMetadataWriteAccess), keyVaultKeyUri.Value, defaultIdentity.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(enableFreeTier), apiProperties.Value, Optional.ToNullable(enableAnalyticalStorage), analyticalStorageConfiguration.Value, Optional.ToNullable(instanceId), Optional.ToNullable(createMode), restoreParameters.Value, backupPolicy.Value, Optional.ToList(cors), Optional.ToNullable(networkAclBypass), Optional.ToList(networkAclBypassResourceIds), diagnosticLogSettings.Value, Optional.ToNullable(disableLocalAuth), capacity.Value, Optional.ToNullable(enableMaterializedViews), keysMetadata.Value, Optional.ToNullable(enablePartitionMerge), Optional.ToNullable(enableBurstCapacity), Optional.ToNullable(minimalTlsVersion), identity); + return new CosmosDBAccountData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(kind), identity, provisioningState.Value, documentEndpoint.Value, Optional.ToNullable(databaseAccountOfferType), Optional.ToList(ipRules), Optional.ToNullable(isVirtualNetworkFilterEnabled), Optional.ToNullable(enableAutomaticFailover), consistencyPolicy.Value, Optional.ToList(capabilities), Optional.ToList(writeLocations), Optional.ToList(readLocations), Optional.ToList(locations), Optional.ToList(failoverPolicies), Optional.ToList(virtualNetworkRules), Optional.ToList(privateEndpointConnections), Optional.ToNullable(enableMultipleWriteLocations), Optional.ToNullable(enableCassandraConnector), Optional.ToNullable(connectorOffer), Optional.ToNullable(disableKeyBasedMetadataWriteAccess), keyVaultKeyUri.Value, defaultIdentity.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(enableFreeTier), apiProperties.Value, Optional.ToNullable(enableAnalyticalStorage), analyticalStorageConfiguration.Value, Optional.ToNullable(instanceId), Optional.ToNullable(createMode), restoreParameters.Value, backupPolicy.Value, Optional.ToList(cors), Optional.ToNullable(networkAclBypass), Optional.ToList(networkAclBypassResourceIds), Optional.ToNullable(disableLocalAuth), capacity.Value, keysMetadata.Value, Optional.ToNullable(enablePartitionMerge), Optional.ToNullable(minimalTlsVersion), Optional.ToNullable(enableBurstCapacity)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs index d138e308f1fe..ff0fc644a723 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs @@ -185,11 +185,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(DiagnosticLogSettings)) - { - writer.WritePropertyName("diagnosticLogSettings"u8); - writer.WriteObjectValue(DiagnosticLogSettings); - } if (Optional.IsDefined(DisableLocalAuth)) { writer.WritePropertyName("disableLocalAuth"u8); @@ -200,26 +195,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("capacity"u8); writer.WriteObjectValue(Capacity); } - if (Optional.IsDefined(EnableMaterializedViews)) - { - writer.WritePropertyName("enableMaterializedViews"u8); - writer.WriteBooleanValue(EnableMaterializedViews.Value); - } if (Optional.IsDefined(EnablePartitionMerge)) { writer.WritePropertyName("enablePartitionMerge"u8); writer.WriteBooleanValue(EnablePartitionMerge.Value); } - if (Optional.IsDefined(EnableBurstCapacity)) - { - writer.WritePropertyName("enableBurstCapacity"u8); - writer.WriteBooleanValue(EnableBurstCapacity.Value); - } if (Optional.IsDefined(MinimalTlsVersion)) { writer.WritePropertyName("minimalTlsVersion"u8); writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); } + if (Optional.IsDefined(EnableBurstCapacity)) + { + writer.WritePropertyName("enableBurstCapacity"u8); + writer.WriteBooleanValue(EnableBurstCapacity.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.cs index 1f7fb92e0808..935ce5978041 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.cs @@ -105,20 +105,6 @@ public AnalyticalStorageSchemaType? AnalyticalStorageSchemaType public NetworkAclBypass? NetworkAclBypass { get; set; } /// An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. public IList NetworkAclBypassResourceIds { get; } - /// The Object representing the different Diagnostic log settings for the Cosmos DB Account. - internal DiagnosticLogSettings DiagnosticLogSettings { get; set; } - /// Describe the level of detail with which queries are to be logged. - public EnableFullTextQuery? DiagnosticLogEnableFullTextQuery - { - get => DiagnosticLogSettings is null ? default : DiagnosticLogSettings.EnableFullTextQuery; - set - { - if (DiagnosticLogSettings is null) - DiagnosticLogSettings = new DiagnosticLogSettings(); - DiagnosticLogSettings.EnableFullTextQuery = value; - } - } - /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. public bool? DisableLocalAuth { get; set; } /// The object that represents all properties related to capacity enforcement on an account. @@ -135,15 +121,13 @@ public int? CapacityTotalThroughputLimit } } - /// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. - public bool? EnableMaterializedViews { get; set; } /// This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. public DatabaseAccountKeysMetadata KeysMetadata { get; } /// Flag to indicate enabling/disabling of Partition Merge feature on the account. public bool? EnablePartitionMerge { get; set; } + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. + public CosmosDBMinimalTlsVersion? MinimalTlsVersion { get; set; } /// Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. public bool? EnableBurstCapacity { get; set; } - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. - public CosmosDBMinimalTlsVersion? MinimalTlsVersion { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs index 3ac6bccffc7e..12ecbf5a2a23 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs @@ -22,6 +22,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("restoreMode"u8); writer.WriteStringValue(RestoreMode.Value.ToString()); } + if (Optional.IsDefined(RestoreSource)) + { + writer.WritePropertyName("restoreSource"u8); + writer.WriteStringValue(RestoreSource); + } + if (Optional.IsDefined(RestoreTimestampInUtc)) + { + writer.WritePropertyName("restoreTimestampInUtc"u8); + writer.WriteStringValue(RestoreTimestampInUtc.Value, "O"); + } if (Optional.IsCollectionDefined(DatabasesToRestore)) { writer.WritePropertyName("databasesToRestore"u8); @@ -52,21 +62,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(SourceBackupLocation)) - { - writer.WritePropertyName("sourceBackupLocation"u8); - writer.WriteStringValue(SourceBackupLocation); - } - if (Optional.IsDefined(RestoreSource)) - { - writer.WritePropertyName("restoreSource"u8); - writer.WriteStringValue(RestoreSource); - } - if (Optional.IsDefined(RestoreTimestampInUtc)) - { - writer.WritePropertyName("restoreTimestampInUtc"u8); - writer.WriteStringValue(RestoreTimestampInUtc.Value, "O"); - } writer.WriteEndObject(); } @@ -77,12 +72,11 @@ internal static CosmosDBAccountRestoreParameters DeserializeCosmosDBAccountResto return null; } Optional restoreMode = default; + Optional restoreSource = default; + Optional restoreTimestampInUtc = default; Optional> databasesToRestore = default; Optional> gremlinDatabasesToRestore = default; Optional> tablesToRestore = default; - Optional sourceBackupLocation = default; - Optional restoreSource = default; - Optional restoreTimestampInUtc = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("restoreMode"u8)) @@ -94,6 +88,20 @@ internal static CosmosDBAccountRestoreParameters DeserializeCosmosDBAccountResto restoreMode = new CosmosDBAccountRestoreMode(property.Value.GetString()); continue; } + if (property.NameEquals("restoreSource"u8)) + { + restoreSource = property.Value.GetString(); + continue; + } + if (property.NameEquals("restoreTimestampInUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + restoreTimestampInUtc = property.Value.GetDateTimeOffset("O"); + continue; + } if (property.NameEquals("databasesToRestore"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -136,27 +144,8 @@ internal static CosmosDBAccountRestoreParameters DeserializeCosmosDBAccountResto tablesToRestore = array; continue; } - if (property.NameEquals("sourceBackupLocation"u8)) - { - sourceBackupLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("restoreSource"u8)) - { - restoreSource = property.Value.GetString(); - continue; - } - if (property.NameEquals("restoreTimestampInUtc"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreTimestampInUtc = property.Value.GetDateTimeOffset("O"); - continue; - } } - return new CosmosDBAccountRestoreParameters(restoreSource.Value, Optional.ToNullable(restoreTimestampInUtc), Optional.ToNullable(restoreMode), Optional.ToList(databasesToRestore), Optional.ToList(gremlinDatabasesToRestore), Optional.ToList(tablesToRestore), sourceBackupLocation.Value); + return new CosmosDBAccountRestoreParameters(Optional.ToNullable(restoreMode), restoreSource.Value, Optional.ToNullable(restoreTimestampInUtc), Optional.ToList(databasesToRestore), Optional.ToList(gremlinDatabasesToRestore), Optional.ToList(tablesToRestore)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs index 74eb38df4b0a..e5d4aa173ca2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.CosmosDB.Models { /// Parameters to indicate the information about the restore. - public partial class CosmosDBAccountRestoreParameters : RestoreParametersBase + public partial class CosmosDBAccountRestoreParameters { /// Initializes a new instance of CosmosDBAccountRestoreParameters. public CosmosDBAccountRestoreParameters() @@ -23,31 +23,33 @@ public CosmosDBAccountRestoreParameters() } /// Initializes a new instance of CosmosDBAccountRestoreParameters. + /// Describes the mode of the restore. /// The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. /// Time to which the account has to be restored (ISO-8601 format). - /// Describes the mode of the restore. /// List of specific databases available for restore. /// List of specific gremlin databases available for restore. /// List of specific tables available for restore. - /// The source backup location for restore. - internal CosmosDBAccountRestoreParameters(string restoreSource, DateTimeOffset? restoreTimestampInUtc, CosmosDBAccountRestoreMode? restoreMode, IList databasesToRestore, IList gremlinDatabasesToRestore, IList tablesToRestore, string sourceBackupLocation) : base(restoreSource, restoreTimestampInUtc) + internal CosmosDBAccountRestoreParameters(CosmosDBAccountRestoreMode? restoreMode, string restoreSource, DateTimeOffset? restoreTimestampInUtc, IList databasesToRestore, IList gremlinDatabasesToRestore, IList tablesToRestore) { RestoreMode = restoreMode; + RestoreSource = restoreSource; + RestoreTimestampInUtc = restoreTimestampInUtc; DatabasesToRestore = databasesToRestore; GremlinDatabasesToRestore = gremlinDatabasesToRestore; TablesToRestore = tablesToRestore; - SourceBackupLocation = sourceBackupLocation; } /// Describes the mode of the restore. public CosmosDBAccountRestoreMode? RestoreMode { get; set; } + /// The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. + public string RestoreSource { get; set; } + /// Time to which the account has to be restored (ISO-8601 format). + public DateTimeOffset? RestoreTimestampInUtc { get; set; } /// List of specific databases available for restore. public IList DatabasesToRestore { get; } /// List of specific gremlin databases available for restore. public IList GremlinDatabasesToRestore { get; } /// List of specific tables available for restore. public IList TablesToRestore { get; } - /// The source backup location for restore. - public string SourceBackupLocation { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBConnectionString.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBConnectionString.Serialization.cs deleted file mode 100644 index 714ac877206b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBConnectionString.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CosmosDBConnectionString - { - internal static CosmosDBConnectionString DeserializeCosmosDBConnectionString(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional connectionString = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connectionString"u8)) - { - connectionString = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - } - return new CosmosDBConnectionString(connectionString.Value, description.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBConnectionString.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBConnectionString.cs deleted file mode 100644 index 66e63581d226..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBConnectionString.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Connection string for the mongo cluster. - public partial class CosmosDBConnectionString - { - /// Initializes a new instance of CosmosDBConnectionString. - internal CosmosDBConnectionString() - { - } - - /// Initializes a new instance of CosmosDBConnectionString. - /// Value of the connection string. - /// Description of the connection string. - internal CosmosDBConnectionString(string connectionString, string description) - { - ConnectionString = connectionString; - Description = description; - } - - /// Value of the connection string. - public string ConnectionString { get; } - /// Description of the connection string. - public string Description { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFirewallRuleData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFirewallRuleData.Serialization.cs deleted file mode 100644 index 86ddfbd60f83..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFirewallRuleData.Serialization.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - public partial class CosmosDBFirewallRuleData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("startIpAddress"u8); - writer.WriteStringValue(StartIPAddress); - writer.WritePropertyName("endIpAddress"u8); - writer.WriteStringValue(EndIPAddress); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static CosmosDBFirewallRuleData DeserializeCosmosDBFirewallRuleData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional provisioningState = default; - string startIPAddress = default; - string endIPAddress = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new CosmosDBProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("startIpAddress"u8)) - { - startIPAddress = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("endIpAddress"u8)) - { - endIPAddress = property0.Value.GetString(); - continue; - } - } - continue; - } - } - return new CosmosDBFirewallRuleData(id, name, type, systemData.Value, Optional.ToNullable(provisioningState), startIPAddress, endIPAddress); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMinimalTlsVersion.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMinimalTlsVersion.cs index 0cb4cfdadbc4..0d9e06679d73 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMinimalTlsVersion.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMinimalTlsVersion.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.CosmosDB.Models { - /// Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. + /// Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. public readonly partial struct CosmosDBMinimalTlsVersion : IEquatable { private readonly string _value; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBNameUnavailableReason.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBNameUnavailableReason.cs deleted file mode 100644 index c3f7e62f00cd..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBNameUnavailableReason.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The reason why the given name is not available. - public readonly partial struct CosmosDBNameUnavailableReason : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CosmosDBNameUnavailableReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InvalidValue = "Invalid"; - private const string AlreadyExistsValue = "AlreadyExists"; - - /// Invalid. - public static CosmosDBNameUnavailableReason Invalid { get; } = new CosmosDBNameUnavailableReason(InvalidValue); - /// AlreadyExists. - public static CosmosDBNameUnavailableReason AlreadyExists { get; } = new CosmosDBNameUnavailableReason(AlreadyExistsValue); - /// Determines if two values are the same. - public static bool operator ==(CosmosDBNameUnavailableReason left, CosmosDBNameUnavailableReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CosmosDBNameUnavailableReason left, CosmosDBNameUnavailableReason right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CosmosDBNameUnavailableReason(string value) => new CosmosDBNameUnavailableReason(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CosmosDBNameUnavailableReason other && Equals(other); - /// - public bool Equals(CosmosDBNameUnavailableReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBOperationType.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBOperationType.cs index d2e03ad02dcd..afca44c69344 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBOperationType.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBOperationType.cs @@ -25,7 +25,6 @@ public CosmosDBOperationType(string value) private const string CreateValue = "Create"; private const string ReplaceValue = "Replace"; private const string DeleteValue = "Delete"; - private const string RecreateValue = "Recreate"; private const string SystemOperationValue = "SystemOperation"; /// Create. @@ -34,8 +33,6 @@ public CosmosDBOperationType(string value) public static CosmosDBOperationType Replace { get; } = new CosmosDBOperationType(ReplaceValue); /// Delete. public static CosmosDBOperationType Delete { get; } = new CosmosDBOperationType(DeleteValue); - /// Recreate. - public static CosmosDBOperationType Recreate { get; } = new CosmosDBOperationType(RecreateValue); /// SystemOperation. public static CosmosDBOperationType SystemOperation { get; } = new CosmosDBOperationType(SystemOperationValue); /// Determines if two values are the same. diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBProvisioningState.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBProvisioningState.cs deleted file mode 100644 index 7f222cc7e07b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBProvisioningState.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The provisioning state of the resource. - public readonly partial struct CosmosDBProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CosmosDBProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string InProgressValue = "InProgress"; - private const string UpdatingValue = "Updating"; - private const string DroppingValue = "Dropping"; - - /// Succeeded. - public static CosmosDBProvisioningState Succeeded { get; } = new CosmosDBProvisioningState(SucceededValue); - /// Failed. - public static CosmosDBProvisioningState Failed { get; } = new CosmosDBProvisioningState(FailedValue); - /// Canceled. - public static CosmosDBProvisioningState Canceled { get; } = new CosmosDBProvisioningState(CanceledValue); - /// InProgress. - public static CosmosDBProvisioningState InProgress { get; } = new CosmosDBProvisioningState(InProgressValue); - /// Updating. - public static CosmosDBProvisioningState Updating { get; } = new CosmosDBProvisioningState(UpdatingValue); - /// Dropping. - public static CosmosDBProvisioningState Dropping { get; } = new CosmosDBProvisioningState(DroppingValue); - /// Determines if two values are the same. - public static bool operator ==(CosmosDBProvisioningState left, CosmosDBProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CosmosDBProvisioningState left, CosmosDBProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CosmosDBProvisioningState(string value) => new CosmosDBProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CosmosDBProvisioningState other && Equals(other); - /// - public bool Equals(CosmosDBProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPublicNetworkAccess.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPublicNetworkAccess.cs index 3346e43901f6..9343a56a4f7b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPublicNetworkAccess.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPublicNetworkAccess.cs @@ -24,11 +24,14 @@ public CosmosDBPublicNetworkAccess(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; + private const string SecuredByPerimeterValue = "SecuredByPerimeter"; /// Enabled. public static CosmosDBPublicNetworkAccess Enabled { get; } = new CosmosDBPublicNetworkAccess(EnabledValue); /// Disabled. public static CosmosDBPublicNetworkAccess Disabled { get; } = new CosmosDBPublicNetworkAccess(DisabledValue); + /// SecuredByPerimeter. + public static CosmosDBPublicNetworkAccess SecuredByPerimeter { get; } = new CosmosDBPublicNetworkAccess(SecuredByPerimeterValue); /// Determines if two values are the same. public static bool operator ==(CosmosDBPublicNetworkAccess left, CosmosDBPublicNetworkAccess right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs index de187cf9022f..7079bb7feb6c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CosmosDBSqlContainerCreateOrUpdateContent : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CosmosDBSqlContainerCreateOrUpdateContent DeserializeCosmosDBSql { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CosmosDBSqlContainerCreateOrUpdateContent DeserializeCosmosDBSql Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CosmosDBSqlContainerCreateOrUpdateContent DeserializeCosmosDBSql continue; } } - return new CosmosDBSqlContainerCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CosmosDBSqlContainerCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.cs index 1e0e84646c72..de15f46d9976 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.cs @@ -35,19 +35,15 @@ public CosmosDBSqlContainerCreateOrUpdateContent(AzureLocation location, CosmosD /// The location. /// The standard JSON format of a container. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CosmosDBSqlContainerCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlContainerResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlContainerCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlContainerResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a container. public CosmosDBSqlContainerResourceInfo Resource { get; set; } /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerData.Serialization.cs index 160f716a9c61..888c49de871b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CosmosDBSqlContainerData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static CosmosDBSqlContainerData DeserializeCosmosDBSqlContainerData(Jso { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static CosmosDBSqlContainerData DeserializeCosmosDBSqlContainerData(Jso Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static CosmosDBSqlContainerData DeserializeCosmosDBSqlContainerData(Jso continue; } } - return new CosmosDBSqlContainerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new CosmosDBSqlContainerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs index faabf08d6e9e..8c25bd5ff0a9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs @@ -52,21 +52,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("analyticalStorageTtl"u8); writer.WriteNumberValue(AnalyticalStorageTtl.Value); } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(MaterializedViewDefinition)) - { - writer.WritePropertyName("materializedViewDefinition"u8); - writer.WriteObjectValue(MaterializedViewDefinition); - } writer.WriteEndObject(); } @@ -84,9 +69,6 @@ internal static CosmosDBSqlContainerResourceInfo DeserializeCosmosDBSqlContainer Optional conflictResolutionPolicy = default; Optional clientEncryptionPolicy = default; Optional analyticalStorageTtl = default; - Optional restoreParameters = default; - Optional createMode = default; - Optional materializedViewDefinition = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -157,35 +139,8 @@ internal static CosmosDBSqlContainerResourceInfo DeserializeCosmosDBSqlContainer analyticalStorageTtl = property.Value.GetInt64(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("materializedViewDefinition"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - materializedViewDefinition = MaterializedViewDefinition.DeserializeMaterializedViewDefinition(property.Value); - continue; - } } - return new CosmosDBSqlContainerResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, clientEncryptionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), restoreParameters.Value, Optional.ToNullable(createMode), materializedViewDefinition.Value); + return new CosmosDBSqlContainerResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, clientEncryptionPolicy.Value, Optional.ToNullable(analyticalStorageTtl)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs index f024dbec8af6..3f9bdeaffbc2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs @@ -33,10 +33,7 @@ public CosmosDBSqlContainerResourceInfo(string containerName) /// The conflict resolution policy for the container. /// The client encryption policy for the container. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - /// The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. - internal CosmosDBSqlContainerResourceInfo(string containerName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, CosmosDBClientEncryptionPolicy clientEncryptionPolicy, long? analyticalStorageTtl, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, MaterializedViewDefinition materializedViewDefinition) + internal CosmosDBSqlContainerResourceInfo(string containerName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, CosmosDBClientEncryptionPolicy clientEncryptionPolicy, long? analyticalStorageTtl) { ContainerName = containerName; IndexingPolicy = indexingPolicy; @@ -46,9 +43,6 @@ internal CosmosDBSqlContainerResourceInfo(string containerName, CosmosDBIndexing ConflictResolutionPolicy = conflictResolutionPolicy; ClientEncryptionPolicy = clientEncryptionPolicy; AnalyticalStorageTtl = analyticalStorageTtl; - RestoreParameters = restoreParameters; - CreateMode = createMode; - MaterializedViewDefinition = materializedViewDefinition; } /// Name of the Cosmos DB SQL container. @@ -78,11 +72,5 @@ public IList UniqueKeys public CosmosDBClientEncryptionPolicy ClientEncryptionPolicy { get; set; } /// Analytical TTL. public long? AnalyticalStorageTtl { get; set; } - /// Parameters to indicate the information about the restore. - public ResourceRestoreParameters RestoreParameters { get; set; } - /// Enum to indicate the mode of resource creation. - public CosmosDBAccountCreateMode? CreateMode { get; set; } - /// The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. - public MaterializedViewDefinition MaterializedViewDefinition { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs index fe246251bb19..e9c8692e7dc0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CosmosDBSqlDatabaseCreateOrUpdateContent : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CosmosDBSqlDatabaseCreateOrUpdateContent DeserializeCosmosDBSqlD { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CosmosDBSqlDatabaseCreateOrUpdateContent DeserializeCosmosDBSqlD Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CosmosDBSqlDatabaseCreateOrUpdateContent DeserializeCosmosDBSqlD continue; } } - return new CosmosDBSqlDatabaseCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CosmosDBSqlDatabaseCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.cs index 039e310eee8d..abd75f926e9e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.cs @@ -35,19 +35,16 @@ public CosmosDBSqlDatabaseCreateOrUpdateContent(AzureLocation location, CosmosDB /// The location. /// The standard JSON format of a SQL database. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CosmosDBSqlDatabaseCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlDatabaseResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlDatabaseCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlDatabaseResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a SQL database. - public CosmosDBSqlDatabaseResourceInfo Resource { get; set; } + internal CosmosDBSqlDatabaseResourceInfo Resource { get; set; } + /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseData.Serialization.cs index 3bcedb5056c0..daf32bf6fd3c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CosmosDBSqlDatabaseData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static CosmosDBSqlDatabaseData DeserializeCosmosDBSqlDatabaseData(JsonE { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static CosmosDBSqlDatabaseData DeserializeCosmosDBSqlDatabaseData(JsonE Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static CosmosDBSqlDatabaseData DeserializeCosmosDBSqlDatabaseData(JsonE continue; } } - return new CosmosDBSqlDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new CosmosDBSqlDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs index ee3a859c721c..f9bd45d4db3b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs @@ -17,16 +17,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -37,8 +27,6 @@ internal static CosmosDBSqlDatabaseResourceInfo DeserializeCosmosDBSqlDatabaseRe return null; } string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -46,26 +34,8 @@ internal static CosmosDBSqlDatabaseResourceInfo DeserializeCosmosDBSqlDatabaseRe id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new CosmosDBSqlDatabaseResourceInfo(id, restoreParameters.Value, Optional.ToNullable(createMode)); + return new CosmosDBSqlDatabaseResourceInfo(id); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs index 32f24c161891..c9f51d54397a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs @@ -23,22 +23,7 @@ public CosmosDBSqlDatabaseResourceInfo(string databaseName) DatabaseName = databaseName; } - /// Initializes a new instance of CosmosDBSqlDatabaseResourceInfo. - /// Name of the Cosmos DB SQL database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - internal CosmosDBSqlDatabaseResourceInfo(string databaseName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode) - { - DatabaseName = databaseName; - RestoreParameters = restoreParameters; - CreateMode = createMode; - } - /// Name of the Cosmos DB SQL database. public string DatabaseName { get; set; } - /// Parameters to indicate the information about the restore. - public ResourceRestoreParameters RestoreParameters { get; set; } - /// Enum to indicate the mode of resource creation. - public CosmosDBAccountCreateMode? CreateMode { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs index 089b7f4e969c..4bca66dd230e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CosmosDBSqlStoredProcedureCreateOrUpdateContent : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CosmosDBSqlStoredProcedureCreateOrUpdateContent DeserializeCosmo { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CosmosDBSqlStoredProcedureCreateOrUpdateContent DeserializeCosmo Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CosmosDBSqlStoredProcedureCreateOrUpdateContent DeserializeCosmo continue; } } - return new CosmosDBSqlStoredProcedureCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CosmosDBSqlStoredProcedureCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.cs index 80a17f74fa0d..0bb4a01c6807 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.cs @@ -35,19 +35,15 @@ public CosmosDBSqlStoredProcedureCreateOrUpdateContent(AzureLocation location, C /// The location. /// The standard JSON format of a storedProcedure. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CosmosDBSqlStoredProcedureCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlStoredProcedureResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlStoredProcedureCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlStoredProcedureResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a storedProcedure. public CosmosDBSqlStoredProcedureResourceInfo Resource { get; set; } /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureData.Serialization.cs index ad3cd65b49c7..b02d9f25d4af 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CosmosDBSqlStoredProcedureData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -54,7 +48,6 @@ internal static CosmosDBSqlStoredProcedureData DeserializeCosmosDBSqlStoredProce { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -64,16 +57,6 @@ internal static CosmosDBSqlStoredProcedureData DeserializeCosmosDBSqlStoredProce Optional resource = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -139,7 +122,7 @@ internal static CosmosDBSqlStoredProcedureData DeserializeCosmosDBSqlStoredProce continue; } } - return new CosmosDBSqlStoredProcedureData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, identity); + return new CosmosDBSqlStoredProcedureData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs index d655d926493a..6ec0bf004290 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CosmosDBSqlTriggerCreateOrUpdateContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CosmosDBSqlTriggerCreateOrUpdateContent DeserializeCosmosDBSqlTr { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CosmosDBSqlTriggerCreateOrUpdateContent DeserializeCosmosDBSqlTr Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CosmosDBSqlTriggerCreateOrUpdateContent DeserializeCosmosDBSqlTr continue; } } - return new CosmosDBSqlTriggerCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CosmosDBSqlTriggerCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.cs index 20723c0567a6..85ec9d2cce9c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.cs @@ -35,19 +35,15 @@ public CosmosDBSqlTriggerCreateOrUpdateContent(AzureLocation location, CosmosDBS /// The location. /// The standard JSON format of a trigger. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CosmosDBSqlTriggerCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlTriggerResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlTriggerCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlTriggerResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a trigger. public CosmosDBSqlTriggerResourceInfo Resource { get; set; } /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerData.Serialization.cs index ac823134606e..ebe108c3bf71 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CosmosDBSqlTriggerData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -54,7 +48,6 @@ internal static CosmosDBSqlTriggerData DeserializeCosmosDBSqlTriggerData(JsonEle { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -64,16 +57,6 @@ internal static CosmosDBSqlTriggerData DeserializeCosmosDBSqlTriggerData(JsonEle Optional resource = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -139,7 +122,7 @@ internal static CosmosDBSqlTriggerData DeserializeCosmosDBSqlTriggerData(JsonEle continue; } } - return new CosmosDBSqlTriggerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, identity); + return new CosmosDBSqlTriggerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs index 97d293746992..40cd3e0b4684 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent DeserializeC { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent DeserializeC Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent DeserializeC continue; } } - return new CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.cs index f8f6d1c82238..789a806d279c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.cs @@ -35,19 +35,15 @@ public CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(AzureLocation locatio /// The location. /// The standard JSON format of a userDefinedFunction. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlUserDefinedFunctionResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBSqlUserDefinedFunctionResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a userDefinedFunction. public CosmosDBSqlUserDefinedFunctionResourceInfo Resource { get; set; } /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionData.Serialization.cs index 94b16baee621..ef2f37c38496 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CosmosDBSqlUserDefinedFunctionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -54,7 +48,6 @@ internal static CosmosDBSqlUserDefinedFunctionData DeserializeCosmosDBSqlUserDef { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -64,16 +57,6 @@ internal static CosmosDBSqlUserDefinedFunctionData DeserializeCosmosDBSqlUserDef Optional resource = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -139,7 +122,7 @@ internal static CosmosDBSqlUserDefinedFunctionData DeserializeCosmosDBSqlUserDef continue; } } - return new CosmosDBSqlUserDefinedFunctionData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, identity); + return new CosmosDBSqlUserDefinedFunctionData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs index b77198926556..b0d0203b9e90 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class CosmosDBTableCreateOrUpdateContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static CosmosDBTableCreateOrUpdateContent DeserializeCosmosDBTableCreat { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static CosmosDBTableCreateOrUpdateContent DeserializeCosmosDBTableCreat Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static CosmosDBTableCreateOrUpdateContent DeserializeCosmosDBTableCreat continue; } } - return new CosmosDBTableCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new CosmosDBTableCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.cs index e60249d45c79..3dd2da30879d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.cs @@ -35,19 +35,16 @@ public CosmosDBTableCreateOrUpdateContent(AzureLocation location, CosmosDBTableR /// The location. /// The standard JSON format of a Table. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal CosmosDBTableCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBTableResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal CosmosDBTableCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBTableResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a Table. - public CosmosDBTableResourceInfo Resource { get; set; } + internal CosmosDBTableResourceInfo Resource { get; set; } + /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableData.Serialization.cs index 1ec2607433ae..2160dcb5d81d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableData.Serialization.cs @@ -18,12 +18,6 @@ public partial class CosmosDBTableData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static CosmosDBTableData DeserializeCosmosDBTableData(JsonElement eleme { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static CosmosDBTableData DeserializeCosmosDBTableData(JsonElement eleme Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static CosmosDBTableData DeserializeCosmosDBTableData(JsonElement eleme continue; } } - return new CosmosDBTableData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new CosmosDBTableData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs index 4700291134cc..a6991e73d1a3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs @@ -18,16 +18,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(TableName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -41,8 +31,6 @@ internal static CosmosDBTablePropertiesResource DeserializeCosmosDBTableProperti Optional ts = default; Optional etag = default; string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_rid"u8)) @@ -73,26 +61,8 @@ internal static CosmosDBTablePropertiesResource DeserializeCosmosDBTableProperti id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new CosmosDBTablePropertiesResource(id, restoreParameters.Value, Optional.ToNullable(createMode), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new CosmosDBTablePropertiesResource(id, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.cs index 39916accdaf6..30b6ff292cb4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.cs @@ -24,13 +24,14 @@ public CosmosDBTablePropertiesResource(string tableName) : base(tableName) /// Initializes a new instance of CosmosDBTablePropertiesResource. /// Name of the Cosmos DB table. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal CosmosDBTablePropertiesResource(string tableName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, string rid, float? timestamp, ETag? etag) : base(tableName, restoreParameters, createMode) + /// is null. + internal CosmosDBTablePropertiesResource(string tableName, string rid, float? timestamp, ETag? etag) : base(tableName) { + Argument.AssertNotNull(tableName, nameof(tableName)); + Rid = rid; Timestamp = timestamp; ETag = etag; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs index e2828c99204b..90b92f913e7f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs @@ -17,16 +17,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(TableName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -37,8 +27,6 @@ internal static CosmosDBTableResourceInfo DeserializeCosmosDBTableResourceInfo(J return null; } string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -46,26 +34,8 @@ internal static CosmosDBTableResourceInfo DeserializeCosmosDBTableResourceInfo(J id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new CosmosDBTableResourceInfo(id, restoreParameters.Value, Optional.ToNullable(createMode)); + return new CosmosDBTableResourceInfo(id); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs index 198d4080ceb2..023ab9f31fdb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs @@ -23,22 +23,7 @@ public CosmosDBTableResourceInfo(string tableName) TableName = tableName; } - /// Initializes a new instance of CosmosDBTableResourceInfo. - /// Name of the Cosmos DB table. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - internal CosmosDBTableResourceInfo(string tableName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode) - { - TableName = tableName; - RestoreParameters = restoreParameters; - CreateMode = createMode; - } - /// Name of the Cosmos DB table. public string TableName { get; set; } - /// Parameters to indicate the information about the restore. - public ResourceRestoreParameters RestoreParameters { get; set; } - /// Enum to indicate the mode of resource creation. - public CosmosDBAccountCreateMode? CreateMode { 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 deleted file mode 100644 index 77100d389fd9..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CosmosMongoDataTransferDataSourceSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("collectionName"u8); - writer.WriteStringValue(CollectionName); - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - writer.WriteEndObject(); - } - - internal static CosmosMongoDataTransferDataSourceSink DeserializeCosmosMongoDataTransferDataSourceSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string databaseName = default; - string collectionName = default; - DataTransferComponent component = default; - 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; - } - } - return new CosmosMongoDataTransferDataSourceSink(component, databaseName, collectionName); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.cs deleted file mode 100644 index e6277f0c865c..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// A CosmosDB Cassandra API data source/sink. - public partial class CosmosMongoDataTransferDataSourceSink : DataTransferDataSourceSink - { - /// Initializes a new instance of CosmosMongoDataTransferDataSourceSink. - /// - /// - /// or is null. - public CosmosMongoDataTransferDataSourceSink(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 CosmosMongoDataTransferDataSourceSink. - /// - /// - /// - internal CosmosMongoDataTransferDataSourceSink(DataTransferComponent component, string databaseName, string collectionName) : base(component) - { - DatabaseName = databaseName; - CollectionName = collectionName; - Component = component; - } - - /// Gets or sets the database name. - public string DatabaseName { get; set; } - /// Gets or sets the collection name. - public string CollectionName { 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 deleted file mode 100644 index 8b29a34e28eb..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class CosmosSqlDataTransferDataSourceSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - writer.WriteEndObject(); - } - - internal static CosmosSqlDataTransferDataSourceSink DeserializeCosmosSqlDataTransferDataSourceSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string databaseName = default; - string containerName = default; - DataTransferComponent component = default; - 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; - } - } - return new CosmosSqlDataTransferDataSourceSink(component, databaseName, containerName); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.cs deleted file mode 100644 index a7fb15827cfc..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// A CosmosDB Cassandra API data source/sink. - public partial class CosmosSqlDataTransferDataSourceSink : DataTransferDataSourceSink - { - /// Initializes a new instance of CosmosSqlDataTransferDataSourceSink. - /// - /// - /// or is null. - public CosmosSqlDataTransferDataSourceSink(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 CosmosSqlDataTransferDataSourceSink. - /// - /// - /// - internal CosmosSqlDataTransferDataSourceSink(DataTransferComponent component, string databaseName, string containerName) : base(component) - { - DatabaseName = databaseName; - ContainerName = containerName; - Component = component; - } - - /// Gets or sets the database name. - public string DatabaseName { get; set; } - /// Gets or sets the container name. - public string ContainerName { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferComponent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferComponent.cs deleted file mode 100644 index 8fe52133c90c..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferComponent.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The DataTransferComponent. - internal readonly partial struct DataTransferComponent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataTransferComponent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CosmosDBCassandraValue = "CosmosDBCassandra"; - private const string CosmosDBMongoValue = "CosmosDBMongo"; - private const string CosmosDBSqlValue = "CosmosDBSql"; - private const string AzureBlobStorageValue = "AzureBlobStorage"; - - /// CosmosDBCassandra. - public static DataTransferComponent CosmosDBCassandra { get; } = new DataTransferComponent(CosmosDBCassandraValue); - /// CosmosDBMongo. - public static DataTransferComponent CosmosDBMongo { get; } = new DataTransferComponent(CosmosDBMongoValue); - /// CosmosDBSql. - public static DataTransferComponent CosmosDBSql { get; } = new DataTransferComponent(CosmosDBSqlValue); - /// AzureBlobStorage. - public static DataTransferComponent AzureBlobStorage { get; } = new DataTransferComponent(AzureBlobStorageValue); - /// Determines if two values are the same. - public static bool operator ==(DataTransferComponent left, DataTransferComponent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataTransferComponent left, DataTransferComponent right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataTransferComponent(string value) => new DataTransferComponent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataTransferComponent other && Equals(other); - /// - public bool Equals(DataTransferComponent other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.Serialization.cs deleted file mode 100644 index 18b7e82150b9..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class DataTransferDataSourceSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - writer.WriteEndObject(); - } - - internal static DataTransferDataSourceSink DeserializeDataTransferDataSourceSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("component", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AzureBlobStorage": return AzureBlobDataTransferDataSourceSink.DeserializeAzureBlobDataTransferDataSourceSink(element); - case "CosmosDBCassandra": return CosmosCassandraDataTransferDataSourceSink.DeserializeCosmosCassandraDataTransferDataSourceSink(element); - case "CosmosDBMongo": return CosmosMongoDataTransferDataSourceSink.DeserializeCosmosMongoDataTransferDataSourceSink(element); - case "CosmosDBSql": return CosmosSqlDataTransferDataSourceSink.DeserializeCosmosSqlDataTransferDataSourceSink(element); - } - } - return UnknownDataTransferDataSourceSink.DeserializeUnknownDataTransferDataSourceSink(element); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.cs deleted file mode 100644 index 059b843564a1..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// - /// Base class for all DataTransfer source/sink - /// 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 DataTransferDataSourceSink - { - /// Initializes a new instance of DataTransferDataSourceSink. - protected DataTransferDataSourceSink() - { - } - - /// Initializes a new instance of DataTransferDataSourceSink. - /// - internal DataTransferDataSourceSink(DataTransferComponent component) - { - Component = component; - } - - /// Gets or sets the component. - internal DataTransferComponent Component { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.Serialization.cs deleted file mode 100644 index a5626af72bfc..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class DataTransferJobFeedResults - { - internal static DataTransferJobFeedResults DeserializeDataTransferJobFeedResults(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataTransferJobFeedResults(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.cs deleted file mode 100644 index 4f5732927f45..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The List operation response, that contains the Data Transfer jobs and their properties. - internal partial class DataTransferJobFeedResults - { - /// Initializes a new instance of DataTransferJobFeedResults. - internal DataTransferJobFeedResults() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of DataTransferJobFeedResults. - /// List of Data Transfer jobs and their properties. - /// URL to get the next set of Data Transfer job list results if there are any. - internal DataTransferJobFeedResults(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of Data Transfer jobs and their properties. - public IReadOnlyList Value { get; } - /// URL to get the next set of Data Transfer job list results if there are any. - public string NextLink { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index 50264c062a8a..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class DataTransferJobGetResultCreateOrUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataTransferJobGetResultCreateOrUpdateContent DeserializeDataTransferJobGetResultCreateOrUpdateContent(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataTransferJobProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataTransferJobProperties.DeserializeDataTransferJobProperties(property.Value); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataTransferJobGetResultCreateOrUpdateContent(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.cs deleted file mode 100644 index 687566d4986b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Parameters to create Data Transfer Job. - public partial class DataTransferJobGetResultCreateOrUpdateContent : ResourceData - { - /// Initializes a new instance of DataTransferJobGetResultCreateOrUpdateContent. - /// Data Transfer Create Job Properties. - /// is null. - public DataTransferJobGetResultCreateOrUpdateContent(DataTransferJobProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataTransferJobGetResultCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Data Transfer Create Job Properties. - internal DataTransferJobGetResultCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataTransferJobProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// Data Transfer Create Job Properties. - public DataTransferJobProperties Properties { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultData.Serialization.cs deleted file mode 100644 index e6e4f90db295..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultData.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - public partial class DataTransferJobGetResultData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Source)) - { - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source); - } - if (Optional.IsDefined(Destination)) - { - writer.WritePropertyName("destination"u8); - writer.WriteObjectValue(Destination); - } - if (Optional.IsDefined(WorkerCount)) - { - writer.WritePropertyName("workerCount"u8); - writer.WriteNumberValue(WorkerCount.Value); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static DataTransferJobGetResultData DeserializeDataTransferJobGetResultData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional jobName = default; - Optional source = default; - Optional destination = default; - Optional status = default; - Optional processedCount = default; - Optional totalCount = default; - Optional lastUpdatedUtcTime = default; - Optional workerCount = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("jobName"u8)) - { - jobName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("source"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - source = DataTransferDataSourceSink.DeserializeDataTransferDataSourceSink(property0.Value); - continue; - } - if (property0.NameEquals("destination"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - destination = DataTransferDataSourceSink.DeserializeDataTransferDataSourceSink(property0.Value); - continue; - } - if (property0.NameEquals("status"u8)) - { - status = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("processedCount"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - processedCount = property0.Value.GetInt64(); - continue; - } - if (property0.NameEquals("totalCount"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - totalCount = property0.Value.GetInt64(); - continue; - } - if (property0.NameEquals("lastUpdatedUtcTime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastUpdatedUtcTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("workerCount"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - workerCount = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("error"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = ErrorResponse.DeserializeErrorResponse(property0.Value); - continue; - } - } - continue; - } - } - return new DataTransferJobGetResultData(id, name, type, systemData.Value, jobName.Value, source.Value, destination.Value, status.Value, Optional.ToNullable(processedCount), Optional.ToNullable(totalCount), Optional.ToNullable(lastUpdatedUtcTime), Optional.ToNullable(workerCount), error.Value); - } - } -} 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 deleted file mode 100644 index c148a0979f39..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class DataTransferJobProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source); - writer.WritePropertyName("destination"u8); - writer.WriteObjectValue(Destination); - if (Optional.IsDefined(WorkerCount)) - { - writer.WritePropertyName("workerCount"u8); - writer.WriteNumberValue(WorkerCount.Value); - } - writer.WriteEndObject(); - } - - internal static DataTransferJobProperties DeserializeDataTransferJobProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional jobName = default; - DataTransferDataSourceSink source = default; - DataTransferDataSourceSink destination = default; - Optional status = default; - Optional processedCount = default; - Optional totalCount = default; - Optional lastUpdatedUtcTime = default; - Optional workerCount = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("jobName"u8)) - { - jobName = property.Value.GetString(); - continue; - } - if (property.NameEquals("source"u8)) - { - source = DataTransferDataSourceSink.DeserializeDataTransferDataSourceSink(property.Value); - continue; - } - if (property.NameEquals("destination"u8)) - { - destination = DataTransferDataSourceSink.DeserializeDataTransferDataSourceSink(property.Value); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("processedCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - processedCount = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("totalCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - totalCount = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("lastUpdatedUtcTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastUpdatedUtcTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("workerCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - workerCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = ErrorResponse.DeserializeErrorResponse(property.Value); - continue; - } - } - return new DataTransferJobProperties(jobName.Value, source, destination, status.Value, Optional.ToNullable(processedCount), Optional.ToNullable(totalCount), Optional.ToNullable(lastUpdatedUtcTime), Optional.ToNullable(workerCount), error.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs deleted file mode 100644 index 89b16311715f..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The properties of a DataTransfer Job. - public partial class DataTransferJobProperties - { - /// Initializes a new instance of DataTransferJobProperties. - /// - /// Source DataStore details - /// 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 . - /// - /// - /// Destination DataStore details - /// 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 DataTransferJobProperties(DataTransferDataSourceSink source, DataTransferDataSourceSink destination) - { - Argument.AssertNotNull(source, nameof(source)); - Argument.AssertNotNull(destination, nameof(destination)); - - Source = source; - Destination = destination; - } - - /// Initializes a new instance of DataTransferJobProperties. - /// Job Name. - /// - /// Source DataStore details - /// 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 . - /// - /// - /// Destination DataStore details - /// 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. - /// Last Updated Time (ISO-8601 format). - /// Worker count. - /// Error response for Faulted job. - internal DataTransferJobProperties(string jobName, DataTransferDataSourceSink source, DataTransferDataSourceSink destination, string status, long? processedCount, long? totalCount, DateTimeOffset? lastUpdatedUtcOn, int? workerCount, ErrorResponse error) - { - JobName = jobName; - Source = source; - Destination = destination; - Status = status; - ProcessedCount = processedCount; - TotalCount = totalCount; - LastUpdatedUtcOn = lastUpdatedUtcOn; - WorkerCount = workerCount; - Error = error; - } - - /// Job Name. - public string JobName { get; } - /// - /// Source DataStore details - /// 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 DataTransferDataSourceSink Source { get; set; } - /// - /// Destination DataStore details - /// 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 DataTransferDataSourceSink Destination { get; set; } - /// Job Status. - public string Status { get; } - /// Processed Count. - public long? ProcessedCount { get; } - /// Total Count. - public long? TotalCount { get; } - /// Last Updated Time (ISO-8601 format). - public DateTimeOffset? LastUpdatedUtcOn { get; } - /// Worker count. - public int? WorkerCount { get; set; } - /// Error response for Faulted job. - public ErrorResponse Error { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.Serialization.cs deleted file mode 100644 index 027ef163f75d..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class DiagnosticLogSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EnableFullTextQuery)) - { - writer.WritePropertyName("enableFullTextQuery"u8); - writer.WriteStringValue(EnableFullTextQuery.Value.ToSerialString()); - } - writer.WriteEndObject(); - } - - internal static DiagnosticLogSettings DeserializeDiagnosticLogSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional enableFullTextQuery = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("enableFullTextQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableFullTextQuery = property.Value.GetString().ToEnableFullTextQuery(); - continue; - } - } - return new DiagnosticLogSettings(Optional.ToNullable(enableFullTextQuery)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.cs deleted file mode 100644 index ab09dc037d3b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Indicates what diagnostic log settings are to be enabled. - internal partial class DiagnosticLogSettings - { - /// Initializes a new instance of DiagnosticLogSettings. - public DiagnosticLogSettings() - { - } - - /// Initializes a new instance of DiagnosticLogSettings. - /// Describe the level of detail with which queries are to be logged. - internal DiagnosticLogSettings(EnableFullTextQuery? enableFullTextQuery) - { - EnableFullTextQuery = enableFullTextQuery; - } - - /// Describe the level of detail with which queries are to be logged. - public EnableFullTextQuery? EnableFullTextQuery { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/EnableFullTextQuery.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/EnableFullTextQuery.Serialization.cs deleted file mode 100644 index f17d5acd7bf8..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/EnableFullTextQuery.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal static partial class EnableFullTextQueryExtensions - { - public static string ToSerialString(this EnableFullTextQuery value) => value switch - { - EnableFullTextQuery.None => "None", - EnableFullTextQuery.True => "True", - EnableFullTextQuery.False => "False", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnableFullTextQuery value.") - }; - - public static EnableFullTextQuery ToEnableFullTextQuery(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "None")) return EnableFullTextQuery.None; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "True")) return EnableFullTextQuery.True; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "False")) return EnableFullTextQuery.False; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnableFullTextQuery value."); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/EnableFullTextQuery.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/EnableFullTextQuery.cs deleted file mode 100644 index e851f23ff12e..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/EnableFullTextQuery.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Describe the level of detail with which queries are to be logged. - public enum EnableFullTextQuery - { - /// None. - None, - /// True. - True, - /// False. - False - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ErrorResponse.Serialization.cs deleted file mode 100644 index 449f73ea730e..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ErrorResponse.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class ErrorResponse - { - internal static ErrorResponse DeserializeErrorResponse(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional code = default; - Optional message = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - } - return new ErrorResponse(code.Value, message.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ErrorResponse.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ErrorResponse.cs deleted file mode 100644 index f8007d3f4575..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ErrorResponse.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Error Response. - public partial class ErrorResponse - { - /// Initializes a new instance of ErrorResponse. - internal ErrorResponse() - { - } - - /// Initializes a new instance of ErrorResponse. - /// Error code. - /// Error message indicating why the operation failed. - internal ErrorResponse(string code, string message) - { - Code = code; - Message = message; - } - - /// Error code. - public string Code { get; } - /// Error message indicating why the operation failed. - public string Message { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs index 89be68ef783c..308ba44d7768 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs @@ -53,21 +53,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("analyticalStorageTtl"u8); writer.WriteNumberValue(AnalyticalStorageTtl.Value); } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(MaterializedViewDefinition)) - { - writer.WritePropertyName("materializedViewDefinition"u8); - writer.WriteObjectValue(MaterializedViewDefinition); - } writer.WriteEndObject(); } @@ -88,9 +73,6 @@ internal static ExtendedCosmosDBSqlContainerResourceInfo DeserializeExtendedCosm Optional conflictResolutionPolicy = default; Optional clientEncryptionPolicy = default; Optional analyticalStorageTtl = default; - Optional restoreParameters = default; - Optional createMode = default; - Optional materializedViewDefinition = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_rid"u8)) @@ -184,35 +166,8 @@ internal static ExtendedCosmosDBSqlContainerResourceInfo DeserializeExtendedCosm analyticalStorageTtl = property.Value.GetInt64(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("materializedViewDefinition"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - materializedViewDefinition = MaterializedViewDefinition.DeserializeMaterializedViewDefinition(property.Value); - continue; - } } - return new ExtendedCosmosDBSqlContainerResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, clientEncryptionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), restoreParameters.Value, Optional.ToNullable(createMode), materializedViewDefinition.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new ExtendedCosmosDBSqlContainerResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, clientEncryptionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.cs index 0aa13a3dc1c2..44df52589c30 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.cs @@ -31,13 +31,10 @@ public ExtendedCosmosDBSqlContainerResourceInfo(string containerName) : base(con /// The conflict resolution policy for the container. /// The client encryption policy for the container. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - /// The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal ExtendedCosmosDBSqlContainerResourceInfo(string containerName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, CosmosDBClientEncryptionPolicy clientEncryptionPolicy, long? analyticalStorageTtl, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, MaterializedViewDefinition materializedViewDefinition, string rid, float? timestamp, ETag? etag) : base(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeyPolicy, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl, restoreParameters, createMode, materializedViewDefinition) + internal ExtendedCosmosDBSqlContainerResourceInfo(string containerName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, CosmosDBClientEncryptionPolicy clientEncryptionPolicy, long? analyticalStorageTtl, string rid, float? timestamp, ETag? etag) : base(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeyPolicy, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl) { Rid = rid; Timestamp = timestamp; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs index 8192d59d385d..f1d1d2c11c0e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs @@ -28,16 +28,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -53,8 +43,6 @@ internal static ExtendedCosmosDBSqlDatabaseResourceInfo DeserializeExtendedCosmo Optional ts = default; Optional etag = default; string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_colls"u8)) @@ -95,26 +83,8 @@ internal static ExtendedCosmosDBSqlDatabaseResourceInfo DeserializeExtendedCosmo id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new ExtendedCosmosDBSqlDatabaseResourceInfo(id, restoreParameters.Value, Optional.ToNullable(createMode), colls.Value, users.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new ExtendedCosmosDBSqlDatabaseResourceInfo(id, colls.Value, users.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.cs index 633d255e9f52..e90f28f78a6b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.cs @@ -24,15 +24,16 @@ public ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName) : base(datab /// Initializes a new instance of ExtendedCosmosDBSqlDatabaseResourceInfo. /// Name of the Cosmos DB SQL database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property that specified the addressable path of the collections resource. /// A system generated property that specifies the addressable path of the users resource. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, string colls, string users, string rid, float? timestamp, ETag? etag) : base(databaseName, restoreParameters, createMode) + /// is null. + internal ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName, string colls, string users, string rid, float? timestamp, ETag? etag) : base(databaseName) { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Colls = colls; Users = users; Rid = rid; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs index ef0408ba067c..4ba02e6b0aab 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs @@ -18,16 +18,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -41,8 +31,6 @@ internal static ExtendedGremlinDatabaseResourceInfo DeserializeExtendedGremlinDa Optional ts = default; Optional etag = default; string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_rid"u8)) @@ -73,26 +61,8 @@ internal static ExtendedGremlinDatabaseResourceInfo DeserializeExtendedGremlinDa id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new ExtendedGremlinDatabaseResourceInfo(id, restoreParameters.Value, Optional.ToNullable(createMode), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new ExtendedGremlinDatabaseResourceInfo(id, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.cs index 13e9b219629d..7c3194f4f693 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.cs @@ -24,13 +24,14 @@ public ExtendedGremlinDatabaseResourceInfo(string databaseName) : base(databaseN /// Initializes a new instance of ExtendedGremlinDatabaseResourceInfo. /// Name of the Cosmos DB Gremlin database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal ExtendedGremlinDatabaseResourceInfo(string databaseName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, string rid, float? timestamp, ETag? etag) : base(databaseName, restoreParameters, createMode) + /// is null. + internal ExtendedGremlinDatabaseResourceInfo(string databaseName, string rid, float? timestamp, ETag? etag) : base(databaseName) { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Rid = rid; Timestamp = timestamp; ETag = etag; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs index d222c10901ae..9ab9d233b93d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs @@ -48,16 +48,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("analyticalStorageTtl"u8); writer.WriteNumberValue(AnalyticalStorageTtl.Value); } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -77,8 +67,6 @@ internal static ExtendedGremlinGraphResourceInfo DeserializeExtendedGremlinGraph Optional uniqueKeyPolicy = default; Optional conflictResolutionPolicy = default; Optional analyticalStorageTtl = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_rid"u8)) @@ -163,26 +151,8 @@ internal static ExtendedGremlinGraphResourceInfo DeserializeExtendedGremlinGraph analyticalStorageTtl = property.Value.GetInt64(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new ExtendedGremlinGraphResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), restoreParameters.Value, Optional.ToNullable(createMode), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new ExtendedGremlinGraphResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.cs index 51d36df553d4..bd40b8892dee 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.cs @@ -30,12 +30,10 @@ public ExtendedGremlinGraphResourceInfo(string graphName) : base(graphName) /// The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. /// The conflict resolution policy for the graph. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal ExtendedGremlinGraphResourceInfo(string graphName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, long? analyticalStorageTtl, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, string rid, float? timestamp, ETag? etag) : base(graphName, indexingPolicy, partitionKey, defaultTtl, uniqueKeyPolicy, conflictResolutionPolicy, analyticalStorageTtl, restoreParameters, createMode) + internal ExtendedGremlinGraphResourceInfo(string graphName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, long? analyticalStorageTtl, string rid, float? timestamp, ETag? etag) : base(graphName, indexingPolicy, partitionKey, defaultTtl, uniqueKeyPolicy, conflictResolutionPolicy, analyticalStorageTtl) { Rid = rid; Timestamp = timestamp; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs index 8a0eb7cd7c6d..39c794416a4d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs @@ -45,16 +45,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("analyticalStorageTtl"u8); writer.WriteNumberValue(AnalyticalStorageTtl.Value); } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -71,8 +61,6 @@ internal static ExtendedMongoDBCollectionResourceInfo DeserializeExtendedMongoDB Optional> shardKey = default; Optional> indexes = default; Optional analyticalStorageTtl = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_rid"u8)) @@ -140,26 +128,8 @@ internal static ExtendedMongoDBCollectionResourceInfo DeserializeExtendedMongoDB analyticalStorageTtl = property.Value.GetInt32(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new ExtendedMongoDBCollectionResourceInfo(id, Optional.ToDictionary(shardKey), Optional.ToList(indexes), Optional.ToNullable(analyticalStorageTtl), restoreParameters.Value, Optional.ToNullable(createMode), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new ExtendedMongoDBCollectionResourceInfo(id, Optional.ToDictionary(shardKey), Optional.ToList(indexes), Optional.ToNullable(analyticalStorageTtl), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.cs index 5868c8a95971..92b87c9d1308 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.cs @@ -28,12 +28,10 @@ public ExtendedMongoDBCollectionResourceInfo(string collectionName) : base(colle /// A key-value pair of shard keys to be applied for the request. /// List of index keys. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal ExtendedMongoDBCollectionResourceInfo(string collectionName, IDictionary shardKey, IList indexes, int? analyticalStorageTtl, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, string rid, float? timestamp, ETag? etag) : base(collectionName, shardKey, indexes, analyticalStorageTtl, restoreParameters, createMode) + internal ExtendedMongoDBCollectionResourceInfo(string collectionName, IDictionary shardKey, IList indexes, int? analyticalStorageTtl, string rid, float? timestamp, ETag? etag) : base(collectionName, shardKey, indexes, analyticalStorageTtl) { Rid = rid; Timestamp = timestamp; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs index 1eecb9f4cf90..98d0fa372128 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs @@ -18,16 +18,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -41,8 +31,6 @@ internal static ExtendedMongoDBDatabaseResourceInfo DeserializeExtendedMongoDBDa Optional ts = default; Optional etag = default; string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_rid"u8)) @@ -73,26 +61,8 @@ internal static ExtendedMongoDBDatabaseResourceInfo DeserializeExtendedMongoDBDa id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new ExtendedMongoDBDatabaseResourceInfo(id, restoreParameters.Value, Optional.ToNullable(createMode), rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new ExtendedMongoDBDatabaseResourceInfo(id, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.cs index 5ccbde252b25..ed9c57c0c0fd 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.cs @@ -24,13 +24,14 @@ public ExtendedMongoDBDatabaseResourceInfo(string databaseName) : base(databaseN /// Initializes a new instance of ExtendedMongoDBDatabaseResourceInfo. /// Name of the Cosmos DB MongoDB database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal ExtendedMongoDBDatabaseResourceInfo(string databaseName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, string rid, float? timestamp, ETag? etag) : base(databaseName, restoreParameters, createMode) + /// is null. + internal ExtendedMongoDBDatabaseResourceInfo(string databaseName, string rid, float? timestamp, ETag? etag) : base(databaseName) { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Rid = rid; Timestamp = timestamp; ETag = etag; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs index 281833e22667..3d5ab3eb49ff 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs @@ -42,6 +42,8 @@ internal static ExtendedThroughputSettingsResourceInfo DeserializeExtendedThroug Optional autoscaleSettings = default; Optional minimumThroughput = default; Optional offerReplacePending = default; + Optional instantMaximumThroughput = default; + Optional softAllowedMaximumThroughput = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_rid"u8)) @@ -95,8 +97,18 @@ internal static ExtendedThroughputSettingsResourceInfo DeserializeExtendedThroug offerReplacePending = property.Value.GetString(); continue; } + if (property.NameEquals("instantMaximumThroughput"u8)) + { + instantMaximumThroughput = property.Value.GetString(); + continue; + } + if (property.NameEquals("softAllowedMaximumThroughput"u8)) + { + softAllowedMaximumThroughput = property.Value.GetString(); + continue; + } } - return new ExtendedThroughputSettingsResourceInfo(Optional.ToNullable(throughput), autoscaleSettings.Value, minimumThroughput.Value, offerReplacePending.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new ExtendedThroughputSettingsResourceInfo(Optional.ToNullable(throughput), autoscaleSettings.Value, minimumThroughput.Value, offerReplacePending.Value, instantMaximumThroughput.Value, softAllowedMaximumThroughput.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.cs index f19bfd8672e3..64a3bb91d059 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.cs @@ -22,10 +22,12 @@ public ExtendedThroughputSettingsResourceInfo() /// Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. /// The minimum throughput of the resource. /// The throughput replace is pending. + /// The offer throughput value to instantly scale up without triggering splits. + /// The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal ExtendedThroughputSettingsResourceInfo(int? throughput, AutoscaleSettingsResourceInfo autoscaleSettings, string minimumThroughput, string offerReplacePending, string rid, float? timestamp, ETag? etag) : base(throughput, autoscaleSettings, minimumThroughput, offerReplacePending) + internal ExtendedThroughputSettingsResourceInfo(int? throughput, AutoscaleSettingsResourceInfo autoscaleSettings, string minimumThroughput, string offerReplacePending, string instantMaximumThroughput, string softAllowedMaximumThroughput, string rid, float? timestamp, ETag? etag) : base(throughput, autoscaleSettings, minimumThroughput, offerReplacePending, instantMaximumThroughput, softAllowedMaximumThroughput) { Rid = rid; Timestamp = timestamp; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/FirewallRuleListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/FirewallRuleListResult.Serialization.cs deleted file mode 100644 index 4abf0d4bd83d..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/FirewallRuleListResult.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class FirewallRuleListResult - { - internal static FirewallRuleListResult DeserializeFirewallRuleListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CosmosDBFirewallRuleData.DeserializeCosmosDBFirewallRuleData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new FirewallRuleListResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/FirewallRuleListResult.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/FirewallRuleListResult.cs deleted file mode 100644 index 3b68f54eaea4..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/FirewallRuleListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// A list of firewall rules. - internal partial class FirewallRuleListResult - { - /// Initializes a new instance of FirewallRuleListResult. - internal FirewallRuleListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of FirewallRuleListResult. - /// The list of firewall rules in a mongo cluster. - /// The link used to get the next page of results. - internal FirewallRuleListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// The list of firewall rules in a mongo cluster. - public IReadOnlyList Value { get; } - /// The link used to get the next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.Serialization.cs deleted file mode 100644 index 240e041eb345..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class GraphResourceGetPropertiesOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings); - } - writer.WriteEndObject(); - } - - internal static GraphResourceGetPropertiesOptions DeserializeGraphResourceGetPropertiesOptions(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional throughput = default; - Optional autoscaleSettings = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("throughput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - throughput = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("autoscaleSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoscaleSettings = AutoscaleSettings.DeserializeAutoscaleSettings(property.Value); - continue; - } - } - return new GraphResourceGetPropertiesOptions(Optional.ToNullable(throughput), autoscaleSettings.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.cs deleted file mode 100644 index 44277e437b2a..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The GraphResourceGetPropertiesOptions. - public partial class GraphResourceGetPropertiesOptions : CosmosDBBaseConfig - { - /// Initializes a new instance of GraphResourceGetPropertiesOptions. - public GraphResourceGetPropertiesOptions() - { - } - - /// Initializes a new instance of GraphResourceGetPropertiesOptions. - /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. - /// Specifies the Autoscale settings. - internal GraphResourceGetPropertiesOptions(int? throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) - { - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index 0b4c8766a972..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class GraphResourceGetResultCreateOrUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("resource"u8); - JsonSerializer.Serialize(writer, Resource); if (Optional.IsDefined(Options)) - { - writer.WritePropertyName("options"u8); - writer.WriteObjectValue(Options); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static GraphResourceGetResultCreateOrUpdateContent DeserializeGraphResourceGetResultCreateOrUpdateContent(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - WritableSubResource resource = default; - Optional options = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resource"u8)) - { - resource = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("options"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - options = CosmosDBCreateUpdateConfig.DeserializeCosmosDBCreateUpdateConfig(property0.Value); - continue; - } - } - continue; - } - } - return new GraphResourceGetResultCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.cs deleted file mode 100644 index 9ae5c75ba76b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Parameters to create and update Cosmos DB Graph resource. - public partial class GraphResourceGetResultCreateOrUpdateContent : TrackedResourceData - { - /// Initializes a new instance of GraphResourceGetResultCreateOrUpdateContent. - /// The location. - /// The standard JSON format of a Graph resource. - /// is null. - public GraphResourceGetResultCreateOrUpdateContent(AzureLocation location, WritableSubResource resource) : base(location) - { - Argument.AssertNotNull(resource, nameof(resource)); - - Resource = resource; - } - - /// Initializes a new instance of GraphResourceGetResultCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a Graph resource. - /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal GraphResourceGetResultCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WritableSubResource resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) - { - Resource = resource; - Options = options; - Identity = identity; - } - - /// The standard JSON format of a Graph resource. - internal WritableSubResource Resource { get; set; } - /// Gets or sets Id. - public ResourceIdentifier ResourceId - { - get => Resource is null ? default : Resource.Id; - set - { - if (Resource is null) - Resource = new WritableSubResource(); - Resource.Id = value; - } - } - - /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultData.Serialization.cs deleted file mode 100644 index cf9cda31de2d..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultData.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - public partial class GraphResourceGetResultData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Resource)) - { - writer.WritePropertyName("resource"u8); - JsonSerializer.Serialize(writer, Resource); - } - if (Optional.IsDefined(Options)) - { - writer.WritePropertyName("options"u8); - writer.WriteObjectValue(Options); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static GraphResourceGetResultData DeserializeGraphResourceGetResultData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional resource = default; - Optional options = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resource"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resource = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("options"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - options = GraphResourceGetPropertiesOptions.DeserializeGraphResourceGetPropertiesOptions(property0.Value); - continue; - } - } - continue; - } - } - return new GraphResourceGetResultData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.Serialization.cs deleted file mode 100644 index a009a8b5f0d1..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class GraphResourcesListResult - { - internal static GraphResourcesListResult DeserializeGraphResourcesListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(GraphResourceGetResultData.DeserializeGraphResourceGetResultData(item)); - } - value = array; - continue; - } - } - return new GraphResourcesListResult(Optional.ToList(value)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.cs deleted file mode 100644 index 17ed1bba3f26..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The List operation response, that contains the Graph resource and their properties. - internal partial class GraphResourcesListResult - { - /// Initializes a new instance of GraphResourcesListResult. - internal GraphResourcesListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of GraphResourcesListResult. - /// List of Graph resource and their properties. - internal GraphResourcesListResult(IReadOnlyList value) - { - Value = value; - } - - /// List of Graph resource and their properties. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs index 4ca2ea4339aa..dcff726d7e0b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class GremlinDatabaseCreateOrUpdateContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static GremlinDatabaseCreateOrUpdateContent DeserializeGremlinDatabaseC { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static GremlinDatabaseCreateOrUpdateContent DeserializeGremlinDatabaseC Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static GremlinDatabaseCreateOrUpdateContent DeserializeGremlinDatabaseC continue; } } - return new GremlinDatabaseCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new GremlinDatabaseCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.cs index 76fec43eaa87..71504519c261 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.cs @@ -35,19 +35,16 @@ public GremlinDatabaseCreateOrUpdateContent(AzureLocation location, GremlinDatab /// The location. /// The standard JSON format of a Gremlin database. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal GremlinDatabaseCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GremlinDatabaseResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal GremlinDatabaseCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GremlinDatabaseResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a Gremlin database. - public GremlinDatabaseResourceInfo Resource { get; set; } + internal GremlinDatabaseResourceInfo Resource { get; set; } + /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseData.Serialization.cs index f3ae4854efb8..5dcb6a369a37 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseData.Serialization.cs @@ -18,12 +18,6 @@ public partial class GremlinDatabaseData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static GremlinDatabaseData DeserializeGremlinDatabaseData(JsonElement e { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static GremlinDatabaseData DeserializeGremlinDatabaseData(JsonElement e Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static GremlinDatabaseData DeserializeGremlinDatabaseData(JsonElement e continue; } } - return new GremlinDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new GremlinDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs index 47d4c618f589..9c0588dc8340 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs @@ -17,16 +17,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -37,8 +27,6 @@ internal static GremlinDatabaseResourceInfo DeserializeGremlinDatabaseResourceIn return null; } string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -46,26 +34,8 @@ internal static GremlinDatabaseResourceInfo DeserializeGremlinDatabaseResourceIn id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new GremlinDatabaseResourceInfo(id, restoreParameters.Value, Optional.ToNullable(createMode)); + return new GremlinDatabaseResourceInfo(id); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs index 7e65b23777df..ffeb4ac06d02 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs @@ -23,22 +23,7 @@ public GremlinDatabaseResourceInfo(string databaseName) DatabaseName = databaseName; } - /// Initializes a new instance of GremlinDatabaseResourceInfo. - /// Name of the Cosmos DB Gremlin database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - internal GremlinDatabaseResourceInfo(string databaseName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode) - { - DatabaseName = databaseName; - RestoreParameters = restoreParameters; - CreateMode = createMode; - } - /// Name of the Cosmos DB Gremlin database. public string DatabaseName { get; set; } - /// Parameters to indicate the information about the restore. - public ResourceRestoreParameters RestoreParameters { get; set; } - /// Enum to indicate the mode of resource creation. - public CosmosDBAccountCreateMode? CreateMode { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs index 1c736d62d710..7535ef75a017 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class GremlinGraphCreateOrUpdateContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static GremlinGraphCreateOrUpdateContent DeserializeGremlinGraphCreateO { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static GremlinGraphCreateOrUpdateContent DeserializeGremlinGraphCreateO Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static GremlinGraphCreateOrUpdateContent DeserializeGremlinGraphCreateO continue; } } - return new GremlinGraphCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new GremlinGraphCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.cs index 00d148d7fea1..def99159b47f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.cs @@ -35,19 +35,15 @@ public GremlinGraphCreateOrUpdateContent(AzureLocation location, GremlinGraphRes /// The location. /// The standard JSON format of a Gremlin graph. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal GremlinGraphCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GremlinGraphResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal GremlinGraphCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GremlinGraphResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a Gremlin graph. public GremlinGraphResourceInfo Resource { get; set; } /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphData.Serialization.cs index 9c3716a1f2b1..4ad122d85eae 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphData.Serialization.cs @@ -18,12 +18,6 @@ public partial class GremlinGraphData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static GremlinGraphData DeserializeGremlinGraphData(JsonElement element { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static GremlinGraphData DeserializeGremlinGraphData(JsonElement element Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static GremlinGraphData DeserializeGremlinGraphData(JsonElement element continue; } } - return new GremlinGraphData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new GremlinGraphData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs index dff8c74c4d86..f228f316477f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs @@ -47,16 +47,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("analyticalStorageTtl"u8); writer.WriteNumberValue(AnalyticalStorageTtl.Value); } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -73,8 +63,6 @@ internal static GremlinGraphResourceInfo DeserializeGremlinGraphResourceInfo(Jso Optional uniqueKeyPolicy = default; Optional conflictResolutionPolicy = default; Optional analyticalStorageTtl = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -136,26 +124,8 @@ internal static GremlinGraphResourceInfo DeserializeGremlinGraphResourceInfo(Jso analyticalStorageTtl = property.Value.GetInt64(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new GremlinGraphResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), restoreParameters.Value, Optional.ToNullable(createMode)); + return new GremlinGraphResourceInfo(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, Optional.ToNullable(analyticalStorageTtl)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs index 0fe7e6ad8e87..aa078db0a3f6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs @@ -32,9 +32,7 @@ public GremlinGraphResourceInfo(string graphName) /// The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. /// The conflict resolution policy for the graph. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - internal GremlinGraphResourceInfo(string graphName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, long? analyticalStorageTtl, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode) + internal GremlinGraphResourceInfo(string graphName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, long? analyticalStorageTtl) { GraphName = graphName; IndexingPolicy = indexingPolicy; @@ -43,8 +41,6 @@ internal GremlinGraphResourceInfo(string graphName, CosmosDBIndexingPolicy index UniqueKeyPolicy = uniqueKeyPolicy; ConflictResolutionPolicy = conflictResolutionPolicy; AnalyticalStorageTtl = analyticalStorageTtl; - RestoreParameters = restoreParameters; - CreateMode = createMode; } /// Name of the Cosmos DB Gremlin graph. @@ -72,9 +68,5 @@ public IList UniqueKeys public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } /// Analytical TTL. public long? AnalyticalStorageTtl { get; set; } - /// Parameters to indicate the information about the restore. - public ResourceRestoreParameters RestoreParameters { get; set; } - /// Enum to indicate the mode of resource creation. - public CosmosDBAccountCreateMode? CreateMode { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.Serialization.cs deleted file mode 100644 index 90fdc8cc1b07..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class ListBackups - { - internal static ListBackups DeserializeListBackups(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CassandraClusterBackupResourceData.DeserializeCassandraClusterBackupResourceData(item)); - } - value = array; - continue; - } - } - return new ListBackups(Optional.ToList(value)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.cs deleted file mode 100644 index bb47d5d85409..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// List of restorable backups for a Cassandra cluster. - internal partial class ListBackups - { - /// Initializes a new instance of ListBackups. - internal ListBackups() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of ListBackups. - /// Container for array of backups. - internal ListBackups(IReadOnlyList value) - { - Value = value; - } - - /// Container for array of backups. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListConnectionStringsResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListConnectionStringsResult.Serialization.cs deleted file mode 100644 index ac39ee474403..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListConnectionStringsResult.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class ListConnectionStringsResult - { - internal static ListConnectionStringsResult DeserializeListConnectionStringsResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> connectionStrings = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connectionStrings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CosmosDBConnectionString.DeserializeCosmosDBConnectionString(item)); - } - connectionStrings = array; - continue; - } - } - return new ListConnectionStringsResult(Optional.ToList(connectionStrings)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListConnectionStringsResult.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListConnectionStringsResult.cs deleted file mode 100644 index 1fbcd9855bcc..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListConnectionStringsResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The connection strings for the given mongo cluster. - public partial class ListConnectionStringsResult - { - /// Initializes a new instance of ListConnectionStringsResult. - internal ListConnectionStringsResult() - { - ConnectionStrings = new ChangeTrackingList(); - } - - /// Initializes a new instance of ListConnectionStringsResult. - /// An array that contains the connection strings for a mongo cluster. - internal ListConnectionStringsResult(IReadOnlyList connectionStrings) - { - ConnectionStrings = connectionStrings; - } - - /// An array that contains the connection strings for a mongo cluster. - public IReadOnlyList ConnectionStrings { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.Serialization.cs deleted file mode 100644 index 61e0620d9c49..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.Serialization.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class MaterializedViewDefinition : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("sourceCollectionId"u8); - writer.WriteStringValue(SourceCollectionId); - writer.WritePropertyName("definition"u8); - writer.WriteStringValue(Definition); - writer.WriteEndObject(); - } - - internal static MaterializedViewDefinition DeserializeMaterializedViewDefinition(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional sourceCollectionRid = default; - string sourceCollectionId = default; - string definition = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sourceCollectionRid"u8)) - { - sourceCollectionRid = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceCollectionId"u8)) - { - sourceCollectionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("definition"u8)) - { - definition = property.Value.GetString(); - continue; - } - } - return new MaterializedViewDefinition(sourceCollectionRid.Value, sourceCollectionId, definition); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.cs deleted file mode 100644 index 1df98d984e85..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Materialized View definition for the container. - public partial class MaterializedViewDefinition - { - /// Initializes a new instance of MaterializedViewDefinition. - /// The name of the source container on which the Materialized View will be created. - /// The definition should be an SQL query which would be used to fetch data from the source container to populate into the Materialized View container. - /// or is null. - public MaterializedViewDefinition(string sourceCollectionId, string definition) - { - Argument.AssertNotNull(sourceCollectionId, nameof(sourceCollectionId)); - Argument.AssertNotNull(definition, nameof(definition)); - - SourceCollectionId = sourceCollectionId; - Definition = definition; - } - - /// Initializes a new instance of MaterializedViewDefinition. - /// An unique identifier for the source collection. This is a system generated property. - /// The name of the source container on which the Materialized View will be created. - /// The definition should be an SQL query which would be used to fetch data from the source container to populate into the Materialized View container. - internal MaterializedViewDefinition(string sourceCollectionRid, string sourceCollectionId, string definition) - { - SourceCollectionRid = sourceCollectionRid; - SourceCollectionId = sourceCollectionId; - Definition = definition; - } - - /// An unique identifier for the source collection. This is a system generated property. - public string SourceCollectionRid { get; } - /// The name of the source container on which the Materialized View will be created. - public string SourceCollectionId { get; set; } - /// The definition should be an SQL query which would be used to fetch data from the source container to populate into the Materialized View container. - public string Definition { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.Serialization.cs deleted file mode 100644 index 77e01343c6e5..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class MergeParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsDryRun)) - { - writer.WritePropertyName("isDryRun"u8); - writer.WriteBooleanValue(IsDryRun.Value); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.cs deleted file mode 100644 index 1e87b8faea99..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The properties of an Azure Cosmos DB merge operations. - public partial class MergeParameters - { - /// Initializes a new instance of MergeParameters. - public MergeParameters() - { - } - - /// Specifies whether the operation is a real merge operation or a simulation. - public bool? IsDryRun { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterData.Serialization.cs deleted file mode 100644 index ea554cbcd68f..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterData.Serialization.cs +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - public partial class MongoClusterData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(AdministratorLogin)) - { - writer.WritePropertyName("administratorLogin"u8); - writer.WriteStringValue(AdministratorLogin); - } - if (Optional.IsDefined(AdministratorLoginPassword)) - { - writer.WritePropertyName("administratorLoginPassword"u8); - writer.WriteStringValue(AdministratorLoginPassword); - } - if (Optional.IsDefined(ServerVersion)) - { - writer.WritePropertyName("serverVersion"u8); - writer.WriteStringValue(ServerVersion); - } - if (Optional.IsCollectionDefined(NodeGroupSpecs)) - { - writer.WritePropertyName("nodeGroupSpecs"u8); - writer.WriteStartArray(); - foreach (var item in NodeGroupSpecs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static MongoClusterData DeserializeMongoClusterData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional createMode = default; - Optional restoreParameters = default; - Optional administratorLogin = default; - Optional administratorLoginPassword = default; - Optional serverVersion = default; - Optional connectionString = default; - Optional earliestRestoreTime = default; - Optional provisioningState = default; - Optional clusterStatus = default; - Optional> nodeGroupSpecs = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("createMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("restoreParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = MongoClusterRestoreParameters.DeserializeMongoClusterRestoreParameters(property0.Value); - continue; - } - if (property0.NameEquals("administratorLogin"u8)) - { - administratorLogin = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("administratorLoginPassword"u8)) - { - administratorLoginPassword = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("serverVersion"u8)) - { - serverVersion = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("connectionString"u8)) - { - connectionString = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("earliestRestoreTime"u8)) - { - earliestRestoreTime = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new CosmosDBProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("clusterStatus"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterStatus = new MongoClusterStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("nodeGroupSpecs"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(NodeGroupSpec.DeserializeNodeGroupSpec(item)); - } - nodeGroupSpecs = array; - continue; - } - } - continue; - } - } - return new MongoClusterData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(createMode), restoreParameters.Value, administratorLogin.Value, administratorLoginPassword.Value, serverVersion.Value, connectionString.Value, earliestRestoreTime.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(clusterStatus), Optional.ToList(nodeGroupSpecs)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterListResult.Serialization.cs deleted file mode 100644 index 07277be5f474..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterListResult.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class MongoClusterListResult - { - internal static MongoClusterListResult DeserializeMongoClusterListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MongoClusterData.DeserializeMongoClusterData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new MongoClusterListResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterListResult.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterListResult.cs deleted file mode 100644 index f7ea3f66429e..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// A list of mongo clusters. - internal partial class MongoClusterListResult - { - /// Initializes a new instance of MongoClusterListResult. - internal MongoClusterListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of MongoClusterListResult. - /// The list of mongo clusters. - /// The link used to get the next page of results. - internal MongoClusterListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// The list of mongo clusters. - public IReadOnlyList Value { get; } - /// The link used to get the next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterPatch.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterPatch.Serialization.cs deleted file mode 100644 index ae5b07a7e364..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterPatch.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class MongoClusterPatch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(AdministratorLogin)) - { - writer.WritePropertyName("administratorLogin"u8); - writer.WriteStringValue(AdministratorLogin); - } - if (Optional.IsDefined(AdministratorLoginPassword)) - { - writer.WritePropertyName("administratorLoginPassword"u8); - writer.WriteStringValue(AdministratorLoginPassword); - } - if (Optional.IsDefined(ServerVersion)) - { - writer.WritePropertyName("serverVersion"u8); - writer.WriteStringValue(ServerVersion); - } - if (Optional.IsCollectionDefined(NodeGroupSpecs)) - { - writer.WritePropertyName("nodeGroupSpecs"u8); - writer.WriteStartArray(); - foreach (var item in NodeGroupSpecs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterPatch.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterPatch.cs deleted file mode 100644 index 21236b3d576c..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterPatch.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Represents a mongo cluster resource for updates. - public partial class MongoClusterPatch - { - /// Initializes a new instance of MongoClusterPatch. - public MongoClusterPatch() - { - Tags = new ChangeTrackingDictionary(); - NodeGroupSpecs = new ChangeTrackingList(); - } - - /// Application-specific metadata in the form of key-value pairs. - public IDictionary Tags { get; } - /// The mode to create a mongo cluster. - public CosmosDBAccountCreateMode? CreateMode { get; set; } - /// Parameters used for restore operations. - public MongoClusterRestoreParameters RestoreParameters { get; set; } - /// The administrator's login for the mongo cluster. - public string AdministratorLogin { get; set; } - /// The password of the administrator login. - public string AdministratorLoginPassword { get; set; } - /// The Mongo DB server version. Defaults to the latest available version if not specified. - public string ServerVersion { get; set; } - /// The default mongo connection string for the cluster. - public string ConnectionString { get; } - /// Earliest restore timestamp in UTC ISO8601 format. - public string EarliestRestoreTime { get; } - /// A provisioning state of the mongo cluster. - public CosmosDBProvisioningState? ProvisioningState { get; } - /// A status of the mongo cluster. - public MongoClusterStatus? ClusterStatus { get; } - /// The list of node group specs in the cluster. - public IList NodeGroupSpecs { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.Serialization.cs deleted file mode 100644 index 85564f5637c6..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class MongoClusterRestoreParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PointInTimeUTC)) - { - writer.WritePropertyName("pointInTimeUTC"u8); - writer.WriteStringValue(PointInTimeUTC.Value, "O"); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - writer.WriteEndObject(); - } - - internal static MongoClusterRestoreParameters DeserializeMongoClusterRestoreParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional pointInTimeUTC = default; - Optional sourceResourceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pointInTimeUTC"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - pointInTimeUTC = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("sourceResourceId"u8)) - { - sourceResourceId = property.Value.GetString(); - continue; - } - } - return new MongoClusterRestoreParameters(Optional.ToNullable(pointInTimeUTC), sourceResourceId.Value); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.cs deleted file mode 100644 index 41e420746fbc..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Parameters used for restore operations. - public partial class MongoClusterRestoreParameters - { - /// Initializes a new instance of MongoClusterRestoreParameters. - public MongoClusterRestoreParameters() - { - } - - /// Initializes a new instance of MongoClusterRestoreParameters. - /// UTC point in time to restore a mongo cluster. - /// Resource ID to locate the source cluster to restore. - internal MongoClusterRestoreParameters(DateTimeOffset? pointInTimeUTC, string sourceResourceId) - { - PointInTimeUTC = pointInTimeUTC; - SourceResourceId = sourceResourceId; - } - - /// UTC point in time to restore a mongo cluster. - public DateTimeOffset? PointInTimeUTC { get; set; } - /// Resource ID to locate the source cluster to restore. - public string SourceResourceId { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterStatus.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterStatus.cs deleted file mode 100644 index 39f1894ff9dc..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoClusterStatus.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The status of the resource at the time the operation was called. - public readonly partial struct MongoClusterStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MongoClusterStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ReadyValue = "Ready"; - private const string ProvisioningValue = "Provisioning"; - private const string UpdatingValue = "Updating"; - private const string StartingValue = "Starting"; - private const string StoppingValue = "Stopping"; - private const string StoppedValue = "Stopped"; - private const string DroppingValue = "Dropping"; - - /// Ready. - public static MongoClusterStatus Ready { get; } = new MongoClusterStatus(ReadyValue); - /// Provisioning. - public static MongoClusterStatus Provisioning { get; } = new MongoClusterStatus(ProvisioningValue); - /// Updating. - public static MongoClusterStatus Updating { get; } = new MongoClusterStatus(UpdatingValue); - /// Starting. - public static MongoClusterStatus Starting { get; } = new MongoClusterStatus(StartingValue); - /// Stopping. - public static MongoClusterStatus Stopping { get; } = new MongoClusterStatus(StoppingValue); - /// Stopped. - public static MongoClusterStatus Stopped { get; } = new MongoClusterStatus(StoppedValue); - /// Dropping. - public static MongoClusterStatus Dropping { get; } = new MongoClusterStatus(DroppingValue); - /// Determines if two values are the same. - public static bool operator ==(MongoClusterStatus left, MongoClusterStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MongoClusterStatus left, MongoClusterStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MongoClusterStatus(string value) => new MongoClusterStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MongoClusterStatus other && Equals(other); - /// - public bool Equals(MongoClusterStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs index b89784b6fc3b..5eb86ee35cd2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class MongoDBCollectionCreateOrUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static MongoDBCollectionCreateOrUpdateContent DeserializeMongoDBCollect { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static MongoDBCollectionCreateOrUpdateContent DeserializeMongoDBCollect Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static MongoDBCollectionCreateOrUpdateContent DeserializeMongoDBCollect continue; } } - return new MongoDBCollectionCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new MongoDBCollectionCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.cs index ee8c28c66705..d26ff32f6344 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.cs @@ -35,19 +35,15 @@ public MongoDBCollectionCreateOrUpdateContent(AzureLocation location, MongoDBCol /// The location. /// The standard JSON format of a MongoDB collection. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal MongoDBCollectionCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MongoDBCollectionResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal MongoDBCollectionCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MongoDBCollectionResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a MongoDB collection. public MongoDBCollectionResourceInfo Resource { get; set; } /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionData.Serialization.cs index 2a32471980f4..780f41ac2d3b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionData.Serialization.cs @@ -18,12 +18,6 @@ public partial class MongoDBCollectionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static MongoDBCollectionData DeserializeMongoDBCollectionData(JsonEleme { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static MongoDBCollectionData DeserializeMongoDBCollectionData(JsonEleme Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static MongoDBCollectionData DeserializeMongoDBCollectionData(JsonEleme continue; } } - return new MongoDBCollectionData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new MongoDBCollectionData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs index 227a619f1dd4..aa96868a5067 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs @@ -44,16 +44,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("analyticalStorageTtl"u8); writer.WriteNumberValue(AnalyticalStorageTtl.Value); } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -67,8 +57,6 @@ internal static MongoDBCollectionResourceInfo DeserializeMongoDBCollectionResour Optional> shardKey = default; Optional> indexes = default; Optional analyticalStorageTtl = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -113,26 +101,8 @@ internal static MongoDBCollectionResourceInfo DeserializeMongoDBCollectionResour analyticalStorageTtl = property.Value.GetInt32(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new MongoDBCollectionResourceInfo(id, Optional.ToDictionary(shardKey), Optional.ToList(indexes), Optional.ToNullable(analyticalStorageTtl), restoreParameters.Value, Optional.ToNullable(createMode)); + return new MongoDBCollectionResourceInfo(id, Optional.ToDictionary(shardKey), Optional.ToList(indexes), Optional.ToNullable(analyticalStorageTtl)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs index 0f34dc174c3d..9ecb5f03cb84 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs @@ -31,16 +31,12 @@ public MongoDBCollectionResourceInfo(string collectionName) /// A key-value pair of shard keys to be applied for the request. /// List of index keys. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - internal MongoDBCollectionResourceInfo(string collectionName, IDictionary shardKey, IList indexes, int? analyticalStorageTtl, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode) + internal MongoDBCollectionResourceInfo(string collectionName, IDictionary shardKey, IList indexes, int? analyticalStorageTtl) { CollectionName = collectionName; ShardKey = shardKey; Indexes = indexes; AnalyticalStorageTtl = analyticalStorageTtl; - RestoreParameters = restoreParameters; - CreateMode = createMode; } /// Name of the Cosmos DB MongoDB collection. @@ -51,9 +47,5 @@ internal MongoDBCollectionResourceInfo(string collectionName, IDictionary Indexes { get; } /// Analytical TTL. public int? AnalyticalStorageTtl { get; set; } - /// Parameters to indicate the information about the restore. - public ResourceRestoreParameters RestoreParameters { get; set; } - /// Enum to indicate the mode of resource creation. - public CosmosDBAccountCreateMode? CreateMode { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs index a7209237342f..da5b1787947a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs @@ -17,12 +17,6 @@ public partial class MongoDBDatabaseCreateOrUpdateContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -55,7 +49,6 @@ internal static MongoDBDatabaseCreateOrUpdateContent DeserializeMongoDBDatabaseC { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -66,16 +59,6 @@ internal static MongoDBDatabaseCreateOrUpdateContent DeserializeMongoDBDatabaseC Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,7 +129,7 @@ internal static MongoDBDatabaseCreateOrUpdateContent DeserializeMongoDBDatabaseC continue; } } - return new MongoDBDatabaseCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value, identity); + return new MongoDBDatabaseCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.cs index d18f764d12a5..94b2fc993b18 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.cs @@ -35,19 +35,16 @@ public MongoDBDatabaseCreateOrUpdateContent(AzureLocation location, MongoDBDatab /// The location. /// The standard JSON format of a MongoDB database. /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - /// Identity for the resource. - internal MongoDBDatabaseCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MongoDBDatabaseResourceInfo resource, CosmosDBCreateUpdateConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal MongoDBDatabaseCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MongoDBDatabaseResourceInfo resource, CosmosDBCreateUpdateConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// The standard JSON format of a MongoDB database. - public MongoDBDatabaseResourceInfo Resource { get; set; } + internal MongoDBDatabaseResourceInfo Resource { get; set; } + /// A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. public CosmosDBCreateUpdateConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseData.Serialization.cs index 4fdf19ef6c25..7e59996acecb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseData.Serialization.cs @@ -18,12 +18,6 @@ public partial class MongoDBDatabaseData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,7 +53,6 @@ internal static MongoDBDatabaseData DeserializeMongoDBDatabaseData(JsonElement e { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -70,16 +63,6 @@ internal static MongoDBDatabaseData DeserializeMongoDBDatabaseData(JsonElement e Optional options = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +137,7 @@ internal static MongoDBDatabaseData DeserializeMongoDBDatabaseData(JsonElement e continue; } } - return new MongoDBDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value, identity); + return new MongoDBDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, options.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs index ed8e26144e11..84baffe853d4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs @@ -17,16 +17,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -37,8 +27,6 @@ internal static MongoDBDatabaseResourceInfo DeserializeMongoDBDatabaseResourceIn return null; } string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -46,26 +34,8 @@ internal static MongoDBDatabaseResourceInfo DeserializeMongoDBDatabaseResourceIn id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new MongoDBDatabaseResourceInfo(id, restoreParameters.Value, Optional.ToNullable(createMode)); + return new MongoDBDatabaseResourceInfo(id); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs index ff0b84cc8832..a28839dc92d3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs @@ -23,22 +23,7 @@ public MongoDBDatabaseResourceInfo(string databaseName) DatabaseName = databaseName; } - /// Initializes a new instance of MongoDBDatabaseResourceInfo. - /// Name of the Cosmos DB MongoDB database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - internal MongoDBDatabaseResourceInfo(string databaseName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode) - { - DatabaseName = databaseName; - RestoreParameters = restoreParameters; - CreateMode = createMode; - } - /// Name of the Cosmos DB MongoDB database. public string DatabaseName { get; set; } - /// Parameters to indicate the information about the restore. - public ResourceRestoreParameters RestoreParameters { get; set; } - /// Enum to indicate the mode of resource creation. - public CosmosDBAccountCreateMode? CreateMode { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupProperties.Serialization.cs deleted file mode 100644 index 16901805fb91..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupProperties.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class NodeGroupProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteStringValue(Sku); - } - if (Optional.IsDefined(DiskSizeInGB)) - { - writer.WritePropertyName("diskSizeGB"u8); - writer.WriteNumberValue(DiskSizeInGB.Value); - } - if (Optional.IsDefined(EnableHa)) - { - writer.WritePropertyName("enableHa"u8); - writer.WriteBooleanValue(EnableHa.Value); - } - writer.WriteEndObject(); - } - - internal static NodeGroupProperties DeserializeNodeGroupProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional sku = default; - Optional diskSizeGB = default; - Optional enableHa = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sku"u8)) - { - sku = property.Value.GetString(); - continue; - } - if (property.NameEquals("diskSizeGB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - diskSizeGB = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("enableHa"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableHa = property.Value.GetBoolean(); - continue; - } - } - return new NodeGroupProperties(sku.Value, Optional.ToNullable(diskSizeGB), Optional.ToNullable(enableHa)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupProperties.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupProperties.cs deleted file mode 100644 index 5b4633a30c60..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The properties of the node group on a cluster. - public partial class NodeGroupProperties - { - /// Initializes a new instance of NodeGroupProperties. - public NodeGroupProperties() - { - } - - /// Initializes a new instance of NodeGroupProperties. - /// The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'. - /// The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. - /// Whether high availability is enabled on the node group. - internal NodeGroupProperties(string sku, long? diskSizeInGB, bool? enableHa) - { - Sku = sku; - DiskSizeInGB = diskSizeInGB; - EnableHa = enableHa; - } - - /// The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'. - public string Sku { get; set; } - /// The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. - public long? DiskSizeInGB { get; set; } - /// Whether high availability is enabled on the node group. - public bool? EnableHa { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupSpec.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupSpec.Serialization.cs deleted file mode 100644 index 71eb657281d2..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupSpec.Serialization.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class NodeGroupSpec : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - if (Optional.IsDefined(NodeCount)) - { - writer.WritePropertyName("nodeCount"u8); - writer.WriteNumberValue(NodeCount.Value); - } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteStringValue(Sku); - } - if (Optional.IsDefined(DiskSizeInGB)) - { - writer.WritePropertyName("diskSizeGB"u8); - writer.WriteNumberValue(DiskSizeInGB.Value); - } - if (Optional.IsDefined(EnableHa)) - { - writer.WritePropertyName("enableHa"u8); - writer.WriteBooleanValue(EnableHa.Value); - } - writer.WriteEndObject(); - } - - internal static NodeGroupSpec DeserializeNodeGroupSpec(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional kind = default; - Optional nodeCount = default; - Optional sku = default; - Optional diskSizeGB = default; - Optional enableHa = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("kind"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - kind = new NodeKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("nodeCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("sku"u8)) - { - sku = property.Value.GetString(); - continue; - } - if (property.NameEquals("diskSizeGB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - diskSizeGB = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("enableHa"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableHa = property.Value.GetBoolean(); - continue; - } - } - return new NodeGroupSpec(sku.Value, Optional.ToNullable(diskSizeGB), Optional.ToNullable(enableHa), Optional.ToNullable(kind), Optional.ToNullable(nodeCount)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupSpec.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupSpec.cs deleted file mode 100644 index fbbeb83af774..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeGroupSpec.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Specification for a node group. - public partial class NodeGroupSpec : NodeGroupProperties - { - /// Initializes a new instance of NodeGroupSpec. - public NodeGroupSpec() - { - } - - /// Initializes a new instance of NodeGroupSpec. - /// The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'. - /// The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. - /// Whether high availability is enabled on the node group. - /// The node type deployed in the node group. - /// The number of nodes in the node group. - internal NodeGroupSpec(string sku, long? diskSizeInGB, bool? enableHa, NodeKind? kind, int? nodeCount) : base(sku, diskSizeInGB, enableHa) - { - Kind = kind; - NodeCount = nodeCount; - } - - /// The node type deployed in the node group. - public NodeKind? Kind { get; set; } - /// The number of nodes in the node group. - public int? NodeCount { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeKind.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeKind.cs deleted file mode 100644 index cfeab4b3a4c2..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NodeKind.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The kind of a node in the mongo cluster. - public readonly partial struct NodeKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NodeKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ShardValue = "Shard"; - - /// Shard. - public static NodeKind Shard { get; } = new NodeKind(ShardValue); - /// Determines if two values are the same. - public static bool operator ==(NodeKind left, NodeKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NodeKind left, NodeKind right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NodeKind(string value) => new NodeKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NodeKind other && Equals(other); - /// - public bool Equals(NodeKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.Serialization.cs deleted file mode 100644 index 4d40ccf93515..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class PhysicalPartitionStorageInfo - { - internal static PhysicalPartitionStorageInfo DeserializePhysicalPartitionStorageInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional id = default; - Optional storageInKB = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("storageInKB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageInKB = property.Value.GetDouble(); - continue; - } - } - return new PhysicalPartitionStorageInfo(id.Value, Optional.ToNullable(storageInKB)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.cs deleted file mode 100644 index b7124d73ad9e..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The storage of a physical partition. - public partial class PhysicalPartitionStorageInfo - { - /// Initializes a new instance of PhysicalPartitionStorageInfo. - internal PhysicalPartitionStorageInfo() - { - } - - /// Initializes a new instance of PhysicalPartitionStorageInfo. - /// The unique identifier of the partition. - /// The storage in KB for the physical partition. - internal PhysicalPartitionStorageInfo(string id, double? storageInKB) - { - Id = id; - StorageInKB = storageInKB; - } - - /// The unique identifier of the partition. - public string Id { get; } - /// The storage in KB for the physical partition. - public double? StorageInKB { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.Serialization.cs deleted file mode 100644 index bf5a4c715e26..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class PhysicalPartitionStorageInfoCollection - { - internal static PhysicalPartitionStorageInfoCollection DeserializePhysicalPartitionStorageInfoCollection(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> physicalPartitionStorageInfoCollection = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("physicalPartitionStorageInfoCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PhysicalPartitionStorageInfo.DeserializePhysicalPartitionStorageInfo(item)); - } - physicalPartitionStorageInfoCollection = array; - continue; - } - } - return new PhysicalPartitionStorageInfoCollection(Optional.ToList(physicalPartitionStorageInfoCollection)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.cs deleted file mode 100644 index 629a7d94c69e..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// List of physical partitions and their properties returned by a merge operation. - public partial class PhysicalPartitionStorageInfoCollection - { - /// Initializes a new instance of PhysicalPartitionStorageInfoCollection. - internal PhysicalPartitionStorageInfoCollection() - { - PhysicalPartitionStorageInfoCollectionValue = new ChangeTrackingList(); - } - - /// Initializes a new instance of PhysicalPartitionStorageInfoCollection. - /// List of physical partitions and their properties. - internal PhysicalPartitionStorageInfoCollection(IReadOnlyList physicalPartitionStorageInfoCollectionValue) - { - PhysicalPartitionStorageInfoCollectionValue = physicalPartitionStorageInfoCollectionValue; - } - - /// List of physical partitions and their properties. - public IReadOnlyList PhysicalPartitionStorageInfoCollectionValue { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.Serialization.cs deleted file mode 100644 index e37b0c8fcddc..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class PhysicalPartitionThroughputInfoProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(PhysicalPartitionThroughputInfo)) - { - writer.WritePropertyName("physicalPartitionThroughputInfo"u8); - writer.WriteStartArray(); - foreach (var item in PhysicalPartitionThroughputInfo) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static PhysicalPartitionThroughputInfoProperties DeserializePhysicalPartitionThroughputInfoProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> physicalPartitionThroughputInfo = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("physicalPartitionThroughputInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PhysicalPartitionThroughputInfoResource.DeserializePhysicalPartitionThroughputInfoResource(item)); - } - physicalPartitionThroughputInfo = array; - continue; - } - } - return new PhysicalPartitionThroughputInfoProperties(Optional.ToList(physicalPartitionThroughputInfo)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.cs deleted file mode 100644 index bcc8adcc1438..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties object. - internal partial class PhysicalPartitionThroughputInfoProperties - { - /// Initializes a new instance of PhysicalPartitionThroughputInfoProperties. - public PhysicalPartitionThroughputInfoProperties() - { - PhysicalPartitionThroughputInfo = new ChangeTrackingList(); - } - - /// Initializes a new instance of PhysicalPartitionThroughputInfoProperties. - /// Array of physical partition throughput info objects. - internal PhysicalPartitionThroughputInfoProperties(IList physicalPartitionThroughputInfo) - { - PhysicalPartitionThroughputInfo = physicalPartitionThroughputInfo; - } - - /// Array of physical partition throughput info objects. - public IList PhysicalPartitionThroughputInfo { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.Serialization.cs deleted file mode 100644 index 23a6817c9c2e..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class PhysicalPartitionThroughputInfoResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - writer.WriteEndObject(); - } - - internal static PhysicalPartitionThroughputInfoResource DeserializePhysicalPartitionThroughputInfoResource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - Optional throughput = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("throughput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - throughput = property.Value.GetDouble(); - continue; - } - } - return new PhysicalPartitionThroughputInfoResource(id, Optional.ToNullable(throughput)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.cs deleted file mode 100644 index e3630ccace13..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// PhysicalPartitionThroughputInfo object. - public partial class PhysicalPartitionThroughputInfoResource - { - /// Initializes a new instance of PhysicalPartitionThroughputInfoResource. - /// Id of a physical partition. - /// is null. - public PhysicalPartitionThroughputInfoResource(string id) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - } - - /// Initializes a new instance of PhysicalPartitionThroughputInfoResource. - /// Id of a physical partition. - /// Throughput of a physical partition. - internal PhysicalPartitionThroughputInfoResource(string id, double? throughput) - { - Id = id; - Throughput = throughput; - } - - /// Id of a physical partition. - public string Id { get; set; } - /// Throughput of a physical partition. - public double? Throughput { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.Serialization.cs deleted file mode 100644 index 303064461dd7..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class PhysicalPartitionThroughputInfoResult : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Resource)) - { - writer.WritePropertyName("resource"u8); - writer.WriteObjectValue(Resource); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static PhysicalPartitionThroughputInfoResult DeserializePhysicalPartitionThroughputInfoResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional resource = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resource"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resource = PhysicalPartitionThroughputInfoResultPropertiesResource.DeserializePhysicalPartitionThroughputInfoResultPropertiesResource(property0.Value); - continue; - } - } - continue; - } - } - return new PhysicalPartitionThroughputInfoResult(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, identity); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.cs deleted file mode 100644 index 851256cdf3c6..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// An Azure Cosmos DB PhysicalPartitionThroughputInfoResult object. - public partial class PhysicalPartitionThroughputInfoResult : TrackedResourceData - { - /// Initializes a new instance of PhysicalPartitionThroughputInfoResult. - /// The location. - public PhysicalPartitionThroughputInfoResult(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of PhysicalPartitionThroughputInfoResult. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// properties of physical partition throughput info. - /// Identity for the resource. - internal PhysicalPartitionThroughputInfoResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, PhysicalPartitionThroughputInfoResultPropertiesResource resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) - { - Resource = resource; - Identity = identity; - } - - /// properties of physical partition throughput info. - internal PhysicalPartitionThroughputInfoResultPropertiesResource Resource { get; set; } - /// Array of physical partition throughput info objects. - public IList ResourcePhysicalPartitionThroughputInfo - { - get - { - if (Resource is null) - Resource = new PhysicalPartitionThroughputInfoResultPropertiesResource(); - return Resource.PhysicalPartitionThroughputInfo; - } - } - - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.Serialization.cs deleted file mode 100644 index 414fe06991a8..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class PhysicalPartitionThroughputInfoResultPropertiesResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(PhysicalPartitionThroughputInfo)) - { - writer.WritePropertyName("physicalPartitionThroughputInfo"u8); - writer.WriteStartArray(); - foreach (var item in PhysicalPartitionThroughputInfo) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static PhysicalPartitionThroughputInfoResultPropertiesResource DeserializePhysicalPartitionThroughputInfoResultPropertiesResource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> physicalPartitionThroughputInfo = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("physicalPartitionThroughputInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PhysicalPartitionThroughputInfoResource.DeserializePhysicalPartitionThroughputInfoResource(item)); - } - physicalPartitionThroughputInfo = array; - continue; - } - } - return new PhysicalPartitionThroughputInfoResultPropertiesResource(Optional.ToList(physicalPartitionThroughputInfo)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.cs deleted file mode 100644 index 70a0a8959196..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// properties of physical partition throughput info. - internal partial class PhysicalPartitionThroughputInfoResultPropertiesResource : PhysicalPartitionThroughputInfoProperties - { - /// Initializes a new instance of PhysicalPartitionThroughputInfoResultPropertiesResource. - public PhysicalPartitionThroughputInfoResultPropertiesResource() - { - } - - /// Initializes a new instance of PhysicalPartitionThroughputInfoResultPropertiesResource. - /// Array of physical partition throughput info objects. - internal PhysicalPartitionThroughputInfoResultPropertiesResource(IList physicalPartitionThroughputInfo) : base(physicalPartitionThroughputInfo) - { - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.Serialization.cs deleted file mode 100644 index 09e73c77fde5..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class RedistributeThroughputParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("resource"u8); - writer.WriteObjectValue(Resource); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static RedistributeThroughputParameters DeserializeRedistributeThroughputParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - RedistributeThroughputPropertiesResource resource = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resource"u8)) - { - resource = RedistributeThroughputPropertiesResource.DeserializeRedistributeThroughputPropertiesResource(property0.Value); - continue; - } - } - continue; - } - } - return new RedistributeThroughputParameters(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, identity); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.cs deleted file mode 100644 index 20a5f8fb16f6..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Cosmos DB redistribute throughput parameters object. - public partial class RedistributeThroughputParameters : TrackedResourceData - { - /// Initializes a new instance of RedistributeThroughputParameters. - /// The location. - /// The standard JSON format of a resource throughput. - /// is null. - public RedistributeThroughputParameters(AzureLocation location, RedistributeThroughputPropertiesResource resource) : base(location) - { - Argument.AssertNotNull(resource, nameof(resource)); - - Resource = resource; - } - - /// Initializes a new instance of RedistributeThroughputParameters. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a resource throughput. - /// Identity for the resource. - internal RedistributeThroughputParameters(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RedistributeThroughputPropertiesResource resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) - { - Resource = resource; - Identity = identity; - } - - /// The standard JSON format of a resource throughput. - public RedistributeThroughputPropertiesResource Resource { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.Serialization.cs deleted file mode 100644 index 93aeadbd1977..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class RedistributeThroughputPropertiesResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("throughputPolicy"u8); - writer.WriteStringValue(ThroughputPolicy.ToString()); - writer.WritePropertyName("targetPhysicalPartitionThroughputInfo"u8); - writer.WriteStartArray(); - foreach (var item in TargetPhysicalPartitionThroughputInfo) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("sourcePhysicalPartitionThroughputInfo"u8); - writer.WriteStartArray(); - foreach (var item in SourcePhysicalPartitionThroughputInfo) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static RedistributeThroughputPropertiesResource DeserializeRedistributeThroughputPropertiesResource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ThroughputPolicyType throughputPolicy = default; - IList targetPhysicalPartitionThroughputInfo = default; - IList sourcePhysicalPartitionThroughputInfo = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("throughputPolicy"u8)) - { - throughputPolicy = new ThroughputPolicyType(property.Value.GetString()); - continue; - } - if (property.NameEquals("targetPhysicalPartitionThroughputInfo"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PhysicalPartitionThroughputInfoResource.DeserializePhysicalPartitionThroughputInfoResource(item)); - } - targetPhysicalPartitionThroughputInfo = array; - continue; - } - if (property.NameEquals("sourcePhysicalPartitionThroughputInfo"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PhysicalPartitionThroughputInfoResource.DeserializePhysicalPartitionThroughputInfoResource(item)); - } - sourcePhysicalPartitionThroughputInfo = array; - continue; - } - } - return new RedistributeThroughputPropertiesResource(throughputPolicy, targetPhysicalPartitionThroughputInfo, sourcePhysicalPartitionThroughputInfo); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.cs deleted file mode 100644 index 174af94a0fa3..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Resource to redistribute throughput for Azure Cosmos DB resource. - public partial class RedistributeThroughputPropertiesResource - { - /// Initializes a new instance of RedistributeThroughputPropertiesResource. - /// ThroughputPolicy to apply for throughput redistribution. - /// Array of PhysicalPartitionThroughputInfoResource objects. - /// Array of PhysicalPartitionThroughputInfoResource objects. - /// or is null. - public RedistributeThroughputPropertiesResource(ThroughputPolicyType throughputPolicy, IEnumerable targetPhysicalPartitionThroughputInfo, IEnumerable sourcePhysicalPartitionThroughputInfo) - { - Argument.AssertNotNull(targetPhysicalPartitionThroughputInfo, nameof(targetPhysicalPartitionThroughputInfo)); - Argument.AssertNotNull(sourcePhysicalPartitionThroughputInfo, nameof(sourcePhysicalPartitionThroughputInfo)); - - ThroughputPolicy = throughputPolicy; - TargetPhysicalPartitionThroughputInfo = targetPhysicalPartitionThroughputInfo.ToList(); - SourcePhysicalPartitionThroughputInfo = sourcePhysicalPartitionThroughputInfo.ToList(); - } - - /// Initializes a new instance of RedistributeThroughputPropertiesResource. - /// ThroughputPolicy to apply for throughput redistribution. - /// Array of PhysicalPartitionThroughputInfoResource objects. - /// Array of PhysicalPartitionThroughputInfoResource objects. - internal RedistributeThroughputPropertiesResource(ThroughputPolicyType throughputPolicy, IList targetPhysicalPartitionThroughputInfo, IList sourcePhysicalPartitionThroughputInfo) - { - ThroughputPolicy = throughputPolicy; - TargetPhysicalPartitionThroughputInfo = targetPhysicalPartitionThroughputInfo; - SourcePhysicalPartitionThroughputInfo = sourcePhysicalPartitionThroughputInfo; - } - - /// ThroughputPolicy to apply for throughput redistribution. - public ThroughputPolicyType ThroughputPolicy { get; set; } - /// Array of PhysicalPartitionThroughputInfoResource objects. - public IList TargetPhysicalPartitionThroughputInfo { get; } - /// Array of PhysicalPartitionThroughputInfoResource objects. - public IList SourcePhysicalPartitionThroughputInfo { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.Serialization.cs deleted file mode 100644 index 211de177f5be..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class ResourceRestoreParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RestoreSource)) - { - writer.WritePropertyName("restoreSource"u8); - writer.WriteStringValue(RestoreSource); - } - if (Optional.IsDefined(RestoreTimestampInUtc)) - { - writer.WritePropertyName("restoreTimestampInUtc"u8); - writer.WriteStringValue(RestoreTimestampInUtc.Value, "O"); - } - writer.WriteEndObject(); - } - - internal static ResourceRestoreParameters DeserializeResourceRestoreParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional restoreSource = default; - Optional restoreTimestampInUtc = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("restoreSource"u8)) - { - restoreSource = property.Value.GetString(); - continue; - } - if (property.NameEquals("restoreTimestampInUtc"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreTimestampInUtc = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new ResourceRestoreParameters(restoreSource.Value, Optional.ToNullable(restoreTimestampInUtc)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.cs deleted file mode 100644 index 3f8657c418c3..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Parameters to indicate the information about the restore. - public partial class ResourceRestoreParameters : RestoreParametersBase - { - /// Initializes a new instance of ResourceRestoreParameters. - public ResourceRestoreParameters() - { - } - - /// Initializes a new instance of ResourceRestoreParameters. - /// The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. - /// Time to which the account has to be restored (ISO-8601 format). - internal ResourceRestoreParameters(string restoreSource, DateTimeOffset? restoreTimestampInUtc) : base(restoreSource, restoreTimestampInUtc) - { - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableCosmosDBAccountData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableCosmosDBAccountData.Serialization.cs index 26b5b7784d6e..c157867056f6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableCosmosDBAccountData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableCosmosDBAccountData.Serialization.cs @@ -29,8 +29,8 @@ internal static RestorableCosmosDBAccountData DeserializeRestorableCosmosDBAccou Optional systemData = default; Optional accountName = default; Optional creationTime = default; - Optional oldestRestorableTime = default; Optional deletionTime = default; + Optional oldestRestorableTime = default; Optional apiType = default; Optional> restorableLocations = default; foreach (var property in element.EnumerateObject()) @@ -91,22 +91,22 @@ internal static RestorableCosmosDBAccountData DeserializeRestorableCosmosDBAccou creationTime = property0.Value.GetDateTimeOffset("O"); continue; } - if (property0.NameEquals("oldestRestorableTime"u8)) + if (property0.NameEquals("deletionTime"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - oldestRestorableTime = property0.Value.GetDateTimeOffset("O"); + deletionTime = property0.Value.GetDateTimeOffset("O"); continue; } - if (property0.NameEquals("deletionTime"u8)) + if (property0.NameEquals("oldestRestorableTime"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - deletionTime = property0.Value.GetDateTimeOffset("O"); + oldestRestorableTime = property0.Value.GetDateTimeOffset("O"); continue; } if (property0.NameEquals("apiType"u8)) @@ -136,7 +136,7 @@ internal static RestorableCosmosDBAccountData DeserializeRestorableCosmosDBAccou continue; } } - return new RestorableCosmosDBAccountData(id, name, type, systemData.Value, Optional.ToNullable(location), accountName.Value, Optional.ToNullable(creationTime), Optional.ToNullable(oldestRestorableTime), Optional.ToNullable(deletionTime), Optional.ToNullable(apiType), Optional.ToList(restorableLocations)); + return new RestorableCosmosDBAccountData(id, name, type, systemData.Value, Optional.ToNullable(location), accountName.Value, Optional.ToNullable(creationTime), Optional.ToNullable(deletionTime), Optional.ToNullable(oldestRestorableTime), Optional.ToNullable(apiType), Optional.ToList(restorableLocations)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs index 57004819798e..b1b52bd3443c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs @@ -53,21 +53,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("analyticalStorageTtl"u8); writer.WriteNumberValue(AnalyticalStorageTtl.Value); } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(MaterializedViewDefinition)) - { - writer.WritePropertyName("materializedViewDefinition"u8); - writer.WriteObjectValue(MaterializedViewDefinition); - } writer.WriteEndObject(); } @@ -89,9 +74,6 @@ internal static RestorableSqlContainerPropertiesResourceContainer DeserializeRes Optional conflictResolutionPolicy = default; Optional clientEncryptionPolicy = default; Optional analyticalStorageTtl = default; - Optional restoreParameters = default; - Optional createMode = default; - Optional materializedViewDefinition = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_self"u8)) @@ -190,35 +172,8 @@ internal static RestorableSqlContainerPropertiesResourceContainer DeserializeRes analyticalStorageTtl = property.Value.GetInt64(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("materializedViewDefinition"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - materializedViewDefinition = MaterializedViewDefinition.DeserializeMaterializedViewDefinition(property.Value); - continue; - } } - return new RestorableSqlContainerPropertiesResourceContainer(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, clientEncryptionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), restoreParameters.Value, Optional.ToNullable(createMode), materializedViewDefinition.Value, self.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new RestorableSqlContainerPropertiesResourceContainer(id, indexingPolicy.Value, partitionKey.Value, Optional.ToNullable(defaultTtl), uniqueKeyPolicy.Value, conflictResolutionPolicy.Value, clientEncryptionPolicy.Value, Optional.ToNullable(analyticalStorageTtl), self.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs index cb23511a682c..7cf7b47dea90 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs @@ -31,14 +31,11 @@ public RestorableSqlContainerPropertiesResourceContainer(string containerName) : /// The conflict resolution policy for the container. /// The client encryption policy for the container. /// Analytical TTL. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. - /// The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. /// A system generated property that specifies the addressable path of the container resource. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal RestorableSqlContainerPropertiesResourceContainer(string containerName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, CosmosDBClientEncryptionPolicy clientEncryptionPolicy, long? analyticalStorageTtl, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, MaterializedViewDefinition materializedViewDefinition, string self, string rid, float? timestamp, ETag? etag) : base(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeyPolicy, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl, restoreParameters, createMode, materializedViewDefinition) + internal RestorableSqlContainerPropertiesResourceContainer(string containerName, CosmosDBIndexingPolicy indexingPolicy, CosmosDBContainerPartitionKey partitionKey, int? defaultTtl, CosmosDBUniqueKeyPolicy uniqueKeyPolicy, ConflictResolutionPolicy conflictResolutionPolicy, CosmosDBClientEncryptionPolicy clientEncryptionPolicy, long? analyticalStorageTtl, string self, string rid, float? timestamp, ETag? etag) : base(containerName, indexingPolicy, partitionKey, defaultTtl, uniqueKeyPolicy, conflictResolutionPolicy, clientEncryptionPolicy, analyticalStorageTtl) { Self = self; Rid = rid; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs index 5f2157a1ba84..389bd8017f1a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs @@ -18,16 +18,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -44,8 +34,6 @@ internal static RestorableSqlDatabasePropertiesResourceDatabase DeserializeResto Optional ts = default; Optional etag = default; string id = default; - Optional restoreParameters = default; - Optional createMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("_colls"u8)) @@ -91,26 +79,8 @@ internal static RestorableSqlDatabasePropertiesResourceDatabase DeserializeResto id = property.Value.GetString(); continue; } - if (property.NameEquals("restoreParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreParameters = ResourceRestoreParameters.DeserializeResourceRestoreParameters(property.Value); - continue; - } - if (property.NameEquals("createMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createMode = new CosmosDBAccountCreateMode(property.Value.GetString()); - continue; - } } - return new RestorableSqlDatabasePropertiesResourceDatabase(id, restoreParameters.Value, Optional.ToNullable(createMode), colls.Value, users.Value, self.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); + return new RestorableSqlDatabasePropertiesResourceDatabase(id, colls.Value, users.Value, self.Value, rid.Value, Optional.ToNullable(ts), Optional.ToNullable(etag)); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs index 4acfbe614708..8207bde18e94 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs @@ -24,16 +24,17 @@ public RestorableSqlDatabasePropertiesResourceDatabase(string databaseName) : ba /// Initializes a new instance of RestorableSqlDatabasePropertiesResourceDatabase. /// Name of the Cosmos DB SQL database. - /// Parameters to indicate the information about the restore. - /// Enum to indicate the mode of resource creation. /// A system generated property that specified the addressable path of the collections resource. /// A system generated property that specifies the addressable path of the users resource. /// A system generated property that specifies the addressable path of the database resource. /// A system generated property. A unique identifier. /// A system generated property that denotes the last updated timestamp of the resource. /// A system generated property representing the resource etag required for optimistic concurrency control. - internal RestorableSqlDatabasePropertiesResourceDatabase(string databaseName, ResourceRestoreParameters restoreParameters, CosmosDBAccountCreateMode? createMode, string colls, string users, string self, string rid, float? timestamp, ETag? etag) : base(databaseName, restoreParameters, createMode) + /// is null. + internal RestorableSqlDatabasePropertiesResourceDatabase(string databaseName, string colls, string users, string self, string rid, float? timestamp, ETag? etag) : base(databaseName) { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Colls = colls; Users = users; Self = self; diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.Serialization.cs deleted file mode 100644 index 52178be273ac..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class RestoreParametersBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RestoreSource)) - { - writer.WritePropertyName("restoreSource"u8); - writer.WriteStringValue(RestoreSource); - } - if (Optional.IsDefined(RestoreTimestampInUtc)) - { - writer.WritePropertyName("restoreTimestampInUtc"u8); - writer.WriteStringValue(RestoreTimestampInUtc.Value, "O"); - } - writer.WriteEndObject(); - } - - internal static RestoreParametersBase DeserializeRestoreParametersBase(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional restoreSource = default; - Optional restoreTimestampInUtc = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("restoreSource"u8)) - { - restoreSource = property.Value.GetString(); - continue; - } - if (property.NameEquals("restoreTimestampInUtc"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - restoreTimestampInUtc = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new RestoreParametersBase(restoreSource.Value, Optional.ToNullable(restoreTimestampInUtc)); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.cs deleted file mode 100644 index 061ca1db74c4..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Parameters to indicate the information about the restore. - public partial class RestoreParametersBase - { - /// Initializes a new instance of RestoreParametersBase. - public RestoreParametersBase() - { - } - - /// Initializes a new instance of RestoreParametersBase. - /// The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. - /// Time to which the account has to be restored (ISO-8601 format). - internal RestoreParametersBase(string restoreSource, DateTimeOffset? restoreTimestampInUtc) - { - RestoreSource = restoreSource; - RestoreTimestampInUtc = restoreTimestampInUtc; - } - - /// The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. - public string RestoreSource { get; set; } - /// Time to which the account has to be restored (ISO-8601 format). - public DateTimeOffset? RestoreTimestampInUtc { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.Serialization.cs deleted file mode 100644 index 949612741557..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class RetrieveThroughputParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("resource"u8); - writer.WriteObjectValue(Resource); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static RetrieveThroughputParameters DeserializeRetrieveThroughputParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - RetrieveThroughputPropertiesResource resource = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resource"u8)) - { - resource = RetrieveThroughputPropertiesResource.DeserializeRetrieveThroughputPropertiesResource(property0.Value); - continue; - } - } - continue; - } - } - return new RetrieveThroughputParameters(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, identity); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.cs deleted file mode 100644 index 426fa7a5a4e6..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Cosmos DB retrieve throughput parameters object. - public partial class RetrieveThroughputParameters : TrackedResourceData - { - /// Initializes a new instance of RetrieveThroughputParameters. - /// The location. - /// The standard JSON format of a resource throughput. - /// is null. - public RetrieveThroughputParameters(AzureLocation location, RetrieveThroughputPropertiesResource resource) : base(location) - { - Argument.AssertNotNull(resource, nameof(resource)); - - Resource = resource; - } - - /// Initializes a new instance of RetrieveThroughputParameters. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The standard JSON format of a resource throughput. - /// Identity for the resource. - internal RetrieveThroughputParameters(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RetrieveThroughputPropertiesResource resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) - { - Resource = resource; - Identity = identity; - } - - /// The standard JSON format of a resource throughput. - internal RetrieveThroughputPropertiesResource Resource { get; set; } - /// Array of PhysicalPartitionId objects. - public IList ResourcePhysicalPartitionIds - { - get => Resource is null ? default : Resource.PhysicalPartitionIds; - set => Resource = new RetrieveThroughputPropertiesResource(value); - } - - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.Serialization.cs deleted file mode 100644 index 79fb33c8ff3a..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - public partial class RetrieveThroughputPropertiesResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("physicalPartitionIds"u8); - writer.WriteStartArray(); - foreach (var item in PhysicalPartitionIds) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static RetrieveThroughputPropertiesResource DeserializeRetrieveThroughputPropertiesResource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList physicalPartitionIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("physicalPartitionIds"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - physicalPartitionIds = array; - continue; - } - } - return new RetrieveThroughputPropertiesResource(physicalPartitionIds); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.cs deleted file mode 100644 index f3c458f0619d..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// Resource to retrieve throughput information for Cosmos DB resource. - public partial class RetrieveThroughputPropertiesResource - { - /// Initializes a new instance of RetrieveThroughputPropertiesResource. - /// Array of PhysicalPartitionId objects. - /// is null. - public RetrieveThroughputPropertiesResource(IEnumerable physicalPartitionIds) - { - Argument.AssertNotNull(physicalPartitionIds, nameof(physicalPartitionIds)); - - PhysicalPartitionIds = physicalPartitionIds.ToList(); - } - - /// Initializes a new instance of RetrieveThroughputPropertiesResource. - /// Array of PhysicalPartitionId objects. - internal RetrieveThroughputPropertiesResource(IList physicalPartitionIds) - { - PhysicalPartitionIds = physicalPartitionIds; - } - - /// Array of PhysicalPartitionId objects. - public IList PhysicalPartitionIds { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPolicyType.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPolicyType.cs deleted file mode 100644 index d6f34a0c66f7..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPolicyType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// ThroughputPolicy to apply for throughput redistribution. - public readonly partial struct ThroughputPolicyType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ThroughputPolicyType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "none"; - private const string EqualValue = "equal"; - private const string CustomValue = "custom"; - - /// none. - public static ThroughputPolicyType None { get; } = new ThroughputPolicyType(NoneValue); - /// equal. - public static ThroughputPolicyType Equal { get; } = new ThroughputPolicyType(EqualValue); - /// custom. - public static ThroughputPolicyType Custom { get; } = new ThroughputPolicyType(CustomValue); - /// Determines if two values are the same. - public static bool operator ==(ThroughputPolicyType left, ThroughputPolicyType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ThroughputPolicyType left, ThroughputPolicyType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ThroughputPolicyType(string value) => new ThroughputPolicyType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThroughputPolicyType other && Equals(other); - /// - public bool Equals(ThroughputPolicyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingData.Serialization.cs index a618a625b9ba..770d4345cff0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingData.Serialization.cs @@ -18,12 +18,6 @@ public partial class ThroughputSettingData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -54,7 +48,6 @@ internal static ThroughputSettingData DeserializeThroughputSettingData(JsonEleme { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -64,16 +57,6 @@ internal static ThroughputSettingData DeserializeThroughputSettingData(JsonEleme Optional resource = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -139,7 +122,7 @@ internal static ThroughputSettingData DeserializeThroughputSettingData(JsonEleme continue; } } - return new ThroughputSettingData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value, identity); + return new ThroughputSettingData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs index 4af5cc145725..17594bc78708 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs @@ -38,6 +38,8 @@ internal static ThroughputSettingsResourceInfo DeserializeThroughputSettingsReso Optional autoscaleSettings = default; Optional minimumThroughput = default; Optional offerReplacePending = default; + Optional instantMaximumThroughput = default; + Optional softAllowedMaximumThroughput = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("throughput"u8)) @@ -68,8 +70,18 @@ internal static ThroughputSettingsResourceInfo DeserializeThroughputSettingsReso offerReplacePending = property.Value.GetString(); continue; } + if (property.NameEquals("instantMaximumThroughput"u8)) + { + instantMaximumThroughput = property.Value.GetString(); + continue; + } + if (property.NameEquals("softAllowedMaximumThroughput"u8)) + { + softAllowedMaximumThroughput = property.Value.GetString(); + continue; + } } - return new ThroughputSettingsResourceInfo(Optional.ToNullable(throughput), autoscaleSettings.Value, minimumThroughput.Value, offerReplacePending.Value); + return new ThroughputSettingsResourceInfo(Optional.ToNullable(throughput), autoscaleSettings.Value, minimumThroughput.Value, offerReplacePending.Value, instantMaximumThroughput.Value, softAllowedMaximumThroughput.Value); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs index 142119bf39c9..d4d9026de95a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs @@ -20,12 +20,16 @@ public ThroughputSettingsResourceInfo() /// Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. /// The minimum throughput of the resource. /// The throughput replace is pending. - internal ThroughputSettingsResourceInfo(int? throughput, AutoscaleSettingsResourceInfo autoscaleSettings, string minimumThroughput, string offerReplacePending) + /// The offer throughput value to instantly scale up without triggering splits. + /// The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified. + internal ThroughputSettingsResourceInfo(int? throughput, AutoscaleSettingsResourceInfo autoscaleSettings, string minimumThroughput, string offerReplacePending, string instantMaximumThroughput, string softAllowedMaximumThroughput) { Throughput = throughput; AutoscaleSettings = autoscaleSettings; MinimumThroughput = minimumThroughput; OfferReplacePending = offerReplacePending; + InstantMaximumThroughput = instantMaximumThroughput; + SoftAllowedMaximumThroughput = softAllowedMaximumThroughput; } /// Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. @@ -36,5 +40,9 @@ internal ThroughputSettingsResourceInfo(int? throughput, AutoscaleSettingsResour public string MinimumThroughput { get; } /// The throughput replace is pending. public string OfferReplacePending { get; } + /// The offer throughput value to instantly scale up without triggering splits. + public string InstantMaximumThroughput { get; } + /// The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified. + public string SoftAllowedMaximumThroughput { get; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs index 862839bd1061..1674f1060bb8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs @@ -17,12 +17,6 @@ public partial class ThroughputSettingsUpdateData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -50,7 +44,6 @@ internal static ThroughputSettingsUpdateData DeserializeThroughputSettingsUpdate { return null; } - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -60,16 +53,6 @@ internal static ThroughputSettingsUpdateData DeserializeThroughputSettingsUpdate ThroughputSettingsResourceInfo resource = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -131,7 +114,7 @@ internal static ThroughputSettingsUpdateData DeserializeThroughputSettingsUpdate continue; } } - return new ThroughputSettingsUpdateData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource, identity); + return new ThroughputSettingsUpdateData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, resource); } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.cs index b79ea3bc462a..0694511133b4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.cs @@ -34,16 +34,12 @@ public ThroughputSettingsUpdateData(AzureLocation location, ThroughputSettingsRe /// The tags. /// The location. /// The standard JSON format of a resource throughput. - /// Identity for the resource. - internal ThroughputSettingsUpdateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ThroughputSettingsResourceInfo resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal ThroughputSettingsUpdateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ThroughputSettingsResourceInfo resource) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; - Identity = identity; } /// The standard JSON format of a resource throughput. public ThroughputSettingsResourceInfo Resource { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.Serialization.cs deleted file mode 100644 index bd7dae91ba27..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.CosmosDB.Models -{ - internal partial class UnknownDataTransferDataSourceSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - writer.WriteEndObject(); - } - - internal static UnknownDataTransferDataSourceSink DeserializeUnknownDataTransferDataSourceSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataTransferComponent component = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("component"u8)) - { - component = new DataTransferComponent(property.Value.GetString()); - continue; - } - } - return new UnknownDataTransferDataSourceSink(component); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.cs deleted file mode 100644 index 055926a1ac7b..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.CosmosDB.Models -{ - /// The UnknownDataTransferDataSourceSink. - internal partial class UnknownDataTransferDataSourceSink : DataTransferDataSourceSink - { - /// Initializes a new instance of UnknownDataTransferDataSourceSink. - /// - internal UnknownDataTransferDataSourceSink(DataTransferComponent component) : base(component) - { - Component = component; - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterCollection.cs deleted file mode 100644 index 57870d8917be..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterCollection.cs +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetMongoClusters method from an instance of . - /// - public partial class MongoClusterCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _mongoClusterClientDiagnostics; - private readonly MongoClustersRestOperations _mongoClusterRestClient; - - /// Initializes a new instance of the class for mocking. - protected MongoClusterCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal MongoClusterCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _mongoClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", MongoClusterResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(MongoClusterResource.ResourceType, out string mongoClusterApiVersion); - _mongoClusterRestClient = new MongoClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mongoClusterApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the mongo cluster. - /// The required parameters for creating or updating a mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string mongoClusterName, MongoClusterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _mongoClusterRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, data, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new MongoClusterOperationSource(Client), _mongoClusterClientDiagnostics, Pipeline, _mongoClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the mongo cluster. - /// The required parameters for creating or updating a mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string mongoClusterName, MongoClusterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _mongoClusterRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, data, cancellationToken); - var operation = new CosmosDBArmOperation(new MongoClusterOperationSource(Client), _mongoClusterClientDiagnostics, Pipeline, _mongoClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets information about a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The name of the mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterCollection.Get"); - scope.Start(); - try - { - var response = await _mongoClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MongoClusterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets information about a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The name of the mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterCollection.Get"); - scope.Start(); - try - { - var response = _mongoClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MongoClusterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List all the mongo clusters in a given resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters - /// - /// - /// Operation Id - /// MongoClusters_ListByResourceGroup - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _mongoClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _mongoClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MongoClusterResource(Client, MongoClusterData.DeserializeMongoClusterData(e)), _mongoClusterClientDiagnostics, Pipeline, "MongoClusterCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List all the mongo clusters in a given resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters - /// - /// - /// Operation Id - /// MongoClusters_ListByResourceGroup - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _mongoClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _mongoClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MongoClusterResource(Client, MongoClusterData.DeserializeMongoClusterData(e)), _mongoClusterClientDiagnostics, Pipeline, "MongoClusterCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The name of the mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterCollection.Exists"); - scope.Start(); - try - { - var response = await _mongoClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The name of the mongo cluster. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterCollection.Exists"); - scope.Start(); - try - { - var response = _mongoClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mongoClusterName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterData.cs deleted file mode 100644 index 8b0042a4d737..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterData.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A class representing the MongoCluster data model. - /// Represents a mongo cluster resource. - /// - public partial class MongoClusterData : TrackedResourceData - { - /// Initializes a new instance of MongoClusterData. - /// The location. - public MongoClusterData(AzureLocation location) : base(location) - { - NodeGroupSpecs = new ChangeTrackingList(); - } - - /// Initializes a new instance of MongoClusterData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The mode to create a mongo cluster. - /// Parameters used for restore operations. - /// The administrator's login for the mongo cluster. - /// The password of the administrator login. - /// The Mongo DB server version. Defaults to the latest available version if not specified. - /// The default mongo connection string for the cluster. - /// Earliest restore timestamp in UTC ISO8601 format. - /// A provisioning state of the mongo cluster. - /// A status of the mongo cluster. - /// The list of node group specs in the cluster. - internal MongoClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CosmosDBAccountCreateMode? createMode, MongoClusterRestoreParameters restoreParameters, string administratorLogin, string administratorLoginPassword, string serverVersion, string connectionString, string earliestRestoreTime, CosmosDBProvisioningState? provisioningState, MongoClusterStatus? clusterStatus, IList nodeGroupSpecs) : base(id, name, resourceType, systemData, tags, location) - { - CreateMode = createMode; - RestoreParameters = restoreParameters; - AdministratorLogin = administratorLogin; - AdministratorLoginPassword = administratorLoginPassword; - ServerVersion = serverVersion; - ConnectionString = connectionString; - EarliestRestoreTime = earliestRestoreTime; - ProvisioningState = provisioningState; - ClusterStatus = clusterStatus; - NodeGroupSpecs = nodeGroupSpecs; - } - - /// The mode to create a mongo cluster. - public CosmosDBAccountCreateMode? CreateMode { get; set; } - /// Parameters used for restore operations. - public MongoClusterRestoreParameters RestoreParameters { get; set; } - /// The administrator's login for the mongo cluster. - public string AdministratorLogin { get; set; } - /// The password of the administrator login. - public string AdministratorLoginPassword { get; set; } - /// The Mongo DB server version. Defaults to the latest available version if not specified. - public string ServerVersion { get; set; } - /// The default mongo connection string for the cluster. - public string ConnectionString { get; } - /// Earliest restore timestamp in UTC ISO8601 format. - public string EarliestRestoreTime { get; } - /// A provisioning state of the mongo cluster. - public CosmosDBProvisioningState? ProvisioningState { get; } - /// A status of the mongo cluster. - public MongoClusterStatus? ClusterStatus { get; } - /// The list of node group specs in the cluster. - public IList NodeGroupSpecs { get; } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterResource.cs deleted file mode 100644 index 7bf5d3b850b6..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoClusterResource.cs +++ /dev/null @@ -1,723 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.CosmosDB.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.CosmosDB -{ - /// - /// A Class representing a MongoCluster along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetMongoClusterResource method. - /// Otherwise you can get one from its parent resource using the GetMongoCluster method. - /// - public partial class MongoClusterResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mongoClusterName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _mongoClusterClientDiagnostics; - private readonly MongoClustersRestOperations _mongoClusterRestClient; - private readonly MongoClusterData _data; - - /// Initializes a new instance of the class for mocking. - protected MongoClusterResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal MongoClusterResource(ArmClient client, MongoClusterData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal MongoClusterResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _mongoClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CosmosDB", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string mongoClusterApiVersion); - _mongoClusterRestClient = new MongoClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mongoClusterApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DocumentDB/mongoClusters"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual MongoClusterData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of CosmosDBFirewallRuleResources in the MongoCluster. - /// An object representing collection of CosmosDBFirewallRuleResources and their operations over a CosmosDBFirewallRuleResource. - public virtual CosmosDBFirewallRuleCollection GetCosmosDBFirewallRules() - { - return GetCachedClient(Client => new CosmosDBFirewallRuleCollection(Client, Id)); - } - - /// - /// Gets information about a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetCosmosDBFirewallRuleAsync(string firewallRuleName, CancellationToken cancellationToken = default) - { - return await GetCosmosDBFirewallRules().GetAsync(firewallRuleName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets information about a mongo cluster firewall rule. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName} - /// - /// - /// Operation Id - /// MongoClusters_GetFirewallRule - /// - /// - /// - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetCosmosDBFirewallRule(string firewallRuleName, CancellationToken cancellationToken = default) - { - return GetCosmosDBFirewallRules().Get(firewallRuleName, cancellationToken); - } - - /// - /// Gets information about a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.Get"); - scope.Start(); - try - { - var response = await _mongoClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MongoClusterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets information about a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.Get"); - scope.Start(); - try - { - var response = _mongoClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MongoClusterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.Delete"); - scope.Start(); - try - { - var response = await _mongoClusterRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(_mongoClusterClientDiagnostics, Pipeline, _mongoClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a mongo cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.Delete"); - scope.Start(); - try - { - var response = _mongoClusterRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new CosmosDBArmOperation(_mongoClusterClientDiagnostics, Pipeline, _mongoClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Update - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for updating a mongo cluster. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, MongoClusterPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.Update"); - scope.Start(); - try - { - var response = await _mongoClusterRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new MongoClusterOperationSource(Client), _mongoClusterClientDiagnostics, Pipeline, _mongoClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Update - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for updating a mongo cluster. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, MongoClusterPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.Update"); - scope.Start(); - try - { - var response = _mongoClusterRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new CosmosDBArmOperation(new MongoClusterOperationSource(Client), _mongoClusterClientDiagnostics, Pipeline, _mongoClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/listConnectionStrings - /// - /// - /// Operation Id - /// MongoClusters_ListConnectionStrings - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetConnectionStringsAsync(CancellationToken cancellationToken = default) - { - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.GetConnectionStrings"); - scope.Start(); - try - { - var response = await _mongoClusterRestClient.ListConnectionStringsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/listConnectionStrings - /// - /// - /// Operation Id - /// MongoClusters_ListConnectionStrings - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetConnectionStrings(CancellationToken cancellationToken = default) - { - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.GetConnectionStrings"); - scope.Start(); - try - { - var response = _mongoClusterRestClient.ListConnectionStrings(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _mongoClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MongoClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new MongoClusterPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _mongoClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new MongoClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new MongoClusterPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _mongoClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MongoClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new MongoClusterPatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _mongoClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new MongoClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new MongoClusterPatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _mongoClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MongoClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new MongoClusterPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName} - /// - /// - /// Operation Id - /// MongoClusters_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _mongoClusterClientDiagnostics.CreateScope("MongoClusterResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _mongoClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new MongoClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new MongoClusterPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.cs index b124009bdc9c..f71c1ec3f26b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.cs @@ -33,19 +33,15 @@ public MongoDBCollectionData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal MongoDBCollectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedMongoDBCollectionResourceInfo resource, MongoDBCollectionPropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal MongoDBCollectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedMongoDBCollectionResourceInfo resource, MongoDBCollectionPropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedMongoDBCollectionResourceInfo Resource { get; set; } /// Gets or sets the options. public MongoDBCollectionPropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.cs index f0478dc17e7f..0b49d10a35a0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.cs @@ -303,82 +303,6 @@ public virtual ArmOperation Update(WaitUntil waitUnti } } - /// - /// Merges the partitions of a MongoDB Collection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge - /// - /// - /// Operation Id - /// MongoDBResources_ListMongoDBCollectionPartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetMongoDBCollectionPartitionMergeAsync(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _mongoDBCollectionMongoDBResourcesClientDiagnostics.CreateScope("MongoDBCollectionResource.GetMongoDBCollectionPartitionMerge"); - scope.Start(); - try - { - var response = await _mongoDBCollectionMongoDBResourcesRestClient.ListMongoDBCollectionPartitionMergeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _mongoDBCollectionMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBCollectionMongoDBResourcesRestClient.CreateListMongoDBCollectionPartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Merges the partitions of a MongoDB Collection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge - /// - /// - /// Operation Id - /// MongoDBResources_ListMongoDBCollectionPartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation GetMongoDBCollectionPartitionMerge(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _mongoDBCollectionMongoDBResourcesClientDiagnostics.CreateScope("MongoDBCollectionResource.GetMongoDBCollectionPartitionMerge"); - scope.Start(); - try - { - var response = _mongoDBCollectionMongoDBResourcesRestClient.ListMongoDBCollectionPartitionMerge(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _mongoDBCollectionMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBCollectionMongoDBResourcesRestClient.CreateListMongoDBCollectionPartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Retrieves continuous backup information for a Mongodb collection. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.cs index 36ef0584ce98..6a1b3b508b2d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.cs @@ -228,158 +228,6 @@ public virtual ArmOperation CreateOr } } - /// - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBContainerRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB container. - /// The cancellation token to use. - /// is null. - public virtual async Task> MongoDBContainerRetrieveThroughputDistributionAsync(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBCollectionThroughputSettingResource.MongoDBContainerRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = await _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.MongoDBContainerRetrieveThroughputDistributionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.CreateMongoDBContainerRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBContainerRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB container. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation MongoDBContainerRetrieveThroughputDistribution(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBCollectionThroughputSettingResource.MongoDBContainerRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.MongoDBContainerRetrieveThroughputDistribution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.CreateMongoDBContainerRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB MongoDB container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBContainerRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current MongoDB container. - /// The cancellation token to use. - /// is null. - public virtual async Task> MongoDBContainerRedistributeThroughputAsync(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBCollectionThroughputSettingResource.MongoDBContainerRedistributeThroughput"); - scope.Start(); - try - { - var response = await _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.MongoDBContainerRedistributeThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.CreateMongoDBContainerRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB MongoDB container - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBContainerRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current MongoDB container. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation MongoDBContainerRedistributeThroughput(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBCollectionThroughputSettingResource.MongoDBContainerRedistributeThroughput"); - scope.Start(); - try - { - var response = _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.MongoDBContainerRedistributeThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBCollectionThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBCollectionThroughputSettingMongoDBResourcesRestClient.CreateMongoDBContainerRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.cs index 02ad1995b38d..703975a92689 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.cs @@ -33,19 +33,15 @@ public MongoDBDatabaseData(AzureLocation location) : base(location) /// The location. /// /// - /// Identity for the resource. - internal MongoDBDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedMongoDBDatabaseResourceInfo resource, MongoDBDatabasePropertiesConfig options, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal MongoDBDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedMongoDBDatabaseResourceInfo resource, MongoDBDatabasePropertiesConfig options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; - Identity = identity; } /// Gets or sets the resource. public ExtendedMongoDBDatabaseResourceInfo Resource { get; set; } /// Gets or sets the options. public MongoDBDatabasePropertiesConfig Options { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.cs index adefa62d6d68..825bce337470 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.cs @@ -356,82 +356,6 @@ public virtual ArmOperation Update(WaitUntil waitUntil, } } - /// - /// Merges the partitions of a MongoDB database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/partitionMerge - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBDatabasePartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual async Task> MongoDBDatabasePartitionMergeAsync(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _mongoDBDatabaseMongoDBResourcesClientDiagnostics.CreateScope("MongoDBDatabaseResource.MongoDBDatabasePartitionMerge"); - scope.Start(); - try - { - var response = await _mongoDBDatabaseMongoDBResourcesRestClient.MongoDBDatabasePartitionMergeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _mongoDBDatabaseMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBDatabaseMongoDBResourcesRestClient.CreateMongoDBDatabasePartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Merges the partitions of a MongoDB database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/partitionMerge - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBDatabasePartitionMerge - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation MongoDBDatabasePartitionMerge(WaitUntil waitUntil, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var scope = _mongoDBDatabaseMongoDBResourcesClientDiagnostics.CreateScope("MongoDBDatabaseResource.MongoDBDatabasePartitionMerge"); - scope.Start(); - try - { - var response = _mongoDBDatabaseMongoDBResourcesRestClient.MongoDBDatabasePartitionMerge(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionStorageInfoCollectionOperationSource(), _mongoDBDatabaseMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBDatabaseMongoDBResourcesRestClient.CreateMongoDBDatabasePartitionMergeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, mergeParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.cs index 37fc90ddc6bd..e051134ddc77 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.cs @@ -364,158 +364,6 @@ public virtual ArmOperation MigrateMon } } - /// - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBDatabaseRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB database. - /// The cancellation token to use. - /// is null. - public virtual async Task> MongoDBDatabaseRetrieveThroughputDistributionAsync(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBDatabaseThroughputSettingResource.MongoDBDatabaseRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = await _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.MongoDBDatabaseRetrieveThroughputDistributionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.CreateMongoDBDatabaseRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBDatabaseRetrieveThroughputDistribution - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB database. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation MongoDBDatabaseRetrieveThroughputDistribution(WaitUntil waitUntil, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var scope = _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBDatabaseThroughputSettingResource.MongoDBDatabaseRetrieveThroughputDistribution"); - scope.Start(); - try - { - var response = _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.MongoDBDatabaseRetrieveThroughputDistribution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.CreateMongoDBDatabaseRetrieveThroughputDistributionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, retrieveThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB MongoDB database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBDatabaseRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current MongoDB database. - /// The cancellation token to use. - /// is null. - public virtual async Task> MongoDBDatabaseRedistributeThroughputAsync(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBDatabaseThroughputSettingResource.MongoDBDatabaseRedistributeThroughput"); - scope.Start(); - try - { - var response = await _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.MongoDBDatabaseRedistributeThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken).ConfigureAwait(false); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.CreateMongoDBDatabaseRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Redistribute throughput for an Azure Cosmos DB MongoDB database - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput - /// - /// - /// Operation Id - /// MongoDBResources_MongoDBDatabaseRedistributeThroughput - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide for redistributing throughput for the current MongoDB database. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation MongoDBDatabaseRedistributeThroughput(WaitUntil waitUntil, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var scope = _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("MongoDBDatabaseThroughputSettingResource.MongoDBDatabaseRedistributeThroughput"); - scope.Start(); - try - { - var response = _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.MongoDBDatabaseRedistributeThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters, cancellationToken); - var operation = new CosmosDBArmOperation(new PhysicalPartitionThroughputInfoResultOperationSource(), _mongoDBDatabaseThroughputSettingMongoDBResourcesClientDiagnostics, Pipeline, _mongoDBDatabaseThroughputSettingMongoDBResourcesRestClient.CreateMongoDBDatabaseRedistributeThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, redistributeThroughputParameters).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraClustersRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraClustersRestOperations.cs index 05e8566a997a..199ff08b0bbc 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraClustersRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraClustersRestOperations.cs @@ -33,7 +33,7 @@ public CassandraClustersRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -562,173 +562,6 @@ public Response InvokeCommand(string subscriptionId, string resourceGroupName, s } } - internal HttpMessage CreateListBackupsRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/cassandraClusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/backups", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List the backups of this cluster that are available to restore. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Managed Cassandra cluster name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBackupsAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListBackupsRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ListBackups value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ListBackups.DeserializeListBackups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List the backups of this cluster that are available to restore. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Managed Cassandra cluster name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListBackups(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListBackupsRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ListBackups value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ListBackups.DeserializeListBackups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetBackupRequest(string subscriptionId, string resourceGroupName, string clusterName, string backupId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/cassandraClusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/backups/", false); - uri.AppendPath(backupId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get the properties of an individual backup of this cluster that is available to restore. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Managed Cassandra cluster name. - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetBackupAsync(string subscriptionId, string resourceGroupName, string clusterName, string backupId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(backupId, nameof(backupId)); - - using var message = CreateGetBackupRequest(subscriptionId, resourceGroupName, clusterName, backupId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CassandraClusterBackupResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CassandraClusterBackupResourceData.DeserializeCassandraClusterBackupResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CassandraClusterBackupResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get the properties of an individual backup of this cluster that is available to restore. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Managed Cassandra cluster name. - /// Id of a restorable backup of a Cassandra cluster. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetBackup(string subscriptionId, string resourceGroupName, string clusterName, string backupId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(backupId, nameof(backupId)); - - using var message = CreateGetBackupRequest(subscriptionId, resourceGroupName, clusterName, backupId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CassandraClusterBackupResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CassandraClusterBackupResourceData.DeserializeCassandraClusterBackupResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CassandraClusterBackupResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraDataCentersRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraDataCentersRestOperations.cs index 0b8a82792cd9..71435a1adc42 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraDataCentersRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraDataCentersRestOperations.cs @@ -33,7 +33,7 @@ public CassandraDataCentersRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraResourcesRestOperations.cs index c492127ad13d..0983e0c32e95 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CassandraResourcesRestOperations.cs @@ -33,7 +33,7 @@ public CassandraResourcesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1392,709 +1392,5 @@ public Response MigrateCassandraTableToManualThroughput(string subscriptionId, s throw new RequestFailedException(message.Response); } } - - internal HttpMessage CreateListCassandraViewsRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListCassandraViewsAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - - using var message = CreateListCassandraViewsRequest(subscriptionId, resourceGroupName, accountName, keyspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CassandraViewListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CassandraViewListResult.DeserializeCassandraViewListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListCassandraViews(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - - using var message = CreateListCassandraViewsRequest(subscriptionId, resourceGroupName, accountName, keyspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CassandraViewListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CassandraViewListResult.DeserializeCassandraViewListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetCassandraViewRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetCassandraViewAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateGetCassandraViewRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CassandraViewGetResultData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CassandraViewGetResultData.DeserializeCassandraViewGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CassandraViewGetResultData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the Cassandra view under an existing Azure Cosmos DB database account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetCassandraView(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateGetCassandraViewRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CassandraViewGetResultData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CassandraViewGetResultData.DeserializeCassandraViewGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CassandraViewGetResultData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateUpdateCassandraViewRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CassandraViewGetResultCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Create or update an Azure Cosmos DB Cassandra View. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The parameters to provide for the current Cassandra View. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateUpdateCassandraViewAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CassandraViewGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateCassandraViewRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update an Azure Cosmos DB Cassandra View. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The parameters to provide for the current Cassandra View. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateUpdateCassandraView(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CassandraViewGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateCassandraViewRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteCassandraViewRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - _userAgent.Apply(message); - return message; - } - - /// Deletes an existing Azure Cosmos DB Cassandra view. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteCassandraViewAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateDeleteCassandraViewRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an existing Azure Cosmos DB Cassandra view. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response DeleteCassandraView(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateDeleteCassandraViewRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetCassandraViewThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendPath("/throughputSettings/default", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetCassandraViewThroughputAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateGetCassandraViewThroughputRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ThroughputSettingData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ThroughputSettingData.DeserializeThroughputSettingData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ThroughputSettingData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetCassandraViewThroughput(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateGetCassandraViewThroughputRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ThroughputSettingData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ThroughputSettingData.DeserializeThroughputSettingData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ThroughputSettingData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateCassandraViewThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, ThroughputSettingsUpdateData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendPath("/throughputSettings/default", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update RUs per second of an Azure Cosmos DB Cassandra view. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The RUs per second of the parameters to provide for the current Cassandra view. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task UpdateCassandraViewThroughputAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, ThroughputSettingsUpdateData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateUpdateCassandraViewThroughputRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update RUs per second of an Azure Cosmos DB Cassandra view. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The RUs per second of the parameters to provide for the current Cassandra view. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response UpdateCassandraViewThroughput(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, ThroughputSettingsUpdateData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateUpdateCassandraViewThroughputRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateMigrateCassandraViewToAutoscaleRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendPath("/throughputSettings/default/migrateToAutoscale", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task MigrateCassandraViewToAutoscaleAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateMigrateCassandraViewToAutoscaleRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response MigrateCassandraViewToAutoscale(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateMigrateCassandraViewToAutoscaleRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateMigrateCassandraViewToManualThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/cassandraKeyspaces/", false); - uri.AppendPath(keyspaceName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendPath("/throughputSettings/default/migrateToManualThroughput", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task MigrateCassandraViewToManualThroughputAsync(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateMigrateCassandraViewToManualThroughputRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB keyspace name. - /// Cosmos DB view name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response MigrateCassandraViewToManualThroughput(string subscriptionId, string resourceGroupName, string accountName, string keyspaceName, string viewName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(keyspaceName, nameof(keyspaceName)); - Argument.AssertNotNullOrEmpty(viewName, nameof(viewName)); - - using var message = CreateMigrateCassandraViewToManualThroughputRequest(subscriptionId, resourceGroupName, accountName, keyspaceName, viewName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRegionRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRegionRestOperations.cs index 44c1e724b120..8e3fd66bc9d0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRegionRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRegionRestOperations.cs @@ -33,7 +33,7 @@ public CollectionPartitionRegionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRestOperations.cs index c086be9ed93a..87eda96fa71a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionPartitionRestOperations.cs @@ -33,7 +33,7 @@ public CollectionPartitionRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRegionRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRegionRestOperations.cs index dd41cc236c30..22861126efc2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRegionRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRegionRestOperations.cs @@ -33,7 +33,7 @@ public CollectionRegionRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRestOperations.cs index e63342ab46c2..4f1911e3d004 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/CollectionRestOperations.cs @@ -33,7 +33,7 @@ public CollectionRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DataTransferJobsRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DataTransferJobsRestOperations.cs deleted file mode 100644 index e27575c882d1..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DataTransferJobsRestOperations.cs +++ /dev/null @@ -1,630 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - internal partial class DataTransferJobsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of DataTransferJobsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public DataTransferJobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string accountName, string jobName, DataTransferJobGetResultCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/dataTransferJobs/", false); - uri.AppendPath(jobName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Creates a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The DataTransferJobGetResultCreateOrUpdateContent to use. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string accountName, string jobName, DataTransferJobGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, accountName, jobName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The DataTransferJobGetResultCreateOrUpdateContent to use. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string accountName, string jobName, DataTransferJobGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, accountName, jobName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string jobName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/dataTransferJobs/", false); - uri.AppendPath(jobName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, jobName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataTransferJobGetResultData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, jobName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataTransferJobGetResultData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreatePauseRequest(string subscriptionId, string resourceGroupName, string accountName, string jobName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/dataTransferJobs/", false); - uri.AppendPath(jobName, true); - uri.AppendPath("/pause", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Pause a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> PauseAsync(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreatePauseRequest(subscriptionId, resourceGroupName, accountName, jobName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Pause a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Pause(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreatePauseRequest(subscriptionId, resourceGroupName, accountName, jobName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateResumeRequest(string subscriptionId, string resourceGroupName, string accountName, string jobName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/dataTransferJobs/", false); - uri.AppendPath(jobName, true); - uri.AppendPath("/resume", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Resumes a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ResumeAsync(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreateResumeRequest(subscriptionId, resourceGroupName, accountName, jobName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Resumes a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Resume(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreateResumeRequest(subscriptionId, resourceGroupName, accountName, jobName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string accountName, string jobName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/dataTransferJobs/", false); - uri.AppendPath(jobName, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Cancels a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CancelAsync(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, accountName, jobName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Cancels a Data Transfer Job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Name of the Data Transfer Job. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Cancel(string subscriptionId, string resourceGroupName, string accountName, string jobName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, accountName, jobName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobGetResultData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataTransferJobGetResultData.DeserializeDataTransferJobGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByDatabaseAccountRequest(string subscriptionId, string resourceGroupName, string accountName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/dataTransferJobs", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a list of Data Transfer jobs. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByDatabaseAccountAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByDatabaseAccountRequest(subscriptionId, resourceGroupName, accountName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobFeedResults value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataTransferJobFeedResults.DeserializeDataTransferJobFeedResults(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a list of Data Transfer jobs. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByDatabaseAccount(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByDatabaseAccountRequest(subscriptionId, resourceGroupName, accountName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobFeedResults value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataTransferJobFeedResults.DeserializeDataTransferJobFeedResults(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByDatabaseAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a list of Data Transfer jobs. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByDatabaseAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByDatabaseAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobFeedResults value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataTransferJobFeedResults.DeserializeDataTransferJobFeedResults(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a list of Data Transfer jobs. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByDatabaseAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByDatabaseAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataTransferJobFeedResults value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataTransferJobFeedResults.DeserializeDataTransferJobFeedResults(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountRegionRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountRegionRestOperations.cs index ea7fb426d81c..e48c065a4bfb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountRegionRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountRegionRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseAccountRegionRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountsRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountsRestOperations.cs index 7d304c5f67ad..42d4e1d00222 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountsRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseAccountsRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseAccountsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseRestOperations.cs index 6b92f7b7d6a1..6c39bde2c39c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/DatabaseRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/GraphResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/GraphResourcesRestOperations.cs deleted file mode 100644 index f4a6ef913446..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/GraphResourcesRestOperations.cs +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - internal partial class GraphResourcesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of GraphResourcesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public GraphResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListGraphsRequest(string subscriptionId, string resourceGroupName, string accountName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/graphs", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the graphs under an existing Azure Cosmos DB database account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListGraphsAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListGraphsRequest(subscriptionId, resourceGroupName, accountName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - GraphResourcesListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = GraphResourcesListResult.DeserializeGraphResourcesListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the graphs under an existing Azure Cosmos DB database account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListGraphs(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListGraphsRequest(subscriptionId, resourceGroupName, accountName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - GraphResourcesListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = GraphResourcesListResult.DeserializeGraphResourcesListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetGraphRequest(string subscriptionId, string resourceGroupName, string accountName, string graphName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/graphs/", false); - uri.AppendPath(graphName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetGraphAsync(string subscriptionId, string resourceGroupName, string accountName, string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var message = CreateGetGraphRequest(subscriptionId, resourceGroupName, accountName, graphName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - GraphResourceGetResultData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = GraphResourceGetResultData.DeserializeGraphResourceGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((GraphResourceGetResultData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetGraph(string subscriptionId, string resourceGroupName, string accountName, string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var message = CreateGetGraphRequest(subscriptionId, resourceGroupName, accountName, graphName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - GraphResourceGetResultData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = GraphResourceGetResultData.DeserializeGraphResourceGetResultData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((GraphResourceGetResultData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateUpdateGraphRequest(string subscriptionId, string resourceGroupName, string accountName, string graphName, GraphResourceGetResultCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/graphs/", false); - uri.AppendPath(graphName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Create or update an Azure Cosmos DB Graph. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB graph resource name. - /// The parameters to provide for the current graph. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateUpdateGraphAsync(string subscriptionId, string resourceGroupName, string accountName, string graphName, GraphResourceGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateGraphRequest(subscriptionId, resourceGroupName, accountName, graphName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update an Azure Cosmos DB Graph. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB graph resource name. - /// The parameters to provide for the current graph. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateUpdateGraph(string subscriptionId, string resourceGroupName, string accountName, string graphName, GraphResourceGetResultCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateGraphRequest(subscriptionId, resourceGroupName, accountName, graphName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteGraphResourceRequest(string subscriptionId, string resourceGroupName, string accountName, string graphName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/graphs/", false); - uri.AppendPath(graphName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - _userAgent.Apply(message); - return message; - } - - /// Deletes an existing Azure Cosmos DB Graph Resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteGraphResourceAsync(string subscriptionId, string resourceGroupName, string accountName, string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var message = CreateDeleteGraphResourceRequest(subscriptionId, resourceGroupName, accountName, graphName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an existing Azure Cosmos DB Graph Resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB graph resource name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteGraphResource(string subscriptionId, string resourceGroupName, string accountName, string graphName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(graphName, nameof(graphName)); - - using var message = CreateDeleteGraphResourceRequest(subscriptionId, resourceGroupName, accountName, graphName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/GremlinResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/GremlinResourcesRestOperations.cs index aaca2a15404f..4d0d590ba5a3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/GremlinResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/GremlinResourcesRestOperations.cs @@ -33,7 +33,7 @@ public GremlinResourcesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/LocationsRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/LocationsRestOperations.cs index 69ddc872c0a5..e558a1caceac 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/LocationsRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/LocationsRestOperations.cs @@ -33,7 +33,7 @@ public LocationsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/MongoClustersRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/MongoClustersRestOperations.cs deleted file mode 100644 index 345a7a3340aa..000000000000 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/MongoClustersRestOperations.cs +++ /dev/null @@ -1,1189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.CosmosDB.Models; - -namespace Azure.ResourceManager.CosmosDB -{ - internal partial class MongoClustersRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of MongoClustersRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public MongoClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the mongo clusters in a given subscription. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the mongo clusters in a given subscription. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the mongo clusters in a given resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the mongo clusters in a given resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string mongoClusterName, MongoClusterData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The required parameters for creating or updating a mongo cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, MongoClusterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mongoClusterName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The required parameters for creating or updating a mongo cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string mongoClusterName, MongoClusterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mongoClusterName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string mongoClusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets information about a mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, mongoClusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MongoClusterData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MongoClusterData.DeserializeMongoClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MongoClusterData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets information about a mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, mongoClusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MongoClusterData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MongoClusterData.DeserializeMongoClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MongoClusterData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string mongoClusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mongoClusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mongoClusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string mongoClusterName, MongoClusterPatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The parameters for updating a mongo cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, MongoClusterPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mongoClusterName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The parameters for updating a mongo cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string mongoClusterName, MongoClusterPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mongoClusterName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateFirewallRuleRequest(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName, CosmosDBFirewallRuleData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendPath("/firewallRules/", false); - uri.AppendPath(firewallRuleName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The name of the mongo cluster firewall rule. - /// The required parameters for creating or updating a firewall rule. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateFirewallRuleAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName, CosmosDBFirewallRuleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateFirewallRuleRequest(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The name of the mongo cluster firewall rule. - /// The required parameters for creating or updating a firewall rule. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateFirewallRule(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName, CosmosDBFirewallRuleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateFirewallRuleRequest(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteFirewallRuleRequest(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendPath("/firewallRules/", false); - uri.AppendPath(firewallRuleName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a mongo cluster firewall rule. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteFirewallRuleAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var message = CreateDeleteFirewallRuleRequest(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a mongo cluster firewall rule. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteFirewallRule(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var message = CreateDeleteFirewallRuleRequest(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetFirewallRuleRequest(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendPath("/firewallRules/", false); - uri.AppendPath(firewallRuleName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets information about a mongo cluster firewall rule. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetFirewallRuleAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var message = CreateGetFirewallRuleRequest(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CosmosDBFirewallRuleData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CosmosDBFirewallRuleData.DeserializeCosmosDBFirewallRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CosmosDBFirewallRuleData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets information about a mongo cluster firewall rule. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The name of the mongo cluster firewall rule. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetFirewallRule(string subscriptionId, string resourceGroupName, string mongoClusterName, string firewallRuleName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - - using var message = CreateGetFirewallRuleRequest(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CosmosDBFirewallRuleData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CosmosDBFirewallRuleData.DeserializeCosmosDBFirewallRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CosmosDBFirewallRuleData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListFirewallRulesRequest(string subscriptionId, string resourceGroupName, string mongoClusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendPath("/firewallRules", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the firewall rules in a given mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListFirewallRulesAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateListFirewallRulesRequest(subscriptionId, resourceGroupName, mongoClusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - FirewallRuleListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the firewall rules in a given mongo cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListFirewallRules(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateListFirewallRulesRequest(subscriptionId, resourceGroupName, mongoClusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - FirewallRuleListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, CheckCosmosDBNameAvailabilityContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/checkMongoClusterNameAvailability", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Check the availability of name for resource. - /// The ID of the target subscription. - /// The name of the Azure region. - /// The required parameters for checking if resource name is available. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, CheckCosmosDBNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CheckCosmosDBNameAvailabilityResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CheckCosmosDBNameAvailabilityResponse.DeserializeCheckCosmosDBNameAvailabilityResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Check the availability of name for resource. - /// The ID of the target subscription. - /// The name of the Azure region. - /// The required parameters for checking if resource name is available. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response CheckNameAvailability(string subscriptionId, AzureLocation location, CheckCosmosDBNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CheckCosmosDBNameAvailabilityResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CheckCosmosDBNameAvailabilityResponse.DeserializeCheckCosmosDBNameAvailabilityResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListConnectionStringsRequest(string subscriptionId, string resourceGroupName, string mongoClusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/mongoClusters/", false); - uri.AppendPath(mongoClusterName, true); - uri.AppendPath("/listConnectionStrings", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListConnectionStringsAsync(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateListConnectionStringsRequest(subscriptionId, resourceGroupName, mongoClusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ListConnectionStringsResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ListConnectionStringsResult.DeserializeListConnectionStringsResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListConnectionStrings(string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateListConnectionStringsRequest(subscriptionId, resourceGroupName, mongoClusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ListConnectionStringsResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ListConnectionStringsResult.DeserializeListConnectionStringsResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the mongo clusters in a given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the mongo clusters in a given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the mongo clusters in a given resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the mongo clusters in a given resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MongoClusterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MongoClusterListResult.DeserializeMongoClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListFirewallRulesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string mongoClusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the firewall rules in a given mongo cluster. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListFirewallRulesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateListFirewallRulesNextPageRequest(nextLink, subscriptionId, resourceGroupName, mongoClusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - FirewallRuleListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the firewall rules in a given mongo cluster. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the mongo cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListFirewallRulesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string mongoClusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mongoClusterName, nameof(mongoClusterName)); - - using var message = CreateListFirewallRulesNextPageRequest(nextLink, subscriptionId, resourceGroupName, mongoClusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - FirewallRuleListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/MongoDBResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/MongoDBResourcesRestOperations.cs index 69a75d483635..4376a6ad8274 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/MongoDBResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/MongoDBResourcesRestOperations.cs @@ -33,7 +33,7 @@ public MongoDBResourcesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -691,358 +691,6 @@ public Response MigrateMongoDBDatabaseToManualThroughput(string subscriptionId, } } - internal HttpMessage CreateMongoDBDatabaseRetrieveThroughputDistributionRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/mongodbDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/throughputSettings/default/retrieveThroughputDistribution", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(retrieveThroughputParameters); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB database. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task MongoDBDatabaseRetrieveThroughputDistributionAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var message = CreateMongoDBDatabaseRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, retrieveThroughputParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB database. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response MongoDBDatabaseRetrieveThroughputDistribution(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var message = CreateMongoDBDatabaseRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, retrieveThroughputParameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateMongoDBDatabaseRedistributeThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/mongodbDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/throughputSettings/default/redistributeThroughput", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(redistributeThroughputParameters); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Redistribute throughput for an Azure Cosmos DB MongoDB database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters to provide for redistributing throughput for the current MongoDB database. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task MongoDBDatabaseRedistributeThroughputAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var message = CreateMongoDBDatabaseRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, redistributeThroughputParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Redistribute throughput for an Azure Cosmos DB MongoDB database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters to provide for redistributing throughput for the current MongoDB database. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response MongoDBDatabaseRedistributeThroughput(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var message = CreateMongoDBDatabaseRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, redistributeThroughputParameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateMongoDBContainerRetrieveThroughputDistributionRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, RetrieveThroughputParameters retrieveThroughputParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/mongodbDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/collections/", false); - uri.AppendPath(collectionName, true); - uri.AppendPath("/throughputSettings/default/retrieveThroughputDistribution", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(retrieveThroughputParameters); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB collection name. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB container. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task MongoDBContainerRetrieveThroughputDistributionAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(collectionName, nameof(collectionName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var message = CreateMongoDBContainerRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, collectionName, retrieveThroughputParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB collection name. - /// The parameters to provide for retrieving throughput distribution for the current MongoDB container. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response MongoDBContainerRetrieveThroughputDistribution(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(collectionName, nameof(collectionName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var message = CreateMongoDBContainerRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, collectionName, retrieveThroughputParameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateMongoDBContainerRedistributeThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, RedistributeThroughputParameters redistributeThroughputParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/mongodbDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/collections/", false); - uri.AppendPath(collectionName, true); - uri.AppendPath("/throughputSettings/default/redistributeThroughput", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(redistributeThroughputParameters); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Redistribute throughput for an Azure Cosmos DB MongoDB container. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB collection name. - /// The parameters to provide for redistributing throughput for the current MongoDB container. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task MongoDBContainerRedistributeThroughputAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(collectionName, nameof(collectionName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var message = CreateMongoDBContainerRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, collectionName, redistributeThroughputParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Redistribute throughput for an Azure Cosmos DB MongoDB container. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB collection name. - /// The parameters to provide for redistributing throughput for the current MongoDB container. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response MongoDBContainerRedistributeThroughput(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(collectionName, nameof(collectionName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - - using var message = CreateMongoDBContainerRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, collectionName, redistributeThroughputParameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateListMongoDBCollectionsRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName) { var message = _pipeline.CreateMessage(); @@ -1393,182 +1041,6 @@ public Response DeleteMongoDBCollection(string subscriptionId, string resourceGr } } - internal HttpMessage CreateMongoDBDatabasePartitionMergeRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, MergeParameters mergeParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/mongodbDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/partitionMerge", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(mergeParameters); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Merges the partitions of a MongoDB database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task MongoDBDatabasePartitionMergeAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var message = CreateMongoDBDatabasePartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, mergeParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Merges the partitions of a MongoDB database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response MongoDBDatabasePartitionMerge(string subscriptionId, string resourceGroupName, string accountName, string databaseName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var message = CreateMongoDBDatabasePartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, mergeParameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListMongoDBCollectionPartitionMergeRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, MergeParameters mergeParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/mongodbDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/collections/", false); - uri.AppendPath(collectionName, true); - uri.AppendPath("/partitionMerge", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(mergeParameters); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Merges the partitions of a MongoDB Collection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB collection name. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task ListMongoDBCollectionPartitionMergeAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(collectionName, nameof(collectionName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var message = CreateListMongoDBCollectionPartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, collectionName, mergeParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Merges the partitions of a MongoDB Collection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB collection name. - /// The parameters for the merge operation. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response ListMongoDBCollectionPartitionMerge(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(collectionName, nameof(collectionName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - - using var message = CreateListMongoDBCollectionPartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, collectionName, mergeParameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateGetMongoDBCollectionThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string collectionName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRegionRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRegionRestOperations.cs index 1607261b398f..15a395a296d3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRegionRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRegionRestOperations.cs @@ -33,7 +33,7 @@ public PartitionKeyRangeIdRegionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRestOperations.cs index 177d359f1c60..bbcfab5f7882 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PartitionKeyRangeIdRestOperations.cs @@ -33,7 +33,7 @@ public PartitionKeyRangeIdRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileRestOperations.cs index fe8c0295e1a5..e223101f3545 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileRestOperations.cs @@ -33,7 +33,7 @@ public PercentileRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileSourceTargetRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileSourceTargetRestOperations.cs index 5d02a7093ad5..832dfec02f08 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileSourceTargetRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileSourceTargetRestOperations.cs @@ -33,7 +33,7 @@ public PercentileSourceTargetRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileTargetRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileTargetRestOperations.cs index 029de11d0554..71b51b46cad0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileTargetRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PercentileTargetRestOperations.cs @@ -33,7 +33,7 @@ public PercentileTargetRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index c8a01377f74f..038feb8fd5b9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 24bbecd7632e..4e3bfa5f7e3e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableDatabaseAccountsRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableDatabaseAccountsRestOperations.cs index 293020c2d546..71205ee7f7c1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableDatabaseAccountsRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableDatabaseAccountsRestOperations.cs @@ -33,7 +33,7 @@ public RestorableDatabaseAccountsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinDatabasesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinDatabasesRestOperations.cs index b166e21aaf66..9c6875e142f4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinDatabasesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinDatabasesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableGremlinDatabasesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinGraphsRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinGraphsRestOperations.cs index b7261e1edf3f..9181fe2d3d23 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinGraphsRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinGraphsRestOperations.cs @@ -33,7 +33,7 @@ public RestorableGremlinGraphsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinResourcesRestOperations.cs index 491e0a52c006..09ed44bcf1d0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableGremlinResourcesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableGremlinResourcesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbCollectionsRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbCollectionsRestOperations.cs index 5c3591f4fd5d..12ea3367ed31 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbCollectionsRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbCollectionsRestOperations.cs @@ -33,7 +33,7 @@ public RestorableMongodbCollectionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbDatabasesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbDatabasesRestOperations.cs index d95a8e3e45bb..332919f7b6c9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbDatabasesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbDatabasesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableMongodbDatabasesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbResourcesRestOperations.cs index a928d5461714..77d70bdc2405 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableMongodbResourcesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableMongodbResourcesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlContainersRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlContainersRestOperations.cs index efc9633c797f..2481216fe705 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlContainersRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlContainersRestOperations.cs @@ -33,7 +33,7 @@ public RestorableSqlContainersRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlDatabasesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlDatabasesRestOperations.cs index 789a9361823a..1b14768976e4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlDatabasesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlDatabasesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableSqlDatabasesRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlResourcesRestOperations.cs index 3ff217dd2a69..481fc81b1caa 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableSqlResourcesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableSqlResourcesRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTableResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTableResourcesRestOperations.cs index b53887e11b4e..8434f1ec2004 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTableResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTableResourcesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableTableResourcesRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTablesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTablesRestOperations.cs index e925ee574e56..8178bf00e802 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTablesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/RestorableTablesRestOperations.cs @@ -33,7 +33,7 @@ public RestorableTablesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/ServiceRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/ServiceRestOperations.cs index 80ed56e4796c..a4812d72e55c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/ServiceRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/ServiceRestOperations.cs @@ -33,7 +33,7 @@ public ServiceRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/SqlResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/SqlResourcesRestOperations.cs index f8bea3d172d4..252ea25be91b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/SqlResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/SqlResourcesRestOperations.cs @@ -33,7 +33,7 @@ public SqlResourcesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -691,275 +691,6 @@ public Response MigrateSqlDatabaseToManualThroughput(string subscriptionId, stri } } - internal HttpMessage CreateListClientEncryptionKeysRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/sqlDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/clientEncryptionKeys", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListClientEncryptionKeysAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - - using var message = CreateListClientEncryptionKeysRequest(subscriptionId, resourceGroupName, accountName, databaseName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ClientEncryptionKeysListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ClientEncryptionKeysListResult.DeserializeClientEncryptionKeysListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListClientEncryptionKeys(string subscriptionId, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - - using var message = CreateListClientEncryptionKeysRequest(subscriptionId, resourceGroupName, accountName, databaseName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ClientEncryptionKeysListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ClientEncryptionKeysListResult.DeserializeClientEncryptionKeysListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetClientEncryptionKeyRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/sqlDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/clientEncryptionKeys/", false); - uri.AppendPath(clientEncryptionKeyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB ClientEncryptionKey name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetClientEncryptionKeyAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); - - using var message = CreateGetClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CosmosDBSqlClientEncryptionKeyData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CosmosDBSqlClientEncryptionKeyData.DeserializeCosmosDBSqlClientEncryptionKeyData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CosmosDBSqlClientEncryptionKeyData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB ClientEncryptionKey name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetClientEncryptionKey(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); - - using var message = CreateGetClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CosmosDBSqlClientEncryptionKeyData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CosmosDBSqlClientEncryptionKeyData.DeserializeCosmosDBSqlClientEncryptionKeyData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CosmosDBSqlClientEncryptionKeyData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateUpdateClientEncryptionKeyRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/sqlDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/clientEncryptionKeys/", false); - uri.AppendPath(clientEncryptionKeyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB ClientEncryptionKey name. - /// The parameters to provide for the client encryption key. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateUpdateClientEncryptionKeyAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB ClientEncryptionKey name. - /// The parameters to provide for the client encryption key. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateUpdateClientEncryptionKey(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateListSqlContainersRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName) { var message = _pipeline.CreateMessage(); @@ -1097,191 +828,14 @@ public async Task> GetSqlContainerAsync(strin value = CosmosDBSqlContainerData.DeserializeCosmosDBSqlContainerData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((CosmosDBSqlContainerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the SQL container under an existing Azure Cosmos DB database account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB container name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetSqlContainer(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - - using var message = CreateGetSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CosmosDBSqlContainerData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CosmosDBSqlContainerData.DeserializeCosmosDBSqlContainerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CosmosDBSqlContainerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateUpdateSqlContainerRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CosmosDBSqlContainerCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/sqlDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/containers/", false); - uri.AppendPath(containerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Create or update an Azure Cosmos DB SQL container. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB container name. - /// The parameters to provide for the current SQL container. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateUpdateSqlContainerAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CosmosDBSqlContainerCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update an Azure Cosmos DB SQL container. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB container name. - /// The parameters to provide for the current SQL container. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateUpdateSqlContainer(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CosmosDBSqlContainerCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateUpdateSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteSqlContainerRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/sqlDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/containers/", false); - uri.AppendPath(containerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - _userAgent.Apply(message); - return message; - } - - /// Deletes an existing Azure Cosmos DB SQL container. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// Cosmos DB container name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteSqlContainerAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - - using var message = CreateDeleteSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; + case 404: + return Response.FromValue((CosmosDBSqlContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Deletes an existing Azure Cosmos DB SQL container. + /// Gets the SQL container under an existing Azure Cosmos DB database account. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. @@ -1290,7 +844,7 @@ public async Task DeleteSqlContainerAsync(string subscriptionId, strin /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response DeleteSqlContainer(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default) + public Response GetSqlContainer(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1298,23 +852,29 @@ public Response DeleteSqlContainer(string subscriptionId, string resourceGroupNa Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - using var message = CreateDeleteSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName); + using var message = CreateGetSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + CosmosDBSqlContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CosmosDBSqlContainerData.DeserializeCosmosDBSqlContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CosmosDBSqlContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateSqlDatabasePartitionMergeRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, MergeParameters mergeParameters) + internal HttpMessage CreateCreateUpdateSqlContainerRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CosmosDBSqlContainerCreateOrUpdateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1325,36 +885,39 @@ internal HttpMessage CreateSqlDatabasePartitionMergeRequest(string subscriptionI uri.AppendPath(accountName, true); uri.AppendPath("/sqlDatabases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/partitionMerge", false); + uri.AppendPath("/containers/", false); + uri.AppendPath(containerName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(mergeParameters); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Merges the partitions of a SQL database. + /// Create or update an Azure Cosmos DB SQL container. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// The parameters for the merge operation. + /// Cosmos DB container name. + /// The parameters to provide for the current SQL container. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task SqlDatabasePartitionMergeAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateUpdateSqlContainerAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CosmosDBSqlContainerCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateSqlDatabasePartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, mergeParameters); + using var message = CreateCreateUpdateSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1366,24 +929,26 @@ public async Task SqlDatabasePartitionMergeAsync(string subscriptionId } } - /// Merges the partitions of a SQL database. + /// Create or update an Azure Cosmos DB SQL container. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// The parameters for the merge operation. + /// Cosmos DB container name. + /// The parameters to provide for the current SQL container. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response SqlDatabasePartitionMerge(string subscriptionId, string resourceGroupName, string accountName, string databaseName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateUpdateSqlContainer(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CosmosDBSqlContainerCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateSqlDatabasePartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, mergeParameters); + using var message = CreateCreateUpdateSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1395,11 +960,11 @@ public Response SqlDatabasePartitionMerge(string subscriptionId, string resource } } - internal HttpMessage CreateListSqlContainerPartitionMergeRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, MergeParameters mergeParameters) + internal HttpMessage CreateDeleteSqlContainerRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1412,74 +977,64 @@ internal HttpMessage CreateListSqlContainerPartitionMergeRequest(string subscrip uri.AppendPath(databaseName, true); uri.AppendPath("/containers/", false); uri.AppendPath(containerName, true); - uri.AppendPath("/partitionMerge", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(mergeParameters); - request.Content = content; _userAgent.Apply(message); return message; } - /// Merges the partitions of a SQL Container. + /// Deletes an existing Azure Cosmos DB SQL container. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. /// Cosmos DB container name. - /// The parameters for the merge operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task ListSqlContainerPartitionMergeAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) + public async Task DeleteSqlContainerAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - using var message = CreateListSqlContainerPartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, mergeParameters); + using var message = CreateDeleteSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Merges the partitions of a SQL Container. + /// Deletes an existing Azure Cosmos DB SQL container. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. /// Cosmos DB container name. - /// The parameters for the merge operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response ListSqlContainerPartitionMerge(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, MergeParameters mergeParameters, CancellationToken cancellationToken = default) + public Response DeleteSqlContainer(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(mergeParameters, nameof(mergeParameters)); - using var message = CreateListSqlContainerPartitionMergeRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, mergeParameters); + using var message = CreateDeleteSqlContainerRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1838,96 +1393,11 @@ public Response MigrateSqlContainerToManualThroughput(string subscriptionId, str } } - internal HttpMessage CreateSqlDatabaseRetrieveThroughputDistributionRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DocumentDB/databaseAccounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/sqlDatabases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/throughputSettings/default/retrieveThroughputDistribution", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(retrieveThroughputParameters); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Retrieve throughput distribution for an Azure Cosmos DB SQL database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters to provide for retrieving throughput distribution for the current SQL database. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task SqlDatabaseRetrieveThroughputDistributionAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var message = CreateSqlDatabaseRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, retrieveThroughputParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Retrieve throughput distribution for an Azure Cosmos DB SQL database. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Cosmos DB database account name. - /// Cosmos DB database name. - /// The parameters to provide for retrieving throughput distribution for the current SQL database. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response SqlDatabaseRetrieveThroughputDistribution(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); - - using var message = CreateSqlDatabaseRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, retrieveThroughputParameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateSqlDatabaseRedistributeThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters) + internal HttpMessage CreateListClientEncryptionKeysRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1938,81 +1408,81 @@ internal HttpMessage CreateSqlDatabaseRedistributeThroughputRequest(string subsc uri.AppendPath(accountName, true); uri.AppendPath("/sqlDatabases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/throughputSettings/default/redistributeThroughput", false); + uri.AppendPath("/clientEncryptionKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(redistributeThroughputParameters); - request.Content = content; _userAgent.Apply(message); return message; } - /// Redistribute throughput for an Azure Cosmos DB SQL database. + /// Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// The parameters to provide for redistributing throughput for the current SQL database. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task SqlDatabaseRedistributeThroughputAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) + public async Task> ListClientEncryptionKeysAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - using var message = CreateSqlDatabaseRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, redistributeThroughputParameters); + using var message = CreateListClientEncryptionKeysRequest(subscriptionId, resourceGroupName, accountName, databaseName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ClientEncryptionKeysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClientEncryptionKeysListResult.DeserializeClientEncryptionKeysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Redistribute throughput for an Azure Cosmos DB SQL database. + /// Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// The parameters to provide for redistributing throughput for the current SQL database. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response SqlDatabaseRedistributeThroughput(string subscriptionId, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) + public Response ListClientEncryptionKeys(string subscriptionId, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); - using var message = CreateSqlDatabaseRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, redistributeThroughputParameters); + using var message = CreateListClientEncryptionKeysRequest(subscriptionId, resourceGroupName, accountName, databaseName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ClientEncryptionKeysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClientEncryptionKeysListResult.DeserializeClientEncryptionKeysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateSqlContainerRetrieveThroughputDistributionRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, RetrieveThroughputParameters retrieveThroughputParameters) + internal HttpMessage CreateGetClientEncryptionKeyRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2023,87 +1493,90 @@ internal HttpMessage CreateSqlContainerRetrieveThroughputDistributionRequest(str uri.AppendPath(accountName, true); uri.AppendPath("/sqlDatabases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/containers/", false); - uri.AppendPath(containerName, true); - uri.AppendPath("/throughputSettings/default/retrieveThroughputDistribution", false); + uri.AppendPath("/clientEncryptionKeys/", false); + uri.AppendPath(clientEncryptionKeyName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(retrieveThroughputParameters); - request.Content = content; _userAgent.Apply(message); return message; } - /// Retrieve throughput distribution for an Azure Cosmos DB SQL container. + /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// Cosmos DB container name. - /// The parameters to provide for retrieving throughput distribution for the current SQL container. + /// Cosmos DB ClientEncryptionKey name. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task SqlContainerRetrieveThroughputDistributionAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetClientEncryptionKeyAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); + Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); - using var message = CreateSqlContainerRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters); + using var message = CreateGetClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + CosmosDBSqlClientEncryptionKeyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CosmosDBSqlClientEncryptionKeyData.DeserializeCosmosDBSqlClientEncryptionKeyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CosmosDBSqlClientEncryptionKeyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Retrieve throughput distribution for an Azure Cosmos DB SQL container. + /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// Cosmos DB container name. - /// The parameters to provide for retrieving throughput distribution for the current SQL container. + /// Cosmos DB ClientEncryptionKey name. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response SqlContainerRetrieveThroughputDistribution(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetClientEncryptionKey(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(retrieveThroughputParameters, nameof(retrieveThroughputParameters)); + Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); - using var message = CreateSqlContainerRetrieveThroughputDistributionRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters); + using var message = CreateGetClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + CosmosDBSqlClientEncryptionKeyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CosmosDBSqlClientEncryptionKeyData.DeserializeCosmosDBSqlClientEncryptionKeyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CosmosDBSqlClientEncryptionKeyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateSqlContainerRedistributeThroughputRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, RedistributeThroughputParameters redistributeThroughputParameters) + internal HttpMessage CreateCreateUpdateClientEncryptionKeyRequest(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2114,40 +1587,39 @@ internal HttpMessage CreateSqlContainerRedistributeThroughputRequest(string subs uri.AppendPath(accountName, true); uri.AppendPath("/sqlDatabases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/containers/", false); - uri.AppendPath(containerName, true); - uri.AppendPath("/throughputSettings/default/redistributeThroughput", false); + uri.AppendPath("/clientEncryptionKeys/", false); + uri.AppendPath(clientEncryptionKeyName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(redistributeThroughputParameters); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Redistribute throughput for an Azure Cosmos DB SQL container. + /// Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// Cosmos DB container name. - /// The parameters to provide for redistributing throughput for the current SQL container. + /// Cosmos DB ClientEncryptionKey name. + /// The parameters to provide for the client encryption key. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task SqlContainerRedistributeThroughputAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateUpdateClientEncryptionKeyAsync(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); + Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateSqlContainerRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters); + using var message = CreateCreateUpdateClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2159,26 +1631,26 @@ public async Task SqlContainerRedistributeThroughputAsync(string subsc } } - /// Redistribute throughput for an Azure Cosmos DB SQL container. + /// Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Cosmos DB database account name. /// Cosmos DB database name. - /// Cosmos DB container name. - /// The parameters to provide for redistributing throughput for the current SQL container. + /// Cosmos DB ClientEncryptionKey name. + /// The parameters to provide for the client encryption key. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response SqlContainerRedistributeThroughput(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string containerName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateUpdateClientEncryptionKey(string subscriptionId, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); - Argument.AssertNotNull(redistributeThroughputParameters, nameof(redistributeThroughputParameters)); + Argument.AssertNotNullOrEmpty(clientEncryptionKeyName, nameof(clientEncryptionKeyName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateSqlContainerRedistributeThroughputRequest(subscriptionId, resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters); + using var message = CreateCreateUpdateClientEncryptionKeyRequest(subscriptionId, resourceGroupName, accountName, databaseName, clientEncryptionKeyName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/TableResourcesRestOperations.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/TableResourcesRestOperations.cs index 0ace58f3fc9e..e3fd02c9675c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/TableResourcesRestOperations.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestOperations/TableResourcesRestOperations.cs @@ -33,7 +33,7 @@ public TableResourcesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-15-preview"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.cs index d79fc1a62b2a..952292815c96 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.cs @@ -33,17 +33,17 @@ internal RestorableCosmosDBAccountData() /// The location of the resource group to which the resource belongs. /// The name of the global database account. /// The creation time of the restorable database account (ISO-8601 format). - /// The least recent time at which the database account can be restored to (ISO-8601 format). /// The time at which the restorable database account has been deleted (ISO-8601 format). + /// The least recent time at which the database account can be restored to (ISO-8601 format). /// The API type of the restorable database account. /// List of regions where the of the database account can be restored from. - internal RestorableCosmosDBAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, string accountName, DateTimeOffset? createdOn, DateTimeOffset? oldestRestorableOn, DateTimeOffset? deletedOn, CosmosDBApiType? apiType, IReadOnlyList restorableLocations) : base(id, name, resourceType, systemData) + internal RestorableCosmosDBAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, string accountName, DateTimeOffset? createdOn, DateTimeOffset? deletedOn, DateTimeOffset? oldestRestorableOn, CosmosDBApiType? apiType, IReadOnlyList restorableLocations) : base(id, name, resourceType, systemData) { Location = location; AccountName = accountName; CreatedOn = createdOn; - OldestRestorableOn = oldestRestorableOn; DeletedOn = deletedOn; + OldestRestorableOn = oldestRestorableOn; ApiType = apiType; RestorableLocations = restorableLocations; } @@ -54,10 +54,10 @@ internal RestorableCosmosDBAccountData(ResourceIdentifier id, string name, Resou public string AccountName { get; } /// The creation time of the restorable database account (ISO-8601 format). public DateTimeOffset? CreatedOn { get; } - /// The least recent time at which the database account can be restored to (ISO-8601 format). - public DateTimeOffset? OldestRestorableOn { get; } /// The time at which the restorable database account has been deleted (ISO-8601 format). public DateTimeOffset? DeletedOn { get; } + /// The least recent time at which the database account can be restored to (ISO-8601 format). + public DateTimeOffset? OldestRestorableOn { get; } /// The API type of the restorable database account. public CosmosDBApiType? ApiType { get; } /// List of regions where the of the database account can be restored from. diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.cs index e68aac488cdd..478a2d311d0d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.cs @@ -32,16 +32,12 @@ public ThroughputSettingData(AzureLocation location) : base(location) /// The tags. /// The location. /// - /// Identity for the resource. - internal ThroughputSettingData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedThroughputSettingsResourceInfo resource, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal ThroughputSettingData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedThroughputSettingsResourceInfo resource) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; - Identity = identity; } /// Gets or sets the resource. public ExtendedThroughputSettingsResourceInfo Resource { get; set; } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md index c9c63b4187db..f0ba80ac04f1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md @@ -9,7 +9,7 @@ azure-arm: true csharp: true library-name: CosmosDB namespace: Azure.ResourceManager.CosmosDB -require: https://github.com/Azure/azure-rest-api-specs/blob/44e83346defd3d4ca99efade8b1ee90c67d9f249/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 skip-csproj: true