forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR Microsoft.Azure.Management.Subscription] [Hub Generated] Revi…
…ew request for Microsoft.Subscription to add version preview/2018-11-01-preview (#250) * Update swagger_to_sdk_config.json * Generated from 12cf92bb36d2c853720ea3480580c9ef415f9984 Corrected the createSubscriptionUnderBillingProfile example with correct profile name.
- Loading branch information
1 parent
e6099e7
commit 886ac4a
Showing
13 changed files
with
1,500 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
...e.Management.Subscription/src/Generated/Models/ModernCspSubscriptionCreationParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
// <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.Subscription.Models | ||
{ | ||
using Microsoft.Rest; | ||
using Newtonsoft.Json; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// The parameters required to create a new CSP subscription. | ||
/// </summary> | ||
public partial class ModernCspSubscriptionCreationParameters | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// ModernCspSubscriptionCreationParameters class. | ||
/// </summary> | ||
public ModernCspSubscriptionCreationParameters() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// ModernCspSubscriptionCreationParameters class. | ||
/// </summary> | ||
/// <param name="displayName">The friendly name of the | ||
/// subscription.</param> | ||
/// <param name="skuId">The SKU ID of the Azure plan. Azure plan | ||
/// determines the pricing and service-level agreement of the | ||
/// subscription. Use 001 for Microsoft Azure Plan and 002 for | ||
/// Microsoft Azure Plan for DevTest.</param> | ||
/// <param name="resellerId">Reseller ID, basically MPN Id.</param> | ||
/// <param name="serviceProviderId">Service provider ID, basically MPN | ||
/// Id.</param> | ||
public ModernCspSubscriptionCreationParameters(string displayName, string skuId, string resellerId = default(string), string serviceProviderId = default(string)) | ||
{ | ||
DisplayName = displayName; | ||
SkuId = skuId; | ||
ResellerId = resellerId; | ||
ServiceProviderId = serviceProviderId; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets or sets the friendly name of the subscription. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "displayName")] | ||
public string DisplayName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the SKU ID of the Azure plan. Azure plan determines | ||
/// the pricing and service-level agreement of the subscription. Use | ||
/// 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for | ||
/// DevTest. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "skuId")] | ||
public string SkuId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets reseller ID, basically MPN Id. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "resellerId")] | ||
public string ResellerId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets service provider ID, basically MPN Id. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "serviceProviderId")] | ||
public string ServiceProviderId { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public virtual void Validate() | ||
{ | ||
if (DisplayName == null) | ||
{ | ||
throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); | ||
} | ||
if (SkuId == null) | ||
{ | ||
throw new ValidationException(ValidationRules.CannotBeNull, "SkuId"); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.