diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/IReservationOperations.cs b/src/SDKs/Reservations/Management.Reservations/Generated/IReservationOperations.cs
index 07966d444332..abc19f97c228 100644
--- a/src/SDKs/Reservations/Management.Reservations/Generated/IReservationOperations.cs
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/IReservationOperations.cs
@@ -118,6 +118,9 @@ public partial interface IReservationOperations
///
/// Order Id of the reservation
///
+ ///
+ /// Supported value of this query is renewProperties
+ ///
///
/// The headers that will be added to request.
///
@@ -133,7 +136,7 @@ public partial interface IReservationOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, string append = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Updates a `Reservation`.
///
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/Models/Patch.cs b/src/SDKs/Reservations/Management.Reservations/Generated/Models/Patch.cs
index 03e58a9113ac..8f7e3166a543 100644
--- a/src/SDKs/Reservations/Management.Reservations/Generated/Models/Patch.cs
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/Models/Patch.cs
@@ -36,10 +36,12 @@ public Patch()
/// Possible values include: 'On',
/// 'Off'
/// Name of the Reservation
- public Patch(string appliedScopeType = default(string), IList appliedScopes = default(IList), string instanceFlexibility = default(string), string name = default(string))
+ public Patch(string appliedScopeType = default(string), IList appliedScopes = default(IList), bool? renew = default(bool?), PurchaseRequest renewProperties = default(PurchaseRequest), string instanceFlexibility = default(string), string name = default(string))
{
AppliedScopeType = appliedScopeType;
AppliedScopes = appliedScopes;
+ Renew = renew;
+ RenewProperties = renewProperties;
InstanceFlexibility = instanceFlexibility;
Name = name;
CustomInit();
@@ -61,6 +63,16 @@ public Patch()
[JsonProperty(PropertyName = "properties.appliedScopes")]
public IList AppliedScopes { get; set; }
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties.renew")]
+ public bool? Renew { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties.renewProperties")]
+ public PurchaseRequest RenewProperties { get; set; }
+
///
/// Gets or sets possible values include: 'On', 'Off'
///
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/Models/PurchaseRequest.cs b/src/SDKs/Reservations/Management.Reservations/Generated/Models/PurchaseRequest.cs
index ea8f3d3e65a6..09ab9459c6b7 100644
--- a/src/SDKs/Reservations/Management.Reservations/Generated/Models/PurchaseRequest.cs
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/Models/PurchaseRequest.cs
@@ -42,7 +42,7 @@ public PurchaseRequest()
/// Properties specific to
/// each reserved resource type. Not required if not
/// applicable.
- 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 appliedScopes = default(IList), 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 appliedScopes = default(IList), bool? renew = default(bool?), PurchaseRequestPropertiesReservedResourceProperties reservedResourceProperties = default(PurchaseRequestPropertiesReservedResourceProperties))
{
Sku = sku;
Location = location;
@@ -53,6 +53,7 @@ public PurchaseRequest()
DisplayName = displayName;
AppliedScopeType = appliedScopeType;
AppliedScopes = appliedScopes;
+ Renew = renew;
ReservedResourceProperties = reservedResourceProperties;
CustomInit();
}
@@ -113,6 +114,11 @@ public PurchaseRequest()
[JsonProperty(PropertyName = "properties.appliedScopes")]
public IList AppliedScopes { get; set; }
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties.renew")]
+ public bool? Renew { get; set; }
+
///
/// Gets or sets properties specific to each reserved resource type.
/// Not required if not applicable.
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponse.cs b/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponse.cs
new file mode 100644
index 000000000000..5d5e2d775436
--- /dev/null
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponse.cs
@@ -0,0 +1,68 @@
+//
+// 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.Reservations.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class RenewPropertiesResponse
+ {
+ ///
+ /// Initializes a new instance of the RenewPropertiesResponse class.
+ ///
+ public RenewPropertiesResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RenewPropertiesResponse class.
+ ///
+ /// Locked currency & amount for new
+ /// reservation purchase at the time of renewal. Price is locked 30
+ /// days before expiry date time if renew is true.
+ /// Contains prev and next reservation Ids' because
+ /// of renewal.
+ public RenewPropertiesResponse(PurchaseRequest purchaseProperties = default(PurchaseRequest), RenewPropertiesResponseLockedPriceTotal lockedPriceTotal = default(RenewPropertiesResponseLockedPriceTotal), RenewPropertiesResponseLinks links = default(RenewPropertiesResponseLinks))
+ {
+ PurchaseProperties = purchaseProperties;
+ LockedPriceTotal = lockedPriceTotal;
+ Links = links;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "purchaseProperties")]
+ public PurchaseRequest PurchaseProperties { get; set; }
+
+ ///
+ /// Gets or sets locked currency & amount for new reservation
+ /// purchase at the time of renewal. Price is locked 30 days before
+ /// expiry date time if renew is true.
+ ///
+ [JsonProperty(PropertyName = "lockedPriceTotal")]
+ public RenewPropertiesResponseLockedPriceTotal LockedPriceTotal { get; set; }
+
+ ///
+ /// Gets or sets contains prev and next reservation Ids' because of
+ /// renewal.
+ ///
+ [JsonProperty(PropertyName = "links")]
+ public RenewPropertiesResponseLinks Links { get; set; }
+
+ }
+}
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponseLinks.cs b/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponseLinks.cs
new file mode 100644
index 000000000000..36f714ce4087
--- /dev/null
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponseLinks.cs
@@ -0,0 +1,69 @@
+//
+// 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.Reservations.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Contains prev and next reservation Ids' because of renewal.
+ ///
+ public partial class RenewPropertiesResponseLinks
+ {
+ ///
+ /// Initializes a new instance of the RenewPropertiesResponseLinks
+ /// class.
+ ///
+ public RenewPropertiesResponseLinks()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RenewPropertiesResponseLinks
+ /// class.
+ ///
+ /// Reservation Id of the reservation from
+ /// which this reservation is renewed. Format of the resource Id is
+ /// /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
+ /// Reservation Id of the reservation
+ /// which is purchased because of renew. Format of the resource Id is
+ /// /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
+ public RenewPropertiesResponseLinks(string renewSource = default(string), string renewDestination = default(string))
+ {
+ RenewSource = renewSource;
+ RenewDestination = renewDestination;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets reservation Id of the reservation from which this
+ /// reservation is renewed. Format of the resource Id is
+ /// /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
+ ///
+ [JsonProperty(PropertyName = "renewSource")]
+ public string RenewSource { get; set; }
+
+ ///
+ /// Gets or sets reservation Id of the reservation which is purchased
+ /// because of renew. Format of the resource Id is
+ /// /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
+ ///
+ [JsonProperty(PropertyName = "renewDestination")]
+ public string RenewDestination { get; set; }
+
+ }
+}
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponseLockedPriceTotal.cs b/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponseLockedPriceTotal.cs
new file mode 100644
index 000000000000..8bbee53a0fd5
--- /dev/null
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/Models/RenewPropertiesResponseLockedPriceTotal.cs
@@ -0,0 +1,59 @@
+//
+// 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.Reservations.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Locked currency & amount for new reservation purchase at the time
+ /// of renewal. Price is locked 30 days before expiry date time if renew is
+ /// true.
+ ///
+ public partial class RenewPropertiesResponseLockedPriceTotal
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RenewPropertiesResponseLockedPriceTotal class.
+ ///
+ public RenewPropertiesResponseLockedPriceTotal()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RenewPropertiesResponseLockedPriceTotal class.
+ ///
+ public RenewPropertiesResponseLockedPriceTotal(string currencyCode = default(string), string amount = default(string))
+ {
+ CurrencyCode = currencyCode;
+ Amount = amount;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "currencyCode")]
+ public string CurrencyCode { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "amount")]
+ public string Amount { get; set; }
+
+ }
+}
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/Models/ReservationProperties.cs b/src/SDKs/Reservations/Management.Reservations/Generated/Models/ReservationProperties.cs
index f1e82e4bc6ef..8e5a012352d8 100644
--- a/src/SDKs/Reservations/Management.Reservations/Generated/Models/ReservationProperties.cs
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/Models/ReservationProperties.cs
@@ -48,7 +48,7 @@ public ReservationProperties()
/// expire.
/// Description of the SKU in
/// english.
- public ReservationProperties(string reservedResourceType = default(string), string instanceFlexibility = default(string), string displayName = default(string), IList appliedScopes = default(IList), string appliedScopeType = default(string), int? quantity = default(int?), string provisioningState = default(string), System.DateTime? effectiveDateTime = default(System.DateTime?), System.DateTime? lastUpdatedDateTime = default(System.DateTime?), System.DateTime? expiryDate = default(System.DateTime?), string skuDescription = default(string), ExtendedStatusInfo extendedStatusInfo = default(ExtendedStatusInfo), ReservationSplitProperties splitProperties = default(ReservationSplitProperties), ReservationMergeProperties mergeProperties = default(ReservationMergeProperties))
+ public ReservationProperties(string reservedResourceType = default(string), string instanceFlexibility = default(string), string displayName = default(string), IList appliedScopes = default(IList), string appliedScopeType = default(string), int? quantity = default(int?), string provisioningState = default(string), System.DateTime? effectiveDateTime = default(System.DateTime?), System.DateTime? lastUpdatedDateTime = default(System.DateTime?), System.DateTime? expiryDate = default(System.DateTime?), string skuDescription = default(string), ExtendedStatusInfo extendedStatusInfo = default(ExtendedStatusInfo), ReservationSplitProperties splitProperties = default(ReservationSplitProperties), ReservationMergeProperties mergeProperties = default(ReservationMergeProperties), bool? renew = default(bool?), RenewPropertiesResponse renewProperties = default(RenewPropertiesResponse))
{
ReservedResourceType = reservedResourceType;
InstanceFlexibility = instanceFlexibility;
@@ -64,6 +64,8 @@ public ReservationProperties()
ExtendedStatusInfo = extendedStatusInfo;
SplitProperties = splitProperties;
MergeProperties = mergeProperties;
+ Renew = renew;
+ RenewProperties = renewProperties;
CustomInit();
}
@@ -155,5 +157,15 @@ public ReservationProperties()
[JsonProperty(PropertyName = "mergeProperties")]
public ReservationMergeProperties MergeProperties { get; set; }
+ ///
+ ///
+ [JsonProperty(PropertyName = "renew")]
+ public bool? Renew { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "renewProperties")]
+ public RenewPropertiesResponse RenewProperties { get; set; }
+
}
}
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperations.cs b/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperations.cs
index 88489d2a9964..81e2acb66db8 100644
--- a/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperations.cs
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperations.cs
@@ -294,6 +294,9 @@ internal ReservationOperations(AzureReservationAPIClient client)
///
/// Order Id of the reservation
///
+ ///
+ /// Supported value of this query is renewProperties
+ ///
///
/// Headers that will be added to request.
///
@@ -315,7 +318,7 @@ internal ReservationOperations(AzureReservationAPIClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string reservationId, string reservationOrderId, string append = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (reservationId == null)
{
@@ -338,6 +341,7 @@ internal ReservationOperations(AzureReservationAPIClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("reservationId", reservationId);
tracingParameters.Add("reservationOrderId", reservationOrderId);
+ tracingParameters.Add("append", append);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -351,6 +355,10 @@ internal ReservationOperations(AzureReservationAPIClient client)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
+ if (append != null)
+ {
+ _queryParameters.Add(string.Format("append={0}", System.Uri.EscapeDataString(append)));
+ }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
diff --git a/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperationsExtensions.cs b/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperationsExtensions.cs
index f26c1c8a2b81..e9371d484316 100644
--- a/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperationsExtensions.cs
+++ b/src/SDKs/Reservations/Management.Reservations/Generated/ReservationOperationsExtensions.cs
@@ -174,9 +174,12 @@ public static IPage List(this IReservationOperations operat
///
/// Order Id of the reservation
///
- public static ReservationResponse Get(this IReservationOperations operations, string reservationId, string reservationOrderId)
+ ///
+ /// Supported value of this query is renewProperties
+ ///
+ public static ReservationResponse Get(this IReservationOperations operations, string reservationId, string reservationOrderId, string append = default(string))
{
- return operations.GetAsync(reservationId, reservationOrderId).GetAwaiter().GetResult();
+ return operations.GetAsync(reservationId, reservationOrderId, append).GetAwaiter().GetResult();
}
///
@@ -194,12 +197,15 @@ public static ReservationResponse Get(this IReservationOperations operations, st
///
/// Order Id of the reservation
///
+ ///
+ /// Supported value of this query is renewProperties
+ ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IReservationOperations operations, string reservationId, string reservationOrderId, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IReservationOperations operations, string reservationId, string reservationOrderId, string append = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(reservationId, reservationOrderId, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(reservationId, reservationOrderId, append, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}