From df031371415d0e0c011d8f237ceff507f7c32e06 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 25 Apr 2021 07:14:34 +0000 Subject: [PATCH] CodeGen from PR 13927 in Azure/azure-rest-api-specs Merge 9ca34c613215ec5397ee183a33be6c735e4af107 into ecff0da7b0abb911563467d2670ae6014ca07b3a --- .../Generated/AppPlatformManagementClient.cs | 2 +- .../Generated/Models/DeploymentSettings.cs | 42 +++++++++--- .../Models/MonitoringSettingProperties.cs | 4 +- .../src/Generated/Models/ResourceRequests.cs | 67 +++++++++++++++++++ .../SdkInfo_AppPlatformManagementClient.cs | 33 +++------ 5 files changed, 113 insertions(+), 35 deletions(-) create mode 100644 sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/ResourceRequests.cs diff --git a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/AppPlatformManagementClient.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/AppPlatformManagementClient.cs index 4a15e9467b6c..272a2b074b52 100644 --- a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/AppPlatformManagementClient.cs +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/AppPlatformManagementClient.cs @@ -384,7 +384,7 @@ private void Initialize() RuntimeVersions = new RuntimeVersionsOperations(this); Skus = new SkusOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-11-01-preview"; + ApiVersion = "2021-03-03-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/DeploymentSettings.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/DeploymentSettings.cs index 232e2fb3c3e0..ef1d9ae454d4 100644 --- a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/DeploymentSettings.cs +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/DeploymentSettings.cs @@ -31,11 +31,19 @@ public DeploymentSettings() /// /// Initializes a new instance of the DeploymentSettings class. /// - /// Required CPU, basic tier should be 1, standard - /// tier should be in range (1, 4) - /// Required Memory size in GB, basic tier - /// should be in range (1, 2), standard tier should be in range (1, - /// 8) + /// Required CPU. This should be 1 for Basic tier, + /// and in range [1, 4] for Standard tier. This is deprecated starting + /// from API version 2020-03-03-preview. Please use the + /// resourceRequests field to set the CPU size. + /// Required Memory size in GB. This should be + /// in range [1, 2] for Basic tier, and in range [1, 8] for Standard + /// tier. This is deprecated starting from API version + /// 2020-03-03-preview. Please use the resourceRequests field to set + /// the the memory size. + /// The requested resource quantity for + /// required CPU and Memory. It is recommended that using this field to + /// represent the required CPU and Memory, the old field cpu and + /// memoryInGB will be deprecated later. /// JVM parameter /// The path to the .NET executable /// relative to zip root @@ -43,10 +51,11 @@ public DeploymentSettings() /// variables /// Runtime version. Possible values /// include: 'Java_8', 'Java_11', 'NetCore_31' - public DeploymentSettings(int? cpu = default(int?), int? memoryInGB = default(int?), string jvmOptions = default(string), string netCoreMainEntryPath = default(string), IDictionary environmentVariables = default(IDictionary), string runtimeVersion = default(string)) + public DeploymentSettings(int? cpu = default(int?), int? memoryInGB = default(int?), ResourceRequests resourceRequests = default(ResourceRequests), string jvmOptions = default(string), string netCoreMainEntryPath = default(string), IDictionary environmentVariables = default(IDictionary), string runtimeVersion = default(string)) { Cpu = cpu; MemoryInGB = memoryInGB; + ResourceRequests = resourceRequests; JvmOptions = jvmOptions; NetCoreMainEntryPath = netCoreMainEntryPath; EnvironmentVariables = environmentVariables; @@ -60,19 +69,32 @@ public DeploymentSettings() partial void CustomInit(); /// - /// Gets or sets required CPU, basic tier should be 1, standard tier - /// should be in range (1, 4) + /// Gets or sets required CPU. This should be 1 for Basic tier, and in + /// range [1, 4] for Standard tier. This is deprecated starting from + /// API version 2020-03-03-preview. Please use the resourceRequests + /// field to set the CPU size. /// [JsonProperty(PropertyName = "cpu")] public int? Cpu { get; set; } /// - /// Gets or sets required Memory size in GB, basic tier should be in - /// range (1, 2), standard tier should be in range (1, 8) + /// Gets or sets required Memory size in GB. This should be in range + /// [1, 2] for Basic tier, and in range [1, 8] for Standard tier. This + /// is deprecated starting from API version 2020-03-03-preview. Please + /// use the resourceRequests field to set the the memory size. /// [JsonProperty(PropertyName = "memoryInGB")] public int? MemoryInGB { get; set; } + /// + /// Gets or sets the requested resource quantity for required CPU and + /// Memory. It is recommended that using this field to represent the + /// required CPU and Memory, the old field cpu and memoryInGB will be + /// deprecated later. + /// + [JsonProperty(PropertyName = "resourceRequests")] + public ResourceRequests ResourceRequests { get; set; } + /// /// Gets or sets JVM parameter /// diff --git a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs index e032bd40ddb1..40944f04adfc 100644 --- a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs @@ -39,7 +39,7 @@ public MonitoringSettingProperties() /// changes. /// Indicates whether enable the trace /// functionality, which will be deprecated since api version - /// 2020-11-01-preview. Please leverage appInsightsInstrumentationKey + /// 2021-03-03-preview. Please leverage appInsightsInstrumentationKey /// to indicate if monitoringSettings enabled or not /// Target application /// insight instrumentation key, null or whitespace include empty will @@ -80,7 +80,7 @@ public MonitoringSettingProperties() /// /// Gets or sets indicates whether enable the trace functionality, - /// which will be deprecated since api version 2020-11-01-preview. + /// which will be deprecated since api version 2021-03-03-preview. /// Please leverage appInsightsInstrumentationKey to indicate if /// monitoringSettings enabled or not /// diff --git a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/ResourceRequests.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/ResourceRequests.cs new file mode 100644 index 000000000000..6aef9de76335 --- /dev/null +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/ResourceRequests.cs @@ -0,0 +1,67 @@ +// +// 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.AppPlatform.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Deployment resource request payload + /// + public partial class ResourceRequests + { + /// + /// Initializes a new instance of the ResourceRequests class. + /// + public ResourceRequests() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceRequests class. + /// + /// Required CPU. 1 core can be represented by 1 or + /// 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, + /// 4} for Standard tier. + /// Required memory. 1 GB can be represented by + /// 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and + /// {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. + public ResourceRequests(string cpu = default(string), string memory = default(string)) + { + Cpu = cpu; + Memory = memory; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required CPU. 1 core can be represented by 1 or 1000m. + /// This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for + /// Standard tier. + /// + [JsonProperty(PropertyName = "cpu")] + public string Cpu { get; set; } + + /// + /// Gets or sets required memory. 1 GB can be represented by 1Gi or + /// 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and + /// {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. + /// + [JsonProperty(PropertyName = "memory")] + public string Memory { get; set; } + + } +} diff --git a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/SdkInfo_AppPlatformManagementClient.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/SdkInfo_AppPlatformManagementClient.cs index 97bd291e7cf6..dbe117787b9f 100644 --- a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/SdkInfo_AppPlatformManagementClient.cs +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/SdkInfo_AppPlatformManagementClient.cs @@ -19,30 +19,19 @@ public static IEnumerable> ApiInfo_AppPlatformMana { return new Tuple[] { - new Tuple("AppPlatform", "Apps", "2020-11-01-preview"), - new Tuple("AppPlatform", "Bindings", "2020-11-01-preview"), - new Tuple("AppPlatform", "Certificates", "2020-11-01-preview"), - new Tuple("AppPlatform", "ConfigServers", "2020-11-01-preview"), - new Tuple("AppPlatform", "CustomDomains", "2020-11-01-preview"), - new Tuple("AppPlatform", "Deployments", "2020-11-01-preview"), - new Tuple("AppPlatform", "MonitoringSettings", "2020-11-01-preview"), - new Tuple("AppPlatform", "Operations", "2020-11-01-preview"), - new Tuple("AppPlatform", "RuntimeVersions", "2020-11-01-preview"), - new Tuple("AppPlatform", "Services", "2020-11-01-preview"), - new Tuple("AppPlatform", "Skus", "2020-11-01-preview"), + new Tuple("AppPlatform", "Apps", "2021-03-03-preview"), + new Tuple("AppPlatform", "Bindings", "2021-03-03-preview"), + new Tuple("AppPlatform", "Certificates", "2021-03-03-preview"), + new Tuple("AppPlatform", "ConfigServers", "2021-03-03-preview"), + new Tuple("AppPlatform", "CustomDomains", "2021-03-03-preview"), + new Tuple("AppPlatform", "Deployments", "2021-03-03-preview"), + new Tuple("AppPlatform", "MonitoringSettings", "2021-03-03-preview"), + new Tuple("AppPlatform", "Operations", "2021-03-03-preview"), + new Tuple("AppPlatform", "RuntimeVersions", "2021-03-03-preview"), + new Tuple("AppPlatform", "Services", "2021-03-03-preview"), + new Tuple("AppPlatform", "Skus", "2021-03-03-preview"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/appplatform/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\sonwan\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "a06d912bc912010bdc0aa5d1d3c4b28ee1d89905"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -