Skip to content

Commit 6d2f70c

Browse files
gautam714isra-fel
authored andcommitted
Task 5207653: RI renewal: Dot net sdk changes. (#7386)
* 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.
1 parent 9c9b09e commit 6d2f70c

File tree

44 files changed

+2934
-540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2934
-540
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Installing AutoRest version: latest
2+
AutoRest installed successfully.
3+
Commencing code generation
4+
Generating CSharp code
5+
Executing AutoRest command
6+
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
7+
2019-08-29 18:21:06 UTC
8+
Azure-rest-api-specs repository information
9+
GitHub fork: Azure
10+
Branch: master
11+
Commit: 543e24fb91a603ac8395d767824ad6deddd1d20a
12+
AutoRest information
13+
Requested version: latest
14+
Bootstrapper version: [email protected]

sdk/reservations/Microsoft.Azure.Management.Reservations/src/Generated/AzureReservationAPIClient.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ public partial class AzureReservationAPIClient : ServiceClient<AzureReservationA
7272
public bool? GenerateClientRequestId { get; set; }
7373

7474
/// <summary>
75-
/// Gets the IReservationOrderOperations.
75+
/// Gets the IReservationOperations.
7676
/// </summary>
77-
public virtual IReservationOrderOperations ReservationOrder { get; private set; }
77+
public virtual IReservationOperations Reservation { get; private set; }
7878

7979
/// <summary>
80-
/// Gets the IReservationOperations.
80+
/// Gets the IReservationOrderOperations.
8181
/// </summary>
82-
public virtual IReservationOperations Reservation { get; private set; }
82+
public virtual IReservationOrderOperations ReservationOrder { get; private set; }
8383

8484
/// <summary>
8585
/// Gets the IOperationOperations.
@@ -327,8 +327,8 @@ public AzureReservationAPIClient(System.Uri baseUri, ServiceClientCredentials cr
327327
/// </summary>
328328
private void Initialize()
329329
{
330-
ReservationOrder = new ReservationOrderOperations(this);
331330
Reservation = new ReservationOperations(this);
331+
ReservationOrder = new ReservationOrderOperations(this);
332332
Operation = new OperationOperations(this);
333333
BaseUri = new System.Uri("https://management.azure.com");
334334
ApiVersion = "2019-04-01";

sdk/reservations/Microsoft.Azure.Management.Reservations/src/Generated/IAzureReservationAPIClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ public partial interface IAzureReservationAPIClient : System.IDisposable
6969

7070

7171
/// <summary>
72-
/// Gets the IReservationOrderOperations.
72+
/// Gets the IReservationOperations.
7373
/// </summary>
74-
IReservationOrderOperations ReservationOrder { get; }
74+
IReservationOperations Reservation { get; }
7575

7676
/// <summary>
77-
/// Gets the IReservationOperations.
77+
/// Gets the IReservationOrderOperations.
7878
/// </summary>
79-
IReservationOperations Reservation { get; }
79+
IReservationOrderOperations ReservationOrder { get; }
8080

8181
/// <summary>
8282
/// Gets the IOperationOperations.

sdk/reservations/Microsoft.Azure.Management.Reservations/src/Generated/IReservationOperations.cs

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,37 @@ namespace Microsoft.Azure.Management.Reservations
2323
/// </summary>
2424
public partial interface IReservationOperations
2525
{
26+
/// <summary>
27+
/// Get Available Scopes for `Reservation`.
28+
/// </summary>
29+
/// <remarks>
30+
/// Get Available Scopes for `Reservation`.
31+
///
32+
/// </remarks>
33+
/// <param name='reservationOrderId'>
34+
/// Order Id of the reservation
35+
/// </param>
36+
/// <param name='reservationId'>
37+
/// Id of the Reservation Item
38+
/// </param>
39+
/// <param name='body'>
40+
/// </param>
41+
/// <param name='customHeaders'>
42+
/// The headers that will be added to request.
43+
/// </param>
44+
/// <param name='cancellationToken'>
45+
/// The cancellation token.
46+
/// </param>
47+
/// <exception cref="ErrorException">
48+
/// Thrown when the operation returned an invalid status code
49+
/// </exception>
50+
/// <exception cref="Microsoft.Rest.SerializationException">
51+
/// Thrown when unable to deserialize the response
52+
/// </exception>
53+
/// <exception cref="Microsoft.Rest.ValidationException">
54+
/// Thrown when a required parameter is null
55+
/// </exception>
56+
Task<AzureOperationResponse<Properties>> AvailableScopesWithHttpMessagesAsync(string reservationOrderId, string reservationId, IList<string> body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
2657
/// <summary>
2758
/// Split the `Reservation`.
2859
/// </summary>
@@ -118,6 +149,9 @@ public partial interface IReservationOperations
118149
/// <param name='reservationOrderId'>
119150
/// Order Id of the reservation
120151
/// </param>
152+
/// <param name='expand'>
153+
/// Supported value of this query is renewProperties
154+
/// </param>
121155
/// <param name='customHeaders'>
122156
/// The headers that will be added to request.
123157
/// </param>
@@ -133,7 +167,7 @@ public partial interface IReservationOperations
133167
/// <exception cref="Microsoft.Rest.ValidationException">
134168
/// Thrown when a required parameter is null
135169
/// </exception>
136-
Task<AzureOperationResponse<ReservationResponse>> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
170+
Task<AzureOperationResponse<ReservationResponse>> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
137171
/// <summary>
138172
/// Updates a `Reservation`.
139173
/// </summary>
@@ -194,6 +228,37 @@ public partial interface IReservationOperations
194228
/// </exception>
195229
Task<AzureOperationResponse<IPage<ReservationResponse>>> ListRevisionsWithHttpMessagesAsync(string reservationId, string reservationOrderId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
196230
/// <summary>
231+
/// Get Available Scopes for `Reservation`.
232+
/// </summary>
233+
/// <remarks>
234+
/// Get Available Scopes for `Reservation`.
235+
///
236+
/// </remarks>
237+
/// <param name='reservationOrderId'>
238+
/// Order Id of the reservation
239+
/// </param>
240+
/// <param name='reservationId'>
241+
/// Id of the Reservation Item
242+
/// </param>
243+
/// <param name='body'>
244+
/// </param>
245+
/// <param name='customHeaders'>
246+
/// The headers that will be added to request.
247+
/// </param>
248+
/// <param name='cancellationToken'>
249+
/// The cancellation token.
250+
/// </param>
251+
/// <exception cref="ErrorException">
252+
/// Thrown when the operation returned an invalid status code
253+
/// </exception>
254+
/// <exception cref="Microsoft.Rest.SerializationException">
255+
/// Thrown when unable to deserialize the response
256+
/// </exception>
257+
/// <exception cref="Microsoft.Rest.ValidationException">
258+
/// Thrown when a required parameter is null
259+
/// </exception>
260+
Task<AzureOperationResponse<Properties>> BeginAvailableScopesWithHttpMessagesAsync(string reservationOrderId, string reservationId, IList<string> body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
261+
/// <summary>
197262
/// Split the `Reservation`.
198263
/// </summary>
199264
/// <remarks>

sdk/reservations/Microsoft.Azure.Management.Reservations/src/Generated/Models/Patch.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ public Patch()
3636
/// <param name="instanceFlexibility">Possible values include: 'On',
3737
/// 'Off'</param>
3838
/// <param name="name">Name of the Reservation</param>
39-
public Patch(string appliedScopeType = default(string), IList<string> appliedScopes = default(IList<string>), string instanceFlexibility = default(string), string name = default(string))
39+
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))
4040
{
4141
AppliedScopeType = appliedScopeType;
4242
AppliedScopes = appliedScopes;
4343
InstanceFlexibility = instanceFlexibility;
4444
Name = name;
45+
Renew = renew;
46+
RenewProperties = renewProperties;
4547
CustomInit();
4648
}
4749

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

78+
/// <summary>
79+
/// </summary>
80+
[JsonProperty(PropertyName = "properties.renew")]
81+
public bool? Renew { get; set; }
82+
83+
/// <summary>
84+
/// </summary>
85+
[JsonProperty(PropertyName = "properties.renewProperties")]
86+
public PatchPropertiesRenewProperties RenewProperties { get; set; }
87+
7688
}
7789
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.Management.Reservations.Models
12+
{
13+
using Newtonsoft.Json;
14+
using System.Linq;
15+
16+
public partial class PatchPropertiesRenewProperties
17+
{
18+
/// <summary>
19+
/// Initializes a new instance of the PatchPropertiesRenewProperties
20+
/// class.
21+
/// </summary>
22+
public PatchPropertiesRenewProperties()
23+
{
24+
CustomInit();
25+
}
26+
27+
/// <summary>
28+
/// Initializes a new instance of the PatchPropertiesRenewProperties
29+
/// class.
30+
/// </summary>
31+
public PatchPropertiesRenewProperties(PurchaseRequest purchaseProperties = default(PurchaseRequest))
32+
{
33+
PurchaseProperties = purchaseProperties;
34+
CustomInit();
35+
}
36+
37+
/// <summary>
38+
/// An initialization method that performs custom operations like setting defaults
39+
/// </summary>
40+
partial void CustomInit();
41+
42+
/// <summary>
43+
/// </summary>
44+
[JsonProperty(PropertyName = "purchaseProperties")]
45+
public PurchaseRequest PurchaseProperties { get; set; }
46+
47+
}
48+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.Management.Reservations.Models
12+
{
13+
using Newtonsoft.Json;
14+
using System.Linq;
15+
16+
public partial class Properties
17+
{
18+
/// <summary>
19+
/// Initializes a new instance of the Properties class.
20+
/// </summary>
21+
public Properties()
22+
{
23+
CustomInit();
24+
}
25+
26+
/// <summary>
27+
/// Initializes a new instance of the Properties class.
28+
/// </summary>
29+
public Properties(SubscriptionScopeProperties propertiesProperty = default(SubscriptionScopeProperties))
30+
{
31+
PropertiesProperty = propertiesProperty;
32+
CustomInit();
33+
}
34+
35+
/// <summary>
36+
/// An initialization method that performs custom operations like setting defaults
37+
/// </summary>
38+
partial void CustomInit();
39+
40+
/// <summary>
41+
/// </summary>
42+
[JsonProperty(PropertyName = "properties")]
43+
public SubscriptionScopeProperties PropertiesProperty { get; set; }
44+
45+
}
46+
}

sdk/reservations/Microsoft.Azure.Management.Reservations/src/Generated/Models/PurchaseRequest.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@ public PurchaseRequest()
3434
/// <param name="location">The Azure Region where the reserved resource
3535
/// lives.</param>
3636
/// <param name="reservedResourceType">Possible values include:
37-
/// 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb'</param>
37+
/// 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb',
38+
/// 'RedHat', 'SqlDataWarehouse', 'VMwareCloudSimple',
39+
/// 'RedHatOsa'</param>
3840
/// <param name="term">Possible values include: 'P1Y', 'P3Y'</param>
3941
/// <param name="displayName">Friendly name of the Reservation</param>
4042
/// <param name="appliedScopeType">Possible values include: 'Single',
4143
/// 'Shared'</param>
4244
/// <param name="reservedResourceProperties">Properties specific to
4345
/// each reserved resource type. Not required if not
4446
/// applicable.</param>
45-
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))
47+
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))
4648
{
4749
Sku = sku;
4850
Location = location;
@@ -53,6 +55,7 @@ public PurchaseRequest()
5355
DisplayName = displayName;
5456
AppliedScopeType = appliedScopeType;
5557
AppliedScopes = appliedScopes;
58+
Renew = renew;
5659
ReservedResourceProperties = reservedResourceProperties;
5760
CustomInit();
5861
}
@@ -75,7 +78,8 @@ public PurchaseRequest()
7578

7679
/// <summary>
7780
/// Gets or sets possible values include: 'VirtualMachines',
78-
/// 'SqlDatabases', 'SuseLinux', 'CosmosDb'
81+
/// 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat',
82+
/// 'SqlDataWarehouse', 'VMwareCloudSimple', 'RedHatOsa'
7983
/// </summary>
8084
[JsonProperty(PropertyName = "properties.reservedResourceType")]
8185
public string ReservedResourceType { get; set; }
@@ -113,6 +117,11 @@ public PurchaseRequest()
113117
[JsonProperty(PropertyName = "properties.appliedScopes")]
114118
public IList<string> AppliedScopes { get; set; }
115119

120+
/// <summary>
121+
/// </summary>
122+
[JsonProperty(PropertyName = "properties.renew")]
123+
public bool? Renew { get; set; }
124+
116125
/// <summary>
117126
/// Gets or sets properties specific to each reserved resource type.
118127
/// Not required if not applicable.

0 commit comments

Comments
 (0)