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

Reservations RP 2018-06-01: Add new cosmosDb in the reservedResourceT… #4701

Closed
wants to merge 7 commits into from
Closed
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 @@ -54,19 +54,20 @@ public partial class AzureReservationAPIClient : ServiceClient<AzureReservationA
public string ApiVersion { get; private set; }

/// <summary>
/// Gets or sets the preferred language for the response.
/// The preferred language for the response.
/// </summary>
public string AcceptLanguage { get; set; }

/// <summary>
/// Gets or sets the retry timeout in seconds for Long Running Operations.
/// Default value is 30.
/// The retry timeout in seconds for Long Running Operations. Default value is
/// 30.
/// </summary>
public int? LongRunningOperationRetryTimeout { get; set; }

/// <summary>
/// When set to true a unique x-ms-client-request-id value is generated and
/// included in each request. Default is true.
/// Whether a unique x-ms-client-request-id should be generated. When set to
/// true a unique x-ms-client-request-id value is generated and included in
/// each request. Default is true.
/// </summary>
public bool? GenerateClientRequestId { get; set; }

Expand All @@ -85,6 +86,19 @@ public partial class AzureReservationAPIClient : ServiceClient<AzureReservationA
/// </summary>
public virtual IOperationOperations Operation { get; private set; }

/// <summary>
/// Initializes a new instance of the AzureReservationAPIClient class.
/// </summary>
/// <param name='httpClient'>
/// HttpClient to be used
/// </param>
/// <param name='disposeHttpClient'>
/// True: will dispose the provided httpClient on calling AzureReservationAPIClient.Dispose(). False: will not dispose provided httpClient</param>
protected AzureReservationAPIClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
{
Initialize();
}

/// <summary>
/// Initializes a new instance of the AzureReservationAPIClient class.
/// </summary>
Expand Down Expand Up @@ -180,6 +194,33 @@ public AzureReservationAPIClient(ServiceClientCredentials credentials, params De
}
}

/// <summary>
/// Initializes a new instance of the AzureReservationAPIClient class.
/// </summary>
/// <param name='credentials'>
/// Required. Credentials needed for the client to connect to Azure.
/// </param>
/// <param name='httpClient'>
/// HttpClient to be used
/// </param>
/// <param name='disposeHttpClient'>
/// True: will dispose the provided httpClient on calling AzureReservationAPIClient.Dispose(). False: will not dispose provided httpClient</param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public AzureReservationAPIClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
{
if (credentials == null)
{
throw new System.ArgumentNullException("credentials");
}
Credentials = credentials;
if (Credentials != null)
{
Credentials.InitializeServiceClient(this);
}
}

/// <summary>
/// Initializes a new instance of the AzureReservationAPIClient class.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,20 @@ public partial interface IAzureReservationAPIClient : System.IDisposable
string ApiVersion { get; }

/// <summary>
/// Gets or sets the preferred language for the response.
/// The preferred language for the response.
/// </summary>
string AcceptLanguage { get; set; }

/// <summary>
/// Gets or sets the retry timeout in seconds for Long Running
/// Operations. Default value is 30.
/// The retry timeout in seconds for Long Running Operations. Default
/// value is 30.
/// </summary>
int? LongRunningOperationRetryTimeout { get; set; }

/// <summary>
/// When set to true a unique x-ms-client-request-id value is generated
/// and included in each request. Default is true.
/// Whether a unique x-ms-client-request-id should be generated. When
/// set to true a unique x-ms-client-request-id value is generated and
/// included in each request. Default is true.
/// </summary>
bool? GenerateClientRequestId { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public partial interface IReservationOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed to Split a reservation item
Expand Down Expand Up @@ -63,7 +62,6 @@ public partial interface IReservationOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed for commercial request for a reservation
Expand Down Expand Up @@ -92,7 +90,6 @@ public partial interface IReservationOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand Down Expand Up @@ -121,7 +118,6 @@ public partial interface IReservationOperations
/// </param>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand All @@ -147,7 +143,6 @@ public partial interface IReservationOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='reservationId'>
/// Id of the Reservation Item
Expand Down Expand Up @@ -183,7 +178,6 @@ public partial interface IReservationOperations
/// </param>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand Down Expand Up @@ -211,7 +205,6 @@ public partial interface IReservationOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed to Split a reservation item
Expand Down Expand Up @@ -241,7 +234,6 @@ public partial interface IReservationOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed for commercial request for a reservation
Expand Down Expand Up @@ -270,7 +262,6 @@ public partial interface IReservationOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='reservationId'>
/// Id of the Reservation Item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public partial interface IReservationOrderOperations
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ public Patch()
/// 'Shared'</param>
/// <param name="instanceFlexibility">Possible values include: 'On',
/// 'Off', 'NotSupported'</param>
public Patch(string appliedScopeType = default(string), IList<string> appliedScopes = default(IList<string>), string instanceFlexibility = default(string))
/// <param name="name">Name of the Reservation</param>
public Patch(string appliedScopeType = default(string), IList<string> appliedScopes = default(IList<string>), string instanceFlexibility = default(string), string name = default(string))
{
AppliedScopeType = appliedScopeType;
AppliedScopes = appliedScopes;
InstanceFlexibility = instanceFlexibility;
Name = name;
CustomInit();
}

Expand All @@ -65,5 +67,11 @@ public Patch()
[JsonProperty(PropertyName = "properties.instanceFlexibility")]
public string InstanceFlexibility { get; set; }

/// <summary>
/// Gets or sets name of the Reservation
/// </summary>
[JsonProperty(PropertyName = "properties.name")]
public string Name { get; set; }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look like additive changes.
Please update package version, assembly version and package realease notes in the csproj and AssemblyInfo.cs file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Currently, it is 1.1.0-preview. Should it be updated to 1.2.0-preview?
AssemblyInfo.cs should be 1.0.2.0 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also saw the AssemblyFileVersion currenlty as 1.8.0.0. Should I update that too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.8.0-preview is the last published version.
Please update package version to 1.9.0-preview and AssemblyFileVersion in AssemblyInfo.cs to 1.9.0.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ReservationProperties()
/// Initializes a new instance of the ReservationProperties class.
/// </summary>
/// <param name="reservedResourceType">Possible values include:
/// 'VirtualMachines', 'SqlDatabases', 'SuseLinux'</param>
/// 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb'</param>
/// <param name="instanceFlexibility">Possible values include: 'On',
/// 'Off', 'NotSupported'</param>
/// <param name="displayName">Friendly name for user to easily identify
Expand Down Expand Up @@ -76,7 +76,7 @@ public ReservationProperties()

/// <summary>
/// Gets or sets possible values include: 'VirtualMachines',
/// 'SqlDatabases', 'SuseLinux'
/// 'SqlDatabases', 'SuseLinux', 'CosmosDb'
/// </summary>
[JsonProperty(PropertyName = "reservedResourceType")]
public string ReservedResourceType { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ public static class ReservedResourceType
public const string VirtualMachines = "VirtualMachines";
public const string SqlDatabases = "SqlDatabases";
public const string SuseLinux = "SuseLinux";
public const string CosmosDb = "CosmosDb";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed to Split a reservation item
Expand All @@ -87,7 +86,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed for commercial request for a reservation
Expand All @@ -113,7 +111,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -297,7 +294,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </param>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -484,7 +480,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='reservationId'>
/// Id of the Reservation Item
Expand Down Expand Up @@ -517,7 +512,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </param>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -706,7 +700,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed to Split a reservation item
Expand Down Expand Up @@ -902,7 +895,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='body'>
/// Information needed for commercial request for a reservation
Expand Down Expand Up @@ -1097,7 +1089,6 @@ internal ReservationOperations(AzureReservationAPIClient client)
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
///
/// </param>
/// <param name='reservationId'>
/// Id of the Reservation Item
Expand Down
Loading