From afad943a25bf510f8c11a2976c7270e8dde56587 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 8 Oct 2021 15:01:04 +0000 Subject: [PATCH] CodeGen from PR 16139 in Azure/azure-rest-api-specs Merge 4786db6fc83cc30ba71701a1e4cf351a657a246a into 865f0857a8785640f9bca0ab9842d29be589f2a8 --- .../src/Generated/IOperations.cs | 4 +- .../src/Generated/IotCentralClient.cs | 2 +- .../src/Generated/Models/App.cs | 26 +++++- .../src/Generated/Models/AppPatch.cs | 26 +++++- .../src/Generated/Models/AppSku.cs | 2 - .../src/Generated/Models/AppSkuInfo.cs | 6 +- .../src/Generated/Models/AppState.cs | 22 +++++ .../Models/SystemAssignedServiceIdentity.cs | 90 +++++++++++++++++++ .../SystemAssignedServiceIdentityType.cs | 22 +++++ .../src/Generated/Operations.cs | 4 +- .../src/Generated/OperationsExtensions.cs | 8 +- .../src/Generated/SdkInfo_IotCentralClient.cs | 15 +--- 12 files changed, 198 insertions(+), 29 deletions(-) create mode 100644 sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppState.cs create mode 100644 sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentity.cs create mode 100644 sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentityType.cs diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IOperations.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IOperations.cs index 76541811542c2..f34c6086a585a 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IOperations.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.IotCentral public partial interface IOperations { /// - /// Lists all of the available IoT Central application REST API + /// Lists all of the available IoT Central Resource Provider /// operations. /// /// @@ -44,7 +44,7 @@ public partial interface IOperations /// Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Lists all of the available IoT Central application REST API + /// Lists all of the available IoT Central Resource Provider /// operations. /// /// diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IotCentralClient.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IotCentralClient.cs index 4b39279214a0a..d6c21bfb8b388 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IotCentralClient.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/IotCentralClient.cs @@ -329,7 +329,7 @@ private void Initialize() Apps = new AppsOperations(this); Operations = new Operations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2018-09-01"; + ApiVersion = "2021-06-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/App.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/App.cs index ae9f2efd9b97d..6c46c617b8d02 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/App.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/App.cs @@ -49,14 +49,20 @@ public App() /// application. Optional; if not specified, defaults to a blank /// blueprint and allows the application to be defined from /// scratch. - public App(string location, AppSkuInfo sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string applicationId = default(string), string displayName = default(string), string subdomain = default(string), string template = default(string)) + /// The current state of the application. Possible + /// values include: 'created', 'suspended' + /// The managed identities for the IoT Central + /// application. + public App(string location, AppSkuInfo sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string applicationId = default(string), string displayName = default(string), string subdomain = default(string), string template = default(string), string state = default(string), SystemAssignedServiceIdentity identity = default(SystemAssignedServiceIdentity)) : base(location, id, name, type, tags) { ApplicationId = applicationId; DisplayName = displayName; Subdomain = subdomain; Template = template; + State = state; Sku = sku; + Identity = identity; CustomInit(); } @@ -92,12 +98,26 @@ public App() [JsonProperty(PropertyName = "properties.template")] public string Template { get; set; } + /// + /// Gets or sets the current state of the application. Possible values + /// include: 'created', 'suspended' + /// + [JsonProperty(PropertyName = "properties.state")] + public string State { get; set; } + /// /// Gets or sets a valid instance SKU. /// [JsonProperty(PropertyName = "sku")] public AppSkuInfo Sku { get; set; } + /// + /// Gets or sets the managed identities for the IoT Central + /// application. + /// + [JsonProperty(PropertyName = "identity")] + public SystemAssignedServiceIdentity Identity { get; set; } + /// /// Validate the object. /// @@ -115,6 +135,10 @@ public override void Validate() { Sku.Validate(); } + if (Identity != null) + { + Identity.Validate(); + } } } } diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppPatch.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppPatch.cs index 1e5769cedb3cf..846e38c3b4e48 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppPatch.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppPatch.cs @@ -45,7 +45,11 @@ public AppPatch() /// application. Optional; if not specified, defaults to a blank /// blueprint and allows the application to be defined from /// scratch. - public AppPatch(IDictionary tags = default(IDictionary), AppSkuInfo sku = default(AppSkuInfo), string applicationId = default(string), string displayName = default(string), string subdomain = default(string), string template = default(string)) + /// The current state of the application. Possible + /// values include: 'created', 'suspended' + /// The managed identities for the IoT Central + /// application. + public AppPatch(IDictionary tags = default(IDictionary), AppSkuInfo sku = default(AppSkuInfo), string applicationId = default(string), string displayName = default(string), string subdomain = default(string), string template = default(string), string state = default(string), SystemAssignedServiceIdentity identity = default(SystemAssignedServiceIdentity)) { Tags = tags; Sku = sku; @@ -53,6 +57,8 @@ public AppPatch() DisplayName = displayName; Subdomain = subdomain; Template = template; + State = state; + Identity = identity; CustomInit(); } @@ -100,6 +106,20 @@ public AppPatch() [JsonProperty(PropertyName = "properties.template")] public string Template { get; set; } + /// + /// Gets or sets the current state of the application. Possible values + /// include: 'created', 'suspended' + /// + [JsonProperty(PropertyName = "properties.state")] + public string State { get; set; } + + /// + /// Gets or sets the managed identities for the IoT Central + /// application. + /// + [JsonProperty(PropertyName = "identity")] + public SystemAssignedServiceIdentity Identity { get; set; } + /// /// Validate the object. /// @@ -112,6 +132,10 @@ public virtual void Validate() { Sku.Validate(); } + if (Identity != null) + { + Identity.Validate(); + } } } } diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSku.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSku.cs index 13c4e59ed5e86..86afed20418ed 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSku.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSku.cs @@ -16,8 +16,6 @@ namespace Microsoft.Azure.Management.IotCentral.Models /// public static class AppSku { - public const string F1 = "F1"; - public const string S1 = "S1"; public const string ST0 = "ST0"; public const string ST1 = "ST1"; public const string ST2 = "ST2"; diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSkuInfo.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSkuInfo.cs index 1b8a01b1ffe4b..d8c66165ce9d3 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSkuInfo.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppSkuInfo.cs @@ -31,7 +31,7 @@ public AppSkuInfo() /// Initializes a new instance of the AppSkuInfo class. /// /// The name of the SKU. Possible values include: - /// 'F1', 'S1', 'ST0', 'ST1', 'ST2' + /// 'ST0', 'ST1', 'ST2' public AppSkuInfo(string name) { Name = name; @@ -44,8 +44,8 @@ public AppSkuInfo(string name) partial void CustomInit(); /// - /// Gets or sets the name of the SKU. Possible values include: 'F1', - /// 'S1', 'ST0', 'ST1', 'ST2' + /// Gets or sets the name of the SKU. Possible values include: 'ST0', + /// 'ST1', 'ST2' /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppState.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppState.cs new file mode 100644 index 0000000000000..948520387fbb7 --- /dev/null +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/AppState.cs @@ -0,0 +1,22 @@ +// +// 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.IotCentral.Models +{ + + /// + /// Defines values for AppState. + /// + public static class AppState + { + public const string Created = "created"; + public const string Suspended = "suspended"; + } +} diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentity.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentity.cs new file mode 100644 index 0000000000000..4164f9ada95a2 --- /dev/null +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentity.cs @@ -0,0 +1,90 @@ +// +// 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.IotCentral.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Managed service identity (either system assigned, or none) + /// + public partial class SystemAssignedServiceIdentity + { + /// + /// Initializes a new instance of the SystemAssignedServiceIdentity + /// class. + /// + public SystemAssignedServiceIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemAssignedServiceIdentity + /// class. + /// + /// Possible values include: 'None', + /// 'SystemAssigned' + /// The service principal ID of the system + /// assigned identity. This property will only be provided for a system + /// assigned identity. + /// The tenant ID of the system assigned + /// identity. This property will only be provided for a system assigned + /// identity. + public SystemAssignedServiceIdentity(string type, System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?)) + { + PrincipalId = principalId; + TenantId = tenantId; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the service principal ID of the system assigned identity. This + /// property will only be provided for a system assigned identity. + /// + [JsonProperty(PropertyName = "principalId")] + public System.Guid? PrincipalId { get; private set; } + + /// + /// Gets the tenant ID of the system assigned identity. This property + /// will only be provided for a system assigned identity. + /// + [JsonProperty(PropertyName = "tenantId")] + public System.Guid? TenantId { get; private set; } + + /// + /// Gets or sets possible values include: 'None', 'SystemAssigned' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentityType.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentityType.cs new file mode 100644 index 0000000000000..e1cbb946615b2 --- /dev/null +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Models/SystemAssignedServiceIdentityType.cs @@ -0,0 +1,22 @@ +// +// 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.IotCentral.Models +{ + + /// + /// Defines values for SystemAssignedServiceIdentityType. + /// + public static class SystemAssignedServiceIdentityType + { + public const string None = "None"; + public const string SystemAssigned = "SystemAssigned"; + } +} diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Operations.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Operations.cs index 9f9db537c8793..13de959a94391 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Operations.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/Operations.cs @@ -51,7 +51,7 @@ internal Operations(IotCentralClient client) public IotCentralClient Client { get; private set; } /// - /// Lists all of the available IoT Central application REST API operations. + /// Lists all of the available IoT Central Resource Provider operations. /// /// /// Headers that will be added to request. @@ -224,7 +224,7 @@ internal Operations(IotCentralClient client) } /// - /// Lists all of the available IoT Central application REST API operations. + /// Lists all of the available IoT Central Resource Provider operations. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/OperationsExtensions.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/OperationsExtensions.cs index 906d85c28906f..e41818a6171cc 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/OperationsExtensions.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/OperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.IotCentral public static partial class OperationsExtensions { /// - /// Lists all of the available IoT Central application REST API operations. + /// Lists all of the available IoT Central Resource Provider operations. /// /// /// The operations group for this extension method. @@ -33,7 +33,7 @@ public static IPage List(this IOperations operations) } /// - /// Lists all of the available IoT Central application REST API operations. + /// Lists all of the available IoT Central Resource Provider operations. /// /// /// The operations group for this extension method. @@ -50,7 +50,7 @@ public static IPage List(this IOperations operations) } /// - /// Lists all of the available IoT Central application REST API operations. + /// Lists all of the available IoT Central Resource Provider operations. /// /// /// The operations group for this extension method. @@ -64,7 +64,7 @@ public static IPage ListNext(this IOperations operations, string next } /// - /// Lists all of the available IoT Central application REST API operations. + /// Lists all of the available IoT Central Resource Provider operations. /// /// /// The operations group for this extension method. diff --git a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/SdkInfo_IotCentralClient.cs b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/SdkInfo_IotCentralClient.cs index 665b5bf0583aa..d917af8a4fe1c 100644 --- a/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/SdkInfo_IotCentralClient.cs +++ b/sdk/iotcentral/Microsoft.Azure.Management.IotCentral/src/Generated/SdkInfo_IotCentralClient.cs @@ -19,21 +19,10 @@ public static IEnumerable> ApiInfo_IotCentralClien { return new Tuple[] { - new Tuple("IoTCentral", "Apps", "2018-09-01"), - new Tuple("IoTCentral", "Operations", "2018-09-01"), + new Tuple("IoTCentral", "Apps", "2021-06-01"), + new Tuple("IoTCentral", "Operations", "2021-06-01"), }.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/iotcentral/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\\Users\\pochen\\Github\\azure-sdk-for-net\\sdk\\iotcentral\\Microsoft.Azure.Management.IotCentral\\src\\Generated"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "42fdd45e761f87132e85ed77caf30d5cac81aee5"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -