Skip to content

Commit

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

* .NET SDK Resource Provider:'Batch'
REST Spec PR 'Azure/azure-rest-api-specs#5472'
REST Spec PR Author 'jafreck'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Batch'
REST Spec PR 'Azure/azure-rest-api-specs#5472'
REST Spec PR Author 'jafreck'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Batch'
REST Spec PR 'Azure/azure-rest-api-specs#5472'
REST Spec PR Author 'jafreck'
REST Spec PR Last commit
  • Loading branch information
adxsdknet authored and mentat9 committed Jun 10, 2019
1 parent 9b5339e commit b76d5fb
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/SDKs/Batch/DataPlane/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>BatchService_2018-08-01.7.0;</AzureApiTag>
<AzureApiTag>Batch_2019-04-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private void Initialize()
Certificate = new CertificateOperations(this);
Pool = new PoolOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2018-12-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 @@ -50,15 +50,22 @@ public BatchAccount()
/// associated with the Batch account.</param>
/// <param name="autoStorage">The properties and status of any
/// auto-storage account associated with the Batch account.</param>
/// <param name="dedicatedCoreQuota">The dedicated core quota for this
/// <param name="dedicatedCoreQuota">The dedicated core quota for the
/// Batch account.</param>
/// <param name="lowPriorityCoreQuota">The low-priority core quota for
/// this Batch account.</param>
/// <param name="poolQuota">The pool quota for this Batch
/// the Batch account.</param>
/// <param name="dedicatedCoreQuotaPerVMFamily">A list of the dedicated
/// core quota per Virtual Machine family for the Batch account. For
/// accounts with PoolAllocationMode set to UserSubscription, quota is
/// managed on the subscription so this value is not returned.</param>
/// <param name="dedicatedCoreQuotaPerVMFamilyEnforced">A value
/// indicating whether the core quota for the Batch Account is enforced
/// per Virtual Machine family or not.</param>
/// <param name="poolQuota">The pool quota for the Batch
/// account.</param>
/// <param name="activeJobAndJobScheduleQuota">The active job and job
/// schedule quota for this Batch account.</param>
public BatchAccount(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string accountEndpoint = default(string), ProvisioningState provisioningState = default(ProvisioningState), PoolAllocationMode? poolAllocationMode = default(PoolAllocationMode?), KeyVaultReference keyVaultReference = default(KeyVaultReference), AutoStorageProperties autoStorage = default(AutoStorageProperties), int dedicatedCoreQuota = default(int), int lowPriorityCoreQuota = default(int), int poolQuota = default(int), int activeJobAndJobScheduleQuota = default(int))
/// schedule quota for the Batch account.</param>
public BatchAccount(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string accountEndpoint = default(string), ProvisioningState provisioningState = default(ProvisioningState), PoolAllocationMode? poolAllocationMode = default(PoolAllocationMode?), KeyVaultReference keyVaultReference = default(KeyVaultReference), AutoStorageProperties autoStorage = default(AutoStorageProperties), int dedicatedCoreQuota = default(int), int? lowPriorityCoreQuota = default(int?), IList<VirtualMachineFamilyCoreQuota> dedicatedCoreQuotaPerVMFamily = default(IList<VirtualMachineFamilyCoreQuota>), bool dedicatedCoreQuotaPerVMFamilyEnforced = default(bool), int poolQuota = default(int), int activeJobAndJobScheduleQuota = default(int))
: base(id, name, type, location, tags)
{
AccountEndpoint = accountEndpoint;
Expand All @@ -68,6 +75,8 @@ public BatchAccount()
AutoStorage = autoStorage;
DedicatedCoreQuota = dedicatedCoreQuota;
LowPriorityCoreQuota = lowPriorityCoreQuota;
DedicatedCoreQuotaPerVMFamily = dedicatedCoreQuotaPerVMFamily;
DedicatedCoreQuotaPerVMFamilyEnforced = dedicatedCoreQuotaPerVMFamilyEnforced;
PoolQuota = poolQuota;
ActiveJobAndJobScheduleQuota = activeJobAndJobScheduleQuota;
CustomInit();
Expand Down Expand Up @@ -117,25 +126,60 @@ public BatchAccount()
public AutoStorageProperties AutoStorage { get; private set; }

/// <summary>
/// Gets the dedicated core quota for this Batch account.
/// Gets the dedicated core quota for the Batch account.
/// </summary>
/// <remarks>
/// For accounts with PoolAllocationMode set to UserSubscription, quota
/// is managed on the subscription so this value is not returned.
/// </remarks>
[JsonProperty(PropertyName = "properties.dedicatedCoreQuota")]
public int DedicatedCoreQuota { get; private set; }

/// <summary>
/// Gets the low-priority core quota for this Batch account.
/// Gets the low-priority core quota for the Batch account.
/// </summary>
/// <remarks>
/// For accounts with PoolAllocationMode set to UserSubscription, quota
/// is managed on the subscription so this value is not returned.
/// </remarks>
[JsonProperty(PropertyName = "properties.lowPriorityCoreQuota")]
public int LowPriorityCoreQuota { get; private set; }
public int? LowPriorityCoreQuota { get; private set; }

/// <summary>
/// Gets a list of the dedicated core quota per Virtual Machine family
/// for the Batch account. For accounts with PoolAllocationMode set to
/// UserSubscription, quota is managed on the subscription so this
/// value is not returned.
/// </summary>
[JsonProperty(PropertyName = "properties.dedicatedCoreQuotaPerVMFamily")]
public IList<VirtualMachineFamilyCoreQuota> DedicatedCoreQuotaPerVMFamily { get; private set; }

/// <summary>
/// Gets a value indicating whether the core quota for the Batch
/// Account is enforced per Virtual Machine family or not.
/// </summary>
/// <remarks>
/// Batch is transitioning its core quota system for dedicated cores to
/// be enforced per Virtual Machine family. During this transitional
/// phase, the dedicated core quota per Virtual Machine family may not
/// yet be enforced. If this flag is false, dedicated core quota is
/// enforced via the old dedicatedCoreQuota property on the account and
/// does not consider Virtual Machine family. If this flag is true,
/// dedicated core quota is enforced via the
/// dedicatedCoreQuotaPerVMFamily property on the account, and the old
/// dedicatedCoreQuota does not apply.
/// </remarks>
[JsonProperty(PropertyName = "properties.dedicatedCoreQuotaPerVMFamilyEnforced")]
public bool DedicatedCoreQuotaPerVMFamilyEnforced { get; private set; }

/// <summary>
/// Gets the pool quota for this Batch account.
/// Gets the pool quota for the Batch account.
/// </summary>
[JsonProperty(PropertyName = "properties.poolQuota")]
public int PoolQuota { get; private set; }

/// <summary>
/// Gets the active job and job schedule quota for this Batch account.
/// Gets the active job and job schedule quota for the Batch account.
/// </summary>
[JsonProperty(PropertyName = "properties.activeJobAndJobScheduleQuota")]
public int ActiveJobAndJobScheduleQuota { get; private set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// <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.Batch.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// A VM Family and its associated core quota for the Batch account.
/// </summary>
public partial class VirtualMachineFamilyCoreQuota
{
/// <summary>
/// Initializes a new instance of the VirtualMachineFamilyCoreQuota
/// class.
/// </summary>
public VirtualMachineFamilyCoreQuota()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the VirtualMachineFamilyCoreQuota
/// class.
/// </summary>
/// <param name="name">The Virtual Machine family name.</param>
/// <param name="coreQuota">The core quota for the VM family for the
/// Batch account.</param>
public VirtualMachineFamilyCoreQuota(string name = default(string), int coreQuota = default(int))
{
Name = name;
CoreQuota = coreQuota;
CustomInit();
}

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

/// <summary>
/// Gets the Virtual Machine family name.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; private set; }

/// <summary>
/// Gets the core quota for the VM family for the Batch account.
/// </summary>
[JsonProperty(PropertyName = "coreQuota")]
public int CoreQuota { get; private set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_BatchManagement
{
return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("Batch", "Application", "2018-12-01"),
new Tuple<string, string, string>("Batch", "ApplicationPackage", "2018-12-01"),
new Tuple<string, string, string>("Batch", "BatchAccount", "2018-12-01"),
new Tuple<string, string, string>("Batch", "Certificate", "2018-12-01"),
new Tuple<string, string, string>("Batch", "Location", "2018-12-01"),
new Tuple<string, string, string>("Batch", "Operations", "2018-12-01"),
new Tuple<string, string, string>("Batch", "Pool", "2018-12-01"),
new Tuple<string, string, string>("Batch", "Application", "2019-04-01"),
new Tuple<string, string, string>("Batch", "ApplicationPackage", "2019-04-01"),
new Tuple<string, string, string>("Batch", "BatchAccount", "2019-04-01"),
new Tuple<string, string, string>("Batch", "Certificate", "2019-04-01"),
new Tuple<string, string, string>("Batch", "Location", "2019-04-01"),
new Tuple<string, string, string>("Batch", "Operations", "2019-04-01"),
new Tuple<string, string, string>("Batch", "Pool", "2019-04-01"),
}.AsEnumerable();
}
}
Expand Down

0 comments on commit b76d5fb

Please sign in to comment.