Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDK to CosmosDB RP API Version 2024-09-01-preview #26110

Open
wants to merge 8 commits into
base: Az.CosmosDB-preview
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ private void Initialize()
this.RestorableTableResources = new RestorableTableResourcesOperations(this);
this.Service = new ServiceOperations(this);
this.BaseUri = new System.Uri("https://management.azure.com");
this.ApiVersion = "2024-02-15-preview";
this.ApiVersion = "2024-09-01-preview";
this.AcceptLanguage = "en-US";
this.LongRunningOperationRetryTimeout = 30;
this.GenerateClientRequestId = true;
Expand Down Expand Up @@ -527,6 +527,8 @@ private void Initialize()
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter<DataTransferDataSourceSink>("component"));
SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter<ServiceResourceProperties>("serviceType"));
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter<ServiceResourceProperties>("serviceType"));
SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter<ServiceResourceCreateUpdateProperties>("serviceType"));
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter<ServiceResourceCreateUpdateProperties>("serviceType"));
SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter<BaseCosmosDataTransferDataSourceSink>("component"));
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter<BaseCosmosDataTransferDataSourceSink>("component"));
CustomInitialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public ApiProperties()
/// Initializes a new instance of the ApiProperties class.
/// </summary>

/// <param name="serverVersion">Describes the ServerVersion of an a MongoDB account.
/// Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;</param>
/// <param name="serverVersion">Describes the version of the MongoDB account.
/// Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;, &#39;5.0&#39;, &#39;6.0&#39;, &#39;7.0&#39;</param>
public ApiProperties(string serverVersion = default(string))

{
Expand All @@ -37,7 +37,7 @@ public ApiProperties()


/// <summary>
/// Gets or sets describes the ServerVersion of an a MongoDB account. Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;
/// Gets or sets describes the version of the MongoDB account. Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;, &#39;5.0&#39;, &#39;6.0&#39;, &#39;7.0&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "serverVersion")]
public string ServerVersion {get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.Management.CosmosDB.Models
{

/// <summary>
/// Defines values for CapacityMode.
/// </summary>


public static class CapacityMode
{
public const string None = "None";
public const string Provisioned = "Provisioned";
public const string Serverless = "Serverless";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.Management.CosmosDB.Models
{
using System.Linq;

/// <summary>
/// The transition state information related capacity mode change with update
/// request.
/// </summary>
public partial class CapacityModeChangeTransitionState
{
/// <summary>
/// Initializes a new instance of the CapacityModeChangeTransitionState class.
/// </summary>
public CapacityModeChangeTransitionState()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the CapacityModeChangeTransitionState class.
/// </summary>

/// <param name="capacityModeTransitionStatus">The transition status of capacity mode.
/// Possible values include: &#39;Invalid&#39;, &#39;Initialized&#39;, &#39;InProgress&#39;,
/// &#39;Completed&#39;, &#39;Failed&#39;</param>

/// <param name="currentCapacityMode">Indicates the current capacity mode of the account.
/// Possible values include: &#39;None&#39;, &#39;Provisioned&#39;, &#39;Serverless&#39;</param>

/// <param name="previousCapacityMode">Indicates the previous capacity mode of the account before successful
/// transition.
/// Possible values include: &#39;None&#39;, &#39;Provisioned&#39;, &#39;Serverless&#39;</param>

/// <param name="capacityModeTransitionBeginTimestamp">Begin time in UTC of the capacity mode change.
/// </param>

/// <param name="capacityModeTransitionEndTimestamp">End time in UTC of the capacity mode change.
/// </param>

/// <param name="capacityModeLastSuccessfulTransitionEndTimestamp">End time in UTC of the last successful capacity mode change.
/// </param>
public CapacityModeChangeTransitionState(string capacityModeTransitionStatus = default(string), string currentCapacityMode = default(string), string previousCapacityMode = default(string), System.DateTime? capacityModeTransitionBeginTimestamp = default(System.DateTime?), System.DateTime? capacityModeTransitionEndTimestamp = default(System.DateTime?), System.DateTime? capacityModeLastSuccessfulTransitionEndTimestamp = default(System.DateTime?))

{
this.CapacityModeTransitionStatus = capacityModeTransitionStatus;
this.CurrentCapacityMode = currentCapacityMode;
this.PreviousCapacityMode = previousCapacityMode;
this.CapacityModeTransitionBeginTimestamp = capacityModeTransitionBeginTimestamp;
this.CapacityModeTransitionEndTimestamp = capacityModeTransitionEndTimestamp;
this.CapacityModeLastSuccessfulTransitionEndTimestamp = capacityModeLastSuccessfulTransitionEndTimestamp;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();


/// <summary>
/// Gets or sets the transition status of capacity mode. Possible values include: &#39;Invalid&#39;, &#39;Initialized&#39;, &#39;InProgress&#39;, &#39;Completed&#39;, &#39;Failed&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "capacityModeTransitionStatus")]
public string CapacityModeTransitionStatus {get; set; }

/// <summary>
/// Gets or sets indicates the current capacity mode of the account. Possible values include: &#39;None&#39;, &#39;Provisioned&#39;, &#39;Serverless&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "currentCapacityMode")]
public string CurrentCapacityMode {get; set; }

/// <summary>
/// Gets or sets indicates the previous capacity mode of the account before
/// successful transition. Possible values include: &#39;None&#39;, &#39;Provisioned&#39;, &#39;Serverless&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "previousCapacityMode")]
public string PreviousCapacityMode {get; set; }

/// <summary>
/// Gets begin time in UTC of the capacity mode change.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "capacityModeTransitionBeginTimestamp")]
public System.DateTime? CapacityModeTransitionBeginTimestamp {get; private set; }

/// <summary>
/// Gets end time in UTC of the capacity mode change.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "capacityModeTransitionEndTimestamp")]
public System.DateTime? CapacityModeTransitionEndTimestamp {get; private set; }

/// <summary>
/// Gets end time in UTC of the last successful capacity mode change.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "capacityModeLastSuccessfulTransitionEndTimestamp")]
public System.DateTime? CapacityModeLastSuccessfulTransitionEndTimestamp {get; private set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.Management.CosmosDB.Models
{

/// <summary>
/// Defines values for CapacityModeTransitionStatus.
/// </summary>


public static class CapacityModeTransitionStatus
{
public const string Invalid = "Invalid";
public const string Initialized = "Initialized";
public const string InProgress = "InProgress";
public const string Completed = "Completed";
public const string Failed = "Failed";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.Management.CosmosDB.Models
{
using System.Linq;

/// <summary>
/// A CosmosDB Mongo vCore API data source/sink
/// </summary>
[Newtonsoft.Json.JsonObject("CosmosDBMongoVCore")]
public partial class CosmosMongoVCoreDataTransferDataSourceSink : DataTransferDataSourceSink
{
/// <summary>
/// Initializes a new instance of the CosmosMongoVCoreDataTransferDataSourceSink class.
/// </summary>
public CosmosMongoVCoreDataTransferDataSourceSink()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the CosmosMongoVCoreDataTransferDataSourceSink class.
/// </summary>

/// <param name="databaseName">
/// </param>

/// <param name="collectionName">
/// </param>

/// <param name="hostName">
/// </param>

/// <param name="connectionStringKeyVaultUri">
/// </param>
public CosmosMongoVCoreDataTransferDataSourceSink(string databaseName, string collectionName, string hostName = default(string), string connectionStringKeyVaultUri = default(string))

{
this.DatabaseName = databaseName;
this.CollectionName = collectionName;
this.HostName = hostName;
this.ConnectionStringKeyVaultUri = connectionStringKeyVaultUri;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();


/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "databaseName")]
public string DatabaseName {get; set; }

/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "collectionName")]
public string CollectionName {get; set; }

/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "hostName")]
public string HostName {get; set; }

/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "connectionStringKeyVaultUri")]
public string ConnectionStringKeyVaultUri {get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (this.DatabaseName == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DatabaseName");
}
if (this.CollectionName == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "CollectionName");
}




}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public static class DataTransferComponent
{
public const string CosmosDBCassandra = "CosmosDBCassandra";
public const string CosmosDBMongo = "CosmosDBMongo";
public const string CosmosDBMongoVCore = "CosmosDBMongoVCore";
public const string CosmosDBSql = "CosmosDBSql";
public const string AzureBlobStorage = "AzureBlobStorage";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.Management.CosmosDB.Models
{
using System.Linq;

/// <summary>
/// Properties for Create or Update request for DataTransferServiceResource
/// </summary>
[Newtonsoft.Json.JsonObject("DataTransfer")]
public partial class DataTransferServiceResourceCreateUpdateProperties : ServiceResourceCreateUpdateProperties
{
/// <summary>
/// Initializes a new instance of the DataTransferServiceResourceCreateUpdateProperties class.
/// </summary>
public DataTransferServiceResourceCreateUpdateProperties()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the DataTransferServiceResourceCreateUpdateProperties class.
/// </summary>

/// <param name="instanceSize">Instance type for the service.
/// Possible values include: &#39;Cosmos.D4s&#39;, &#39;Cosmos.D8s&#39;, &#39;Cosmos.D16s&#39;</param>

/// <param name="instanceCount">Instance count for the service.
/// </param>
public DataTransferServiceResourceCreateUpdateProperties(string instanceSize = default(string), int? instanceCount = default(int?))

: base(instanceSize, instanceCount)
{
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public override void Validate()
{
base.Validate();
}
}
}
Loading
Loading