From 4e1a7f0a340d97b4a65fe92c736feb11a9c87fd8 Mon Sep 17 00:00:00 2001 From: "David R. Williamson" Date: Wed, 5 May 2021 13:23:39 -0700 Subject: [PATCH] Regenerated from an updated 2020-03-01 swagger that removed faulty property validation (#20862) --- .../mgmtmetadata/iothub_resource-manager.txt | 4 ++-- .../Microsoft.Azure.Management.IotHub.sln | 5 +++++ .../src/Generated/IIotHubResourceOperations.cs | 8 ++++++-- .../src/Generated/IotHubResourceOperations.cs | 8 ++++++-- .../IotHubResourceOperationsExtensions.cs | 16 ++++++++++++---- .../src/Generated/Models/GroupIdInformation.cs | 7 ------- .../Models/PrivateEndpointConnection.cs | 7 ------- .../src/Generated/SdkInfo_iotHubClient.cs | 2 +- .../src/Microsoft.Azure.Management.IotHub.csproj | 4 ++-- .../src/Properties/AssemblyInfo.cs | 4 ++-- 10 files changed, 36 insertions(+), 29 deletions(-) diff --git a/eng/mgmt/mgmtmetadata/iothub_resource-manager.txt b/eng/mgmt/mgmtmetadata/iothub_resource-manager.txt index 89fe1f808106..73be6ed6b732 100644 --- a/eng/mgmt/mgmtmetadata/iothub_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/iothub_resource-manager.txt @@ -4,11 +4,11 @@ Commencing code generation Generating CSharp code Executing AutoRest command cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/iothub/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-03 --csharp-sdks-folder=C:\code\Azure\asfn1\sdk -2021-02-17 20:16:51 UTC +2021-05-05 18:24:00 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 55131eaf8fb4722171769ba175791ad45ae3d969 +Commit: a394eccc2ce26369cacbc113cf0c3a9c9501e689 AutoRest information Requested version: v2 Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/Microsoft.Azure.Management.IotHub.sln b/sdk/iothub/Microsoft.Azure.Management.IotHub/Microsoft.Azure.Management.IotHub.sln index f8d2a00c5264..d295377d6146 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/Microsoft.Azure.Management.IotHub.sln +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/Microsoft.Azure.Management.IotHub.sln @@ -7,6 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.IotHub", "src\Microsoft.Azure.Management.IotHub.csproj", "{6D87768F-C148-4850-AA06-B6D0E0319462}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A2940BEF-649E-4B28-A11A-696F3A66E981}" + ProjectSection(SolutionItems) = preProject + AzSdk.RP.props = AzSdk.RP.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IIotHubResourceOperations.cs b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IIotHubResourceOperations.cs index c3c39852fe78..5c9e8471f875 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IIotHubResourceOperations.cs +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IIotHubResourceOperations.cs @@ -58,7 +58,9 @@ public partial interface IIotHubResourceOperations /// Create or update the metadata of an Iot hub. The usual pattern to /// modify a property is to retrieve the IoT hub metadata and security /// metadata, and then combine them with the modified values in a new - /// body to update the IoT hub. + /// body to update the IoT hub. If certain properties are missing in + /// the JSON, updating IoT Hub may cause these values to fallback to + /// default, which may lead to unexpected behavior. /// /// /// The name of the resource group that contains the IoT hub. @@ -742,7 +744,9 @@ public partial interface IIotHubResourceOperations /// Create or update the metadata of an Iot hub. The usual pattern to /// modify a property is to retrieve the IoT hub metadata and security /// metadata, and then combine them with the modified values in a new - /// body to update the IoT hub. + /// body to update the IoT hub. If certain properties are missing in + /// the JSON, updating IoT Hub may cause these values to fallback to + /// default, which may lead to unexpected behavior. /// /// /// The name of the resource group that contains the IoT hub. diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperations.cs b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperations.cs index a97deac297ee..f2a475573d47 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperations.cs +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperations.cs @@ -251,7 +251,9 @@ internal IotHubResourceOperations(IotHubClient client) /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and /// then combine them with the modified values in a new body to update the IoT - /// hub. + /// hub. If certain properties are missing in the JSON, updating IoT Hub may + /// cause these values to fallback to default, which may lead to unexpected + /// behavior. /// /// /// The name of the resource group that contains the IoT hub. @@ -4147,7 +4149,9 @@ internal IotHubResourceOperations(IotHubClient client) /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and /// then combine them with the modified values in a new body to update the IoT - /// hub. + /// hub. If certain properties are missing in the JSON, updating IoT Hub may + /// cause these values to fallback to default, which may lead to unexpected + /// behavior. /// /// /// The name of the resource group that contains the IoT hub. diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperationsExtensions.cs b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperationsExtensions.cs index 6b8d1af18367..806d65620779 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperationsExtensions.cs +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/IotHubResourceOperationsExtensions.cs @@ -76,7 +76,9 @@ public static IotHubDescription Get(this IIotHubResourceOperations operations, s /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and /// then combine them with the modified values in a new body to update the IoT - /// hub. + /// hub. If certain properties are missing in the JSON, updating IoT Hub may + /// cause these values to fallback to default, which may lead to unexpected + /// behavior. /// /// /// The operations group for this extension method. @@ -106,7 +108,9 @@ public static IotHubDescription Get(this IIotHubResourceOperations operations, s /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and /// then combine them with the modified values in a new body to update the IoT - /// hub. + /// hub. If certain properties are missing in the JSON, updating IoT Hub may + /// cause these values to fallback to default, which may lead to unexpected + /// behavior. /// /// /// The operations group for this extension method. @@ -1205,7 +1209,9 @@ public static JobResponse ImportDevices(this IIotHubResourceOperations operation /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and /// then combine them with the modified values in a new body to update the IoT - /// hub. + /// hub. If certain properties are missing in the JSON, updating IoT Hub may + /// cause these values to fallback to default, which may lead to unexpected + /// behavior. /// /// /// The operations group for this extension method. @@ -1235,7 +1241,9 @@ public static JobResponse ImportDevices(this IIotHubResourceOperations operation /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and /// then combine them with the modified values in a new body to update the IoT - /// hub. + /// hub. If certain properties are missing in the JSON, updating IoT Hub may + /// cause these values to fallback to default, which may lead to unexpected + /// behavior. /// /// /// The operations group for this extension method. diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/GroupIdInformation.cs b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/GroupIdInformation.cs index a646ed0f9a27..ae44b57e636f 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/GroupIdInformation.cs +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/GroupIdInformation.cs @@ -82,13 +82,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); } - if (Name != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$")) - { - throw new ValidationException(ValidationRules.Pattern, "Name", "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$"); - } - } } } } diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/PrivateEndpointConnection.cs index be46ac71b2f9..c71e2a8372a4 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/PrivateEndpointConnection.cs +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/Models/PrivateEndpointConnection.cs @@ -83,13 +83,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); } - if (Name != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$")) - { - throw new ValidationException(ValidationRules.Pattern, "Name", "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$"); - } - } if (Properties != null) { Properties.Validate(); diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/SdkInfo_iotHubClient.cs b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/SdkInfo_iotHubClient.cs index 4a58d6c7b187..ca27599bee50 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/SdkInfo_iotHubClient.cs +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Generated/SdkInfo_iotHubClient.cs @@ -35,7 +35,7 @@ public static IEnumerable> ApiInfo_iotHubClient public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/iothub/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-03 --csharp-sdks-folder=C:\\code\\Azure\\asfn1\\sdk"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "55131eaf8fb4722171769ba175791ad45ae3d969"; + public static readonly String GithubCommidId = "a394eccc2ce26369cacbc113cf0c3a9c9501e689"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Microsoft.Azure.Management.IotHub.csproj b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Microsoft.Azure.Management.IotHub.csproj index e89cf1f2fcf8..1652b769e87a 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Microsoft.Azure.Management.IotHub.csproj +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Microsoft.Azure.Management.IotHub.csproj @@ -13,9 +13,9 @@ Provides management capabilities for Microsoft Azure Iot Hub. Microsoft Azure Iot Hub Management Microsoft.Azure.Management.IotHub - 3.0.0 + 3.0.1 Microsoft Azure IotHub;IotHub management;IotHub; - Updated to API version 2020-03-01 + Regenerated from an updated 2020-03-01 swagger that removed faulty property validation. diff --git a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Properties/AssemblyInfo.cs b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Properties/AssemblyInfo.cs index 9f892b7b1a8e..09c9cc003a55 100644 --- a/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Properties/AssemblyInfo.cs +++ b/sdk/iothub/Microsoft.Azure.Management.IotHub/src/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguage("en")] -[assembly: AssemblyVersion("3.0.0.0")] -[assembly: AssemblyFileVersion("3.0.0.0")] +[assembly: AssemblyVersion("3.0.1.0")] +[assembly: AssemblyFileVersion("3.0.1.0")]