From 0302d2d8894bd922b6c5de310abcaafbb975478e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 13 May 2021 04:25:57 +0000 Subject: [PATCH] CodeGen from PR 14073 in Azure/azure-rest-api-specs Merge bb2932a8b3cf727a88c736bfe127b4337141fe1d into f5fb71085c6846fd5d11b59a57381a5fcfd36840 --- .../Generated/AppPlatformManagementClient.cs | 2 +- .../src/Generated/Models/CustomContainer.cs | 98 +++++++++++++++++++ .../Generated/Models/DeploymentSettings.cs | 42 ++++++-- .../Models/ImageRegistryCredential.cs | 61 ++++++++++++ .../src/Generated/Models/ResourceRequests.cs | 67 +++++++++++++ .../src/Generated/Models/UserSourceInfo.cs | 14 ++- .../src/Generated/Models/UserSourceType.cs | 1 + .../SdkInfo_AppPlatformManagementClient.cs | 33 +++---- 8 files changed, 282 insertions(+), 36 deletions(-) create mode 100644 sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/CustomContainer.cs create mode 100644 sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/ImageRegistryCredential.cs 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 4a15e9467b6cd..a7222308e445c 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-06-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/CustomContainer.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/CustomContainer.cs new file mode 100644 index 0000000000000..ac4385b152c61 --- /dev/null +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/CustomContainer.cs @@ -0,0 +1,98 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Custom container payload + /// + public partial class CustomContainer + { + /// + /// Initializes a new instance of the CustomContainer class. + /// + public CustomContainer() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomContainer class. + /// + /// The name of the registry that contains the + /// container image + /// Container image of the custom + /// container. This should be in the form of + /// <repository>:<tag> without the server name of the + /// registry + /// Entrypoint array. Not executed within a + /// shell. The docker image's ENTRYPOINT is used if this is not + /// provided. + /// Arguments to the entrypoint. The docker image's + /// CMD is used if this is not provided. + /// Credential of the image + /// registry + public CustomContainer(string server = default(string), string containerImage = default(string), IList command = default(IList), IList args = default(IList), ImageRegistryCredential imageRegistryCredential = default(ImageRegistryCredential)) + { + Server = server; + ContainerImage = containerImage; + Command = command; + Args = args; + ImageRegistryCredential = imageRegistryCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the registry that contains the container + /// image + /// + [JsonProperty(PropertyName = "server")] + public string Server { get; set; } + + /// + /// Gets or sets container image of the custom container. This should + /// be in the form of &lt;repository&gt;:&lt;tag&gt; + /// without the server name of the registry + /// + [JsonProperty(PropertyName = "containerImage")] + public string ContainerImage { get; set; } + + /// + /// Gets or sets entrypoint array. Not executed within a shell. The + /// docker image's ENTRYPOINT is used if this is not provided. + /// + [JsonProperty(PropertyName = "command")] + public IList Command { get; set; } + + /// + /// Gets or sets arguments to the entrypoint. The docker image's CMD is + /// used if this is not provided. + /// + [JsonProperty(PropertyName = "args")] + public IList Args { get; set; } + + /// + /// Gets or sets credential of the image registry + /// + [JsonProperty(PropertyName = "imageRegistryCredential")] + public ImageRegistryCredential ImageRegistryCredential { get; set; } + + } +} 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 232e2fb3c3e0e..02db7ac1e21a3 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 2021-06-01-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 + /// 2021-06-01-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 2021-06-01-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 2021-06-01-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/ImageRegistryCredential.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/ImageRegistryCredential.cs new file mode 100644 index 0000000000000..34fbb2416a19a --- /dev/null +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/ImageRegistryCredential.cs @@ -0,0 +1,61 @@ +// +// 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; + + /// + /// Credential of the image registry + /// + public partial class ImageRegistryCredential + { + /// + /// Initializes a new instance of the ImageRegistryCredential class. + /// + public ImageRegistryCredential() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImageRegistryCredential class. + /// + /// The username of the image registry + /// credential + /// The password of the image registry + /// credential + public ImageRegistryCredential(string username = default(string), string password = default(string)) + { + Username = username; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the username of the image registry credential + /// + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + /// + /// Gets or sets the password of the image registry credential + /// + [JsonProperty(PropertyName = "password")] + public string Password { get; set; } + + } +} 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 0000000000000..6aef9de763358 --- /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/Models/UserSourceInfo.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/UserSourceInfo.cs index 134ca697d8a25..3ab4eeb928b0e 100644 --- a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/UserSourceInfo.cs +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/UserSourceInfo.cs @@ -30,19 +30,21 @@ public UserSourceInfo() /// Initializes a new instance of the UserSourceInfo class. /// /// Type of the source uploaded. Possible values - /// include: 'Jar', 'NetCoreZip', 'Source' + /// include: 'Jar', 'NetCoreZip', 'Source', 'Container' /// Relative path of the storage which /// stores the source /// Version of the source /// Selector for the artifact to be used /// for the deployment for multi-module projects. This should be /// the relative path to the target module/project. - public UserSourceInfo(string type = default(string), string relativePath = default(string), string version = default(string), string artifactSelector = default(string)) + /// Custom container payload + public UserSourceInfo(string type = default(string), string relativePath = default(string), string version = default(string), string artifactSelector = default(string), CustomContainer customContainer = default(CustomContainer)) { Type = type; RelativePath = relativePath; Version = version; ArtifactSelector = artifactSelector; + CustomContainer = customContainer; CustomInit(); } @@ -53,7 +55,7 @@ public UserSourceInfo() /// /// Gets or sets type of the source uploaded. Possible values include: - /// 'Jar', 'NetCoreZip', 'Source' + /// 'Jar', 'NetCoreZip', 'Source', 'Container' /// [JsonProperty(PropertyName = "type")] public string Type { get; set; } @@ -78,5 +80,11 @@ public UserSourceInfo() [JsonProperty(PropertyName = "artifactSelector")] public string ArtifactSelector { get; set; } + /// + /// Gets or sets custom container payload + /// + [JsonProperty(PropertyName = "customContainer")] + public CustomContainer CustomContainer { get; set; } + } } diff --git a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/UserSourceType.cs b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/UserSourceType.cs index 278fdb334cb3a..ad3f0d3a43732 100644 --- a/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/UserSourceType.cs +++ b/sdk/appplatform/Microsoft.Azure.Management.AppPlatform/src/Generated/Models/UserSourceType.cs @@ -19,5 +19,6 @@ public static class UserSourceType public const string Jar = "Jar"; public const string NetCoreZip = "NetCoreZip"; public const string Source = "Source"; + public const string Container = "Container"; } } 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 97bd291e7cf68..725340738685d 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-06-01-preview"), + new Tuple("AppPlatform", "Bindings", "2021-06-01-preview"), + new Tuple("AppPlatform", "Certificates", "2021-06-01-preview"), + new Tuple("AppPlatform", "ConfigServers", "2021-06-01-preview"), + new Tuple("AppPlatform", "CustomDomains", "2021-06-01-preview"), + new Tuple("AppPlatform", "Deployments", "2021-06-01-preview"), + new Tuple("AppPlatform", "MonitoringSettings", "2021-06-01-preview"), + new Tuple("AppPlatform", "Operations", "2021-06-01-preview"), + new Tuple("AppPlatform", "RuntimeVersions", "2021-06-01-preview"), + new Tuple("AppPlatform", "Services", "2021-06-01-preview"), + new Tuple("AppPlatform", "Skus", "2021-06-01-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 } } -