Skip to content

Commit

Permalink
Task 5207653: RI renewal: Dot net sdk changes. (#7386)
Browse files Browse the repository at this point in the history
* Task 5207653: RI renewal: Dot net sdk changes.

* FW: Renewal changes

* FW: Renewal changes for dot net SDK.

* FW: Changes for the provided comments

* FW: Fixed autorest to be compatible with node LTS

* Task 5207653: RI renewal: Dot net sdk changes.
  • Loading branch information
gautam714 authored and isra-fel committed Aug 29, 2019
1 parent 9c9b09e commit 6d2f70c
Show file tree
Hide file tree
Showing 44 changed files with 2,934 additions and 540 deletions.
14 changes: 14 additions & 0 deletions eng/mgmt/mgmtmetadata/reservations_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installing AutoRest version: latest
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/reservations/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\rd\azure-sdk-for-net\sdk
2019-08-29 18:21:06 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 543e24fb91a603ac8395d767824ad6deddd1d20a
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ public partial class AzureReservationAPIClient : ServiceClient<AzureReservationA
public bool? GenerateClientRequestId { get; set; }

/// <summary>
/// Gets the IReservationOrderOperations.
/// Gets the IReservationOperations.
/// </summary>
public virtual IReservationOrderOperations ReservationOrder { get; private set; }
public virtual IReservationOperations Reservation { get; private set; }

/// <summary>
/// Gets the IReservationOperations.
/// Gets the IReservationOrderOperations.
/// </summary>
public virtual IReservationOperations Reservation { get; private set; }
public virtual IReservationOrderOperations ReservationOrder { get; private set; }

/// <summary>
/// Gets the IOperationOperations.
Expand Down Expand Up @@ -327,8 +327,8 @@ public AzureReservationAPIClient(System.Uri baseUri, ServiceClientCredentials cr
/// </summary>
private void Initialize()
{
ReservationOrder = new ReservationOrderOperations(this);
Reservation = new ReservationOperations(this);
ReservationOrder = new ReservationOrderOperations(this);
Operation = new OperationOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2019-04-01";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public partial interface IAzureReservationAPIClient : System.IDisposable


/// <summary>
/// Gets the IReservationOrderOperations.
/// Gets the IReservationOperations.
/// </summary>
IReservationOrderOperations ReservationOrder { get; }
IReservationOperations Reservation { get; }

/// <summary>
/// Gets the IReservationOperations.
/// Gets the IReservationOrderOperations.
/// </summary>
IReservationOperations Reservation { get; }
IReservationOrderOperations ReservationOrder { get; }

/// <summary>
/// Gets the IOperationOperations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,37 @@ namespace Microsoft.Azure.Management.Reservations
/// </summary>
public partial interface IReservationOperations
{
/// <summary>
/// Get Available Scopes for `Reservation`.
/// </summary>
/// <remarks>
/// Get Available Scopes for `Reservation`.
///
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
/// </param>
/// <param name='reservationId'>
/// Id of the Reservation Item
/// </param>
/// <param name='body'>
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<Properties>> AvailableScopesWithHttpMessagesAsync(string reservationOrderId, string reservationId, IList<string> body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Split the `Reservation`.
/// </summary>
Expand Down Expand Up @@ -118,6 +149,9 @@ public partial interface IReservationOperations
/// <param name='reservationOrderId'>
/// Order Id of the reservation
/// </param>
/// <param name='expand'>
/// Supported value of this query is renewProperties
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
Expand All @@ -133,7 +167,7 @@ public partial interface IReservationOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ReservationResponse>> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ReservationResponse>> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Updates a `Reservation`.
/// </summary>
Expand Down Expand Up @@ -194,6 +228,37 @@ public partial interface IReservationOperations
/// </exception>
Task<AzureOperationResponse<IPage<ReservationResponse>>> ListRevisionsWithHttpMessagesAsync(string reservationId, string reservationOrderId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get Available Scopes for `Reservation`.
/// </summary>
/// <remarks>
/// Get Available Scopes for `Reservation`.
///
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
/// </param>
/// <param name='reservationId'>
/// Id of the Reservation Item
/// </param>
/// <param name='body'>
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<Properties>> BeginAvailableScopesWithHttpMessagesAsync(string reservationOrderId, string reservationId, IList<string> body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Split the `Reservation`.
/// </summary>
/// <remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ public Patch()
/// <param name="instanceFlexibility">Possible values include: 'On',
/// 'Off'</param>
/// <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))
public Patch(string appliedScopeType = default(string), IList<string> appliedScopes = default(IList<string>), string instanceFlexibility = default(string), string name = default(string), bool? renew = default(bool?), PatchPropertiesRenewProperties renewProperties = default(PatchPropertiesRenewProperties))
{
AppliedScopeType = appliedScopeType;
AppliedScopes = appliedScopes;
InstanceFlexibility = instanceFlexibility;
Name = name;
Renew = renew;
RenewProperties = renewProperties;
CustomInit();
}

Expand Down Expand Up @@ -73,5 +75,15 @@ public Patch()
[JsonProperty(PropertyName = "properties.name")]
public string Name { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "properties.renew")]
public bool? Renew { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "properties.renewProperties")]
public PatchPropertiesRenewProperties RenewProperties { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Reservations.Models
{
using Newtonsoft.Json;
using System.Linq;

public partial class PatchPropertiesRenewProperties
{
/// <summary>
/// Initializes a new instance of the PatchPropertiesRenewProperties
/// class.
/// </summary>
public PatchPropertiesRenewProperties()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the PatchPropertiesRenewProperties
/// class.
/// </summary>
public PatchPropertiesRenewProperties(PurchaseRequest purchaseProperties = default(PurchaseRequest))
{
PurchaseProperties = purchaseProperties;
CustomInit();
}

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

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "purchaseProperties")]
public PurchaseRequest PurchaseProperties { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Reservations.Models
{
using Newtonsoft.Json;
using System.Linq;

public partial class Properties
{
/// <summary>
/// Initializes a new instance of the Properties class.
/// </summary>
public Properties()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the Properties class.
/// </summary>
public Properties(SubscriptionScopeProperties propertiesProperty = default(SubscriptionScopeProperties))
{
PropertiesProperty = propertiesProperty;
CustomInit();
}

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

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "properties")]
public SubscriptionScopeProperties PropertiesProperty { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ public PurchaseRequest()
/// <param name="location">The Azure Region where the reserved resource
/// lives.</param>
/// <param name="reservedResourceType">Possible values include:
/// 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb'</param>
/// 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb',
/// 'RedHat', 'SqlDataWarehouse', 'VMwareCloudSimple',
/// 'RedHatOsa'</param>
/// <param name="term">Possible values include: 'P1Y', 'P3Y'</param>
/// <param name="displayName">Friendly name of the Reservation</param>
/// <param name="appliedScopeType">Possible values include: 'Single',
/// 'Shared'</param>
/// <param name="reservedResourceProperties">Properties specific to
/// each reserved resource type. Not required if not
/// applicable.</param>
public PurchaseRequest(SkuName sku = default(SkuName), string location = default(string), string reservedResourceType = default(string), string billingScopeId = default(string), string term = default(string), int? quantity = default(int?), string displayName = default(string), string appliedScopeType = default(string), IList<string> appliedScopes = default(IList<string>), PurchaseRequestPropertiesReservedResourceProperties reservedResourceProperties = default(PurchaseRequestPropertiesReservedResourceProperties))
public PurchaseRequest(SkuName sku = default(SkuName), string location = default(string), string reservedResourceType = default(string), string billingScopeId = default(string), string term = default(string), int? quantity = default(int?), string displayName = default(string), string appliedScopeType = default(string), IList<string> appliedScopes = default(IList<string>), bool? renew = default(bool?), PurchaseRequestPropertiesReservedResourceProperties reservedResourceProperties = default(PurchaseRequestPropertiesReservedResourceProperties))
{
Sku = sku;
Location = location;
Expand All @@ -53,6 +55,7 @@ public PurchaseRequest()
DisplayName = displayName;
AppliedScopeType = appliedScopeType;
AppliedScopes = appliedScopes;
Renew = renew;
ReservedResourceProperties = reservedResourceProperties;
CustomInit();
}
Expand All @@ -75,7 +78,8 @@ public PurchaseRequest()

/// <summary>
/// Gets or sets possible values include: 'VirtualMachines',
/// 'SqlDatabases', 'SuseLinux', 'CosmosDb'
/// 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat',
/// 'SqlDataWarehouse', 'VMwareCloudSimple', 'RedHatOsa'
/// </summary>
[JsonProperty(PropertyName = "properties.reservedResourceType")]
public string ReservedResourceType { get; set; }
Expand Down Expand Up @@ -113,6 +117,11 @@ public PurchaseRequest()
[JsonProperty(PropertyName = "properties.appliedScopes")]
public IList<string> AppliedScopes { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "properties.renew")]
public bool? Renew { get; set; }

/// <summary>
/// Gets or sets properties specific to each reserved resource type.
/// Not required if not applicable.
Expand Down
Loading

0 comments on commit 6d2f70c

Please sign in to comment.