Skip to content

Commit

Permalink
AutoPr-Reservations-corquiri-REST Spec PrNumber 5403 (#5477)
Browse files Browse the repository at this point in the history
* .NET SDK Resource Provider:'Reservations'
REST Spec PR 'Azure/azure-rest-api-specs#5403'
REST Spec PR Author 'corquiri'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Reservations'
REST Spec PR 'Azure/azure-rest-api-specs#5403'
REST Spec PR Author 'corquiri'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Reservations'
REST Spec PR 'Azure/azure-rest-api-specs#5403'
REST Spec PR Author 'corquiri'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Reservations'
REST Spec PR 'Azure/azure-rest-api-specs#5403'
REST Spec PR Author 'corquiri'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Reservations'
REST Spec PR 'Azure/azure-rest-api-specs#5403'
REST Spec PR Author 'corquiri'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Reservations'
REST Spec PR 'Azure/azure-rest-api-specs#5403'
REST Spec PR Author 'corquiri'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Reservations'
REST Spec PR 'Azure/azure-rest-api-specs#5403'
REST Spec PR Author 'corquiri'
REST Spec PR Last commit
  • Loading branch information
adxsdknet authored and dsgouda committed Apr 15, 2019
1 parent 672a68c commit eedbc9c
Show file tree
Hide file tree
Showing 17 changed files with 1,110 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/SDKs/Reservations/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>Capacity_2018-06-01;</AzureApiTag>
<AzureApiTag>Capacity_2019-04-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public partial class AzureReservationAPIClient : ServiceClient<AzureReservationA
public ServiceClientCredentials Credentials { get; private set; }

/// <summary>
/// Supported version.
/// Supported version for this document is 2019-04-01
/// </summary>
public string ApiVersion { get; private set; }

Expand Down Expand Up @@ -331,7 +331,7 @@ private void Initialize()
Reservation = new ReservationOperations(this);
Operation = new OperationOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2018-06-01";
ApiVersion = "2019-04-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public partial interface IAzureReservationAPIClient : System.IDisposable
ServiceClientCredentials Credentials { get; }

/// <summary>
/// Supported version.
/// Supported version for this document is 2019-04-01
/// </summary>
string ApiVersion { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,32 @@ namespace Microsoft.Azure.Management.Reservations
/// </summary>
public partial interface IReservationOrderOperations
{
/// <summary>
/// Calculate price for a `ReservationOrder`.
/// </summary>
/// <remarks>
/// Calculate price for placing a `ReservationOrder`
///
/// </remarks>
/// <param name='body'>
/// Information needed for calculate or purchase reservation
/// </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<CalculatePriceResponse>> CalculateWithHttpMessagesAsync(PurchaseRequest body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get all `ReservationOrder`s.
/// </summary>
Expand All @@ -47,6 +73,36 @@ public partial interface IReservationOrderOperations
/// </exception>
Task<AzureOperationResponse<IPage<ReservationOrderResponse>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Purchase `ReservationOrder`
/// </summary>
/// <remarks>
/// Purchase `ReservationOrder` and create resource under the
/// specificed URI
///
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
/// </param>
/// <param name='body'>
/// Information needed for calculate or purchase reservation
/// </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<ReservationOrderResponse>> PurchaseWithHttpMessagesAsync(string reservationOrderId, PurchaseRequest body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get a specific `ReservationOrder`.
/// </summary>
/// <remarks>
Expand All @@ -72,6 +128,36 @@ public partial interface IReservationOrderOperations
/// </exception>
Task<AzureOperationResponse<ReservationOrderResponse>> GetWithHttpMessagesAsync(string reservationOrderId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Purchase `ReservationOrder`
/// </summary>
/// <remarks>
/// Purchase `ReservationOrder` and create resource under the
/// specificed URI
///
/// </remarks>
/// <param name='reservationOrderId'>
/// Order Id of the reservation
/// </param>
/// <param name='body'>
/// Information needed for calculate or purchase reservation
/// </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<ReservationOrderResponse>> BeginPurchaseWithHttpMessagesAsync(string reservationOrderId, PurchaseRequest body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get all `ReservationOrder`s.
/// </summary>
/// <remarks>
Expand Down
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 CalculatePriceResponse
{
/// <summary>
/// Initializes a new instance of the CalculatePriceResponse class.
/// </summary>
public CalculatePriceResponse()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the CalculatePriceResponse class.
/// </summary>
public CalculatePriceResponse(CalculatePriceResponseProperties properties = default(CalculatePriceResponseProperties))
{
Properties = properties;
CustomInit();
}

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

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

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// <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 CalculatePriceResponseProperties
{
/// <summary>
/// Initializes a new instance of the CalculatePriceResponseProperties
/// class.
/// </summary>
public CalculatePriceResponseProperties()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the CalculatePriceResponseProperties
/// class.
/// </summary>
/// <param name="billingCurrencyTotal">Currency and amount that
/// customer will be charged in customer's local currency. Tax is not
/// included.</param>
/// <param name="isBillingPartnerManaged">True if billing is managed by
/// Microsoft Partner. Used only for CSP accounts.</param>
/// <param name="reservationOrderId">GUID that represents reservation
/// order that can be placed after calculating price.</param>
/// <param name="skuTitle">Title of SKU that is being
/// purchased.</param>
/// <param name="skuDescription">Description of SKU that is being
/// purchased.</param>
/// <param name="pricingCurrencyTotal">Amount that Microsoft uses for
/// record. Used during refund for calculating refund limit. Tax is not
/// included.</param>
public CalculatePriceResponseProperties(CalculatePriceResponsePropertiesBillingCurrencyTotal billingCurrencyTotal = default(CalculatePriceResponsePropertiesBillingCurrencyTotal), bool? isBillingPartnerManaged = default(bool?), string reservationOrderId = default(string), string skuTitle = default(string), string skuDescription = default(string), CalculatePriceResponsePropertiesPricingCurrencyTotal pricingCurrencyTotal = default(CalculatePriceResponsePropertiesPricingCurrencyTotal))
{
BillingCurrencyTotal = billingCurrencyTotal;
IsBillingPartnerManaged = isBillingPartnerManaged;
ReservationOrderId = reservationOrderId;
SkuTitle = skuTitle;
SkuDescription = skuDescription;
PricingCurrencyTotal = pricingCurrencyTotal;
CustomInit();
}

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

/// <summary>
/// Gets or sets currency and amount that customer will be charged in
/// customer's local currency. Tax is not included.
/// </summary>
[JsonProperty(PropertyName = "billingCurrencyTotal")]
public CalculatePriceResponsePropertiesBillingCurrencyTotal BillingCurrencyTotal { get; set; }

/// <summary>
/// Gets or sets true if billing is managed by Microsoft Partner. Used
/// only for CSP accounts.
/// </summary>
[JsonProperty(PropertyName = "isBillingPartnerManaged")]
public bool? IsBillingPartnerManaged { get; set; }

/// <summary>
/// Gets or sets GUID that represents reservation order that can be
/// placed after calculating price.
/// </summary>
[JsonProperty(PropertyName = "reservationOrderId")]
public string ReservationOrderId { get; set; }

/// <summary>
/// Gets or sets title of SKU that is being purchased.
/// </summary>
[JsonProperty(PropertyName = "skuTitle")]
public string SkuTitle { get; set; }

/// <summary>
/// Gets or sets description of SKU that is being purchased.
/// </summary>
[JsonProperty(PropertyName = "skuDescription")]
public string SkuDescription { get; set; }

/// <summary>
/// Gets or sets amount that Microsoft uses for record. Used during
/// refund for calculating refund limit. Tax is not included.
/// </summary>
[JsonProperty(PropertyName = "pricingCurrencyTotal")]
public CalculatePriceResponsePropertiesPricingCurrencyTotal PricingCurrencyTotal { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// <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;

/// <summary>
/// Currency and amount that customer will be charged in customer's local
/// currency. Tax is not included.
/// </summary>
public partial class CalculatePriceResponsePropertiesBillingCurrencyTotal
{
/// <summary>
/// Initializes a new instance of the
/// CalculatePriceResponsePropertiesBillingCurrencyTotal class.
/// </summary>
public CalculatePriceResponsePropertiesBillingCurrencyTotal()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the
/// CalculatePriceResponsePropertiesBillingCurrencyTotal class.
/// </summary>
public CalculatePriceResponsePropertiesBillingCurrencyTotal(string currencyCode = default(string), double? amount = default(double?))
{
CurrencyCode = currencyCode;
Amount = amount;
CustomInit();
}

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

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "currencyCode")]
public string CurrencyCode { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "amount")]
public double? Amount { get; set; }

}
}
Loading

0 comments on commit eedbc9c

Please sign in to comment.