From f41b3742fe1e08ba23951cdd559f0ee439007696 Mon Sep 17 00:00:00 2001 From: Yuan Yang Date: Thu, 13 Dec 2018 18:05:52 -0800 Subject: [PATCH] Change SkuName and Kind to strings. --- ...ognitiveServicesManagementTestUtilities.cs | 6 +- .../Tests/CognitiveServicesAccountTests.cs | 96 +++++++++---------- .../CheckSkuAvailabilityOperations.cs | 7 +- ...heckSkuAvailabilityOperationsExtensions.cs | 14 +-- .../ICheckSkuAvailabilityOperations.cs | 8 +- .../Models/CheckSkuAvailabilityParameter.cs | 17 +--- .../Models/CheckSkuAvailabilityResult.cs | 26 +---- ...ognitiveServicesAccountCreateParameters.cs | 16 +--- .../Generated/Models/Kind.cs | 39 -------- .../Generated/Models/Sku.cs | 6 +- .../Generated/Models/SkuName.cs | 31 ------ ...kInfo_CognitiveServicesManagementClient.cs | 11 +++ ....Azure.Management.CognitiveServices.csproj | 8 +- .../Properties/AssemblyInfo.cs | 4 +- .../cognitiveservices_resource-manager.txt | 16 +--- 15 files changed, 90 insertions(+), 215 deletions(-) delete mode 100644 src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Kind.cs delete mode 100644 src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/SkuName.cs diff --git a/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Helpers/CognitiveServicesManagementTestUtilities.cs b/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Helpers/CognitiveServicesManagementTestUtilities.cs index ba4f0dc98db3d..57c2d477e5ad1 100644 --- a/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Helpers/CognitiveServicesManagementTestUtilities.cs +++ b/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Helpers/CognitiveServicesManagementTestUtilities.cs @@ -25,8 +25,8 @@ public static class CognitiveServicesManagementTestUtilities // These are used to create default accounts public static string DefaultLocation = IsTestTenant ? null : "westus"; - public const string DefaultSkuName = SkuName.S1; - public const string DefaultKind = Kind.TextAnalytics; + public const string DefaultSkuName = "S1"; + public const string DefaultKind = "TextAnalytics"; public static Dictionary DefaultTags = new Dictionary { {"key1","value1"}, @@ -111,7 +111,7 @@ public static string CreateCognitiveServicesAccount(CognitiveServicesManagementC return accountName; } - public static CognitiveServicesAccount CreateAndValidateAccountWithOnlyRequiredParameters(CognitiveServicesManagementClient cognitiveServicesMgmtClient, string rgName, string skuName, string accountType = Kind.TextAnalytics, string location = null) + public static CognitiveServicesAccount CreateAndValidateAccountWithOnlyRequiredParameters(CognitiveServicesManagementClient cognitiveServicesMgmtClient, string rgName, string skuName, string accountType = "TextAnalytics", string location = null) { // Create account with only required params var accountName = TestUtilities.GenerateName("csa"); diff --git a/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs b/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs index 5cdc37fa596c4..333c08b082f71 100644 --- a/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs +++ b/src/SDKs/CognitiveServices/management/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs @@ -46,10 +46,10 @@ public void CognitiveServicesAccountCreateTest() CognitiveServicesManagementTestUtilities.VerifyAccountProperties(account, true); // Create account with only required params, for each sku (but free, since we can't have two free accounts in the same subscription) - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S2); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S3); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S4); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S2"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S3"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S4"); } } @@ -66,22 +66,22 @@ public void CognitiveServicesAccountCreateAllApisTest() // Create resource group var rgname = CognitiveServicesManagementTestUtilities.CreateResourceGroup(resourcesClient); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.BingAutosuggestv7, "global"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.BingCustomSearch, "global"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.BingSearchv7, "global"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.BingSpeech, "global"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.BingSpellCheckv7, "global"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.ComputerVision, "westus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.ContentModerator, "westus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.CustomSpeech, "westus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.CustomVisionPrediction, "southcentralus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.CustomVisionTraining, "southcentralus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.Face, "westus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.LUIS, "westus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.SpeakerRecognition, "westus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.SpeechTranslation, "global"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.TextAnalytics, "westus"); - CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.TextTranslation, "global"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "Bing.Autosuggest.v7", "global"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "Bing.CustomSearch", "global"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "Bing.Search.v7", "global"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "Bing.Speech", "global"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "Bing.SpellCheck.v7", "global"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "ComputerVision", "westus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "ContentModerator", "westus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "CustomSpeech", "westus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "CustomVision.Prediction", "southcentralus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "CustomVision.Training", "southcentralus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "Face", "westus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "LUIS", "westus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "SpeakerRecognition", "westus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "SpeechTranslation", "global"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "TextAnalytics", "westus"); + CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "TextTranslation", "global"); } } @@ -126,17 +126,17 @@ public void CognitiveServicesAccountCreateAndGetDifferentSkusTest() var rgname = CognitiveServicesManagementTestUtilities.CreateResourceGroup(resourcesClient); // Default parameters - var f0Account = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.F0, Kind.TextAnalytics); - var s1Account = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S1, Kind.TextAnalytics); + var f0Account = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "F0", "TextAnalytics"); + var s1Account = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S1", "TextAnalytics"); var f0Properties = cognitiveServicesMgmtClient.Accounts.GetProperties(rgname, f0Account.Name); - Assert.Equal(SkuName.F0, f0Properties.Sku.Name); - Assert.Equal(Kind.TextAnalytics.ToString(), f0Properties.Kind); + Assert.Equal("F0", f0Properties.Sku.Name); + Assert.Equal("TextAnalytics".ToString(), f0Properties.Kind); var s1Properties = cognitiveServicesMgmtClient.Accounts.GetProperties(rgname, s1Account.Name); - Assert.Equal(SkuName.S1, s1Properties.Sku.Name); - Assert.Equal(Kind.TextAnalytics.ToString(), s1Properties.Kind); + Assert.Equal("S1", s1Properties.Sku.Name); + Assert.Equal("TextAnalytics".ToString(), s1Properties.Kind); } } @@ -304,16 +304,16 @@ public void CognitiveServicesAccountUpdateWithCreateTest() var rgname = CognitiveServicesManagementTestUtilities.CreateResourceGroup(resourcesClient); // Create cognitive services account - var createdAccount = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S2, Kind.TextAnalytics); + var createdAccount = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S2", "TextAnalytics"); var accountName = createdAccount.Name; // Update SKU - var account = cognitiveServicesMgmtClient.Accounts.Update(rgname, accountName, new Sku { Name = SkuName.S1 }); - Assert.Equal(SkuName.S1, account.Sku.Name); + var account = cognitiveServicesMgmtClient.Accounts.Update(rgname, accountName, new Sku { Name = "S1" }); + Assert.Equal("S1", account.Sku.Name); // Validate var fetchedAccount = cognitiveServicesMgmtClient.Accounts.GetProperties(rgname, accountName); - Assert.Equal(SkuName.S1, fetchedAccount.Sku.Name); + Assert.Equal("S1", fetchedAccount.Sku.Name); var newTags = new Dictionary { @@ -327,7 +327,7 @@ public void CognitiveServicesAccountUpdateWithCreateTest() Assert.Equal(newTags.Count, account.Tags.Count); // Validate fetchedAccount = cognitiveServicesMgmtClient.Accounts.GetProperties(rgname, accountName); - Assert.Equal(SkuName.S1, fetchedAccount.Sku.Name); + Assert.Equal("S1", fetchedAccount.Sku.Name); Assert.Equal(newTags.Count, fetchedAccount.Tags.Count()); Assert.Collection(fetchedAccount.Tags, (keyValue) => { Assert.Equal("key3", keyValue.Key); Assert.Equal("value3", keyValue.Value); }, @@ -351,7 +351,7 @@ public void CognitiveServicesAccountEnumerateSkusTest() var rgname = CognitiveServicesManagementTestUtilities.CreateResourceGroup(resourcesClient); // Create cognitive services account - var createdAccount = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S3, Kind.TextAnalytics); + var createdAccount = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S3", "TextAnalytics"); var accountName = createdAccount.Name; // Enumerate SKUs @@ -363,12 +363,12 @@ public void CognitiveServicesAccountEnumerateSkusTest() Assert.Equal($"{c_resourceNamespace}/{c_resourceType}", skuList.Value.Select(x => x.ResourceType).First()); Assert.Collection(skuList.Value.Select(x => x.Sku), - (sku) => { Assert.Equal(SkuName.F0, sku.Name); Assert.Equal(SkuTier.Free, sku.Tier); }, - (sku) => { Assert.Equal(SkuName.S0, sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, - (sku) => { Assert.Equal(SkuName.S1, sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, - (sku) => { Assert.Equal(SkuName.S2, sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, - (sku) => { Assert.Equal(SkuName.S3, sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, - (sku) => { Assert.Equal(SkuName.S4, sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); } + (sku) => { Assert.Equal("F0", sku.Name); Assert.Equal(SkuTier.Free, sku.Tier); }, + (sku) => { Assert.Equal("S0", sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, + (sku) => { Assert.Equal("S1", sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, + (sku) => { Assert.Equal("S2", sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, + (sku) => { Assert.Equal("S3", sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); }, + (sku) => { Assert.Equal("S4", sku.Name); Assert.Equal(SkuTier.Standard, sku.Tier); } ); } } @@ -390,8 +390,8 @@ public void CognitiveServicesCreateAccountErrorTest() var accountName = TestUtilities.GenerateName("csa"); var parameters = new CognitiveServicesAccountCreateParameters { - Sku = new Sku { Name = SkuName.F0 }, - Kind = Kind.ComputerVision, + Sku = new Sku { Name = "F0" }, + Kind = "ComputerVision", Location = CognitiveServicesManagementTestUtilities.DefaultLocation, Properties = new object(), }; @@ -423,7 +423,7 @@ public void CognitiveServicesCreateAccountErrorTest2() var accountName = TestUtilities.GenerateName("csa"); var nonExistApiPara = new CognitiveServicesAccountCreateParameters { - Sku = new Sku { Name = SkuName.F0 }, + Sku = new Sku { Name = "F0" }, Kind = "NonExistAPI", Location = CognitiveServicesManagementTestUtilities.DefaultLocation, Properties = new object(), @@ -432,7 +432,7 @@ public void CognitiveServicesCreateAccountErrorTest2() var nonExistSkuPara = new CognitiveServicesAccountCreateParameters { Sku = new Sku { Name = "N0" }, - Kind = Kind.Face, + Kind = "Face", Location = CognitiveServicesManagementTestUtilities.DefaultLocation, Properties = new object(), }; @@ -488,7 +488,7 @@ public void CognitiveServicesUpdateAccountErrorTest() var rgname = CognitiveServicesManagementTestUtilities.CreateResourceGroup(resourcesClient); // Create cognitive services account - var createdAccount = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, SkuName.S0, Kind.Face); + var createdAccount = CognitiveServicesManagementTestUtilities.CreateAndValidateAccountWithOnlyRequiredParameters(cognitiveServicesMgmtClient, rgname, "S0", "Face"); var accountName = createdAccount.Name; // try to update non-existent account @@ -502,7 +502,7 @@ public void CognitiveServicesUpdateAccountErrorTest() // Update with a SKU which doesn't exist CognitiveServicesManagementTestUtilities.ValidateExpectedException( - () => cognitiveServicesMgmtClient.Accounts.Update(rgname, accountName, new Sku(SkuName.P1)), + () => cognitiveServicesMgmtClient.Accounts.Update(rgname, accountName, new Sku("P1")), "InvalidSkuId"); } } @@ -585,8 +585,8 @@ public void CognitiveServicesCheckSkuAvailabilityTest() var skus = cognitiveServicesMgmtClient.CheckSkuAvailability.List( location: "westus", - skus: new List() { SkuName.S0 }, - kind: Kind.Face, + skus: new List() { "S0" }, + kind: "Face", type: $"{c_resourceNamespace}/{c_resourceType}"); Assert.NotNull(skus); @@ -630,8 +630,8 @@ public void CognitiveServicesAccountMinMaxNameLengthTest() var parameters = new CognitiveServicesAccountCreateParameters { - Sku = new Sku { Name = SkuName.S0 }, - Kind = Kind.Face, + Sku = new Sku { Name = "S0" }, + Kind = "Face", Location = CognitiveServicesManagementTestUtilities.DefaultLocation, Properties = new object(), }; diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs index 9d73ba2cc8793..7dac9dd94e72a 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs @@ -60,12 +60,7 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client /// The SKU of the resource. /// /// - /// The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', - /// 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', - /// 'ComputerVision', 'ContentModerator', 'CustomSpeech', - /// 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', 'Face', - /// 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', - /// 'TextAnalytics', 'TextTranslation', 'WebLM' + /// The Kind of the resource. /// /// /// The Type of the resource. diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs index a383e9df3e24e..b0c88b30e7b20 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs @@ -36,12 +36,7 @@ public static partial class CheckSkuAvailabilityOperationsExtensions /// The SKU of the resource. /// /// - /// The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', - /// 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', - /// 'ComputerVision', 'ContentModerator', 'CustomSpeech', - /// 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', 'Face', - /// 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', - /// 'TextAnalytics', 'TextTranslation', 'WebLM' + /// The Kind of the resource. /// /// /// The Type of the resource. @@ -64,12 +59,7 @@ public static CheckSkuAvailabilityResultList List(this ICheckSkuAvailabilityOper /// The SKU of the resource. /// /// - /// The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', - /// 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', - /// 'ComputerVision', 'ContentModerator', 'CustomSpeech', - /// 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', 'Face', - /// 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', - /// 'TextAnalytics', 'TextTranslation', 'WebLM' + /// The Kind of the resource. /// /// /// The Type of the resource. diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs index 9abe19011a2c1..3ae4bc6c63185 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs @@ -33,13 +33,7 @@ public partial interface ICheckSkuAvailabilityOperations /// The SKU of the resource. /// /// - /// The Kind of the resource. Possible values include: - /// 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', - /// 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', - /// 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', - /// 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', - /// 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', - /// 'TextTranslation', 'WebLM' + /// The Kind of the resource. /// /// /// The Type of the resource. diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs index c3cac62d0eec6..e0450b29c67bb 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs @@ -35,14 +35,7 @@ public CheckSkuAvailabilityParameter() /// class. /// /// The SKU of the resource. - /// The Kind of the resource. Possible values - /// include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', - /// 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', - /// 'ComputerVision', 'ContentModerator', 'CustomSpeech', - /// 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', - /// 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', - /// 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', - /// 'WebLM' + /// The Kind of the resource. /// The Type of the resource. public CheckSkuAvailabilityParameter(IList skus, string kind, string type) { @@ -64,13 +57,7 @@ public CheckSkuAvailabilityParameter(IList skus, string kind, string typ public IList Skus { get; set; } /// - /// Gets or sets the Kind of the resource. Possible values include: - /// 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', - /// 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', - /// 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', - /// 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', - /// 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', - /// 'TextTranslation', 'WebLM' + /// Gets or sets the Kind of the resource. /// [JsonProperty(PropertyName = "kind")] public string Kind { get; set; } diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs index c761be02911eb..60ecdfe561ccf 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs @@ -29,18 +29,10 @@ public CheckSkuAvailabilityResult() /// /// Initializes a new instance of the CheckSkuAvailabilityResult class. /// - /// The Kind of the resource. Possible values - /// include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', - /// 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', - /// 'ComputerVision', 'ContentModerator', 'CustomSpeech', - /// 'CustomVision.Prediction', 'CustomVision.Training', 'Emotion', - /// 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', - /// 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', - /// 'WebLM' + /// The Kind of the resource. /// The Type of the resource. - /// The SKU of Cognitive Services account. - /// Possible values include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', - /// 'S3', 'S4', 'S5', 'S6' + /// The SKU of Cognitive Services + /// account. /// Indicates the given SKU is available or /// not. /// Reason why the SKU is not available. @@ -62,13 +54,7 @@ public CheckSkuAvailabilityResult() partial void CustomInit(); /// - /// Gets or sets the Kind of the resource. Possible values include: - /// 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', - /// 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', - /// 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', - /// 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', - /// 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', - /// 'TextTranslation', 'WebLM' + /// Gets or sets the Kind of the resource. /// [JsonProperty(PropertyName = "kind")] public string Kind { get; set; } @@ -80,9 +66,7 @@ public CheckSkuAvailabilityResult() public string Type { get; set; } /// - /// Gets or sets the SKU of Cognitive Services account. Possible values - /// include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', - /// 'S5', 'S6' + /// Gets or sets the SKU of Cognitive Services account. /// [JsonProperty(PropertyName = "skuName")] public string SkuName { get; set; } diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs index f987a3ab94fcd..937a85194926c 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs @@ -36,14 +36,8 @@ public CognitiveServicesAccountCreateParameters() /// /// Required. Gets or sets the SKU of the /// resource. - /// Required. Gets or sets the Kind of the resource. - /// Possible values include: 'Bing.Autosuggest.v7', - /// 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', - /// 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', - /// 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', - /// 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', - /// 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', - /// 'WebLM' + /// Required. Gets or sets the Kind of the + /// resource. /// Required. Gets or sets the location of the /// resource. This will be one of the supported and registered Azure /// Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo @@ -81,12 +75,6 @@ public CognitiveServicesAccountCreateParameters() /// /// Gets or sets required. Gets or sets the Kind of the resource. - /// Possible values include: 'Bing.Autosuggest.v7', - /// 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', - /// 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', - /// 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', - /// 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', - /// 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' /// [JsonProperty(PropertyName = "kind")] public string Kind { get; set; } diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Kind.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Kind.cs deleted file mode 100644 index accaff7cd9ebf..0000000000000 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Kind.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// 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.CognitiveServices.Models -{ - - /// - /// Defines values for Kind. - /// - public static class Kind - { - public const string BingAutosuggestv7 = "Bing.Autosuggest.v7"; - public const string BingCustomSearch = "Bing.CustomSearch"; - public const string BingSearchv7 = "Bing.Search.v7"; - public const string BingSpeech = "Bing.Speech"; - public const string BingSpellCheckv7 = "Bing.SpellCheck.v7"; - public const string ComputerVision = "ComputerVision"; - public const string ContentModerator = "ContentModerator"; - public const string CustomSpeech = "CustomSpeech"; - public const string CustomVisionPrediction = "CustomVision.Prediction"; - public const string CustomVisionTraining = "CustomVision.Training"; - public const string Emotion = "Emotion"; - public const string Face = "Face"; - public const string LUIS = "LUIS"; - public const string QnAMaker = "QnAMaker"; - public const string SpeakerRecognition = "SpeakerRecognition"; - public const string SpeechTranslation = "SpeechTranslation"; - public const string TextAnalytics = "TextAnalytics"; - public const string TextTranslation = "TextTranslation"; - public const string WebLM = "WebLM"; - } -} diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Sku.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Sku.cs index 535ef8c2cd9ee..c6c05888028e9 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Sku.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/Sku.cs @@ -31,8 +31,7 @@ public Sku() /// Initializes a new instance of the Sku class. /// /// Gets or sets the sku name. Required for account - /// creation, optional for update. Possible values include: 'F0', 'P0', - /// 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + /// creation, optional for update. /// Gets the sku tier. This is based on the SKU /// name. Possible values include: 'Free', 'Standard', /// 'Premium' @@ -50,8 +49,7 @@ public Sku() /// /// Gets or sets the sku name. Required for account creation, optional - /// for update. Possible values include: 'F0', 'P0', 'P1', 'P2', 'S0', - /// 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + /// for update. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/SkuName.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/SkuName.cs deleted file mode 100644 index 7841a3a05fa1c..0000000000000 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/SkuName.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// 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.CognitiveServices.Models -{ - - /// - /// Defines values for SkuName. - /// - public static class SkuName - { - public const string F0 = "F0"; - public const string P0 = "P0"; - public const string P1 = "P1"; - public const string P2 = "P2"; - public const string S0 = "S0"; - public const string S1 = "S1"; - public const string S2 = "S2"; - public const string S3 = "S3"; - public const string S4 = "S4"; - public const string S5 = "S5"; - public const string S6 = "S6"; - } -} diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs index 14cb92cbea3b2..4f78150a3d412 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs @@ -26,5 +26,16 @@ public static IEnumerable> ApiInfo_CognitiveServic }.AsEnumerable(); } } + // BEGIN: Code Generation Metadata Section + public static readonly String AutoRestVersion = "latest"; + public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\Github\\azure-sdk-for-net\\src\\SDKs"; + public static readonly String GithubForkName = "Azure"; + public static readonly String GithubBranchName = "master"; + public static readonly String GithubCommidId = "a5fd13fd813e416fc4500310537491482ad401b3"; + public static readonly String CodeGenerationErrors = ""; + public static readonly String GithubRepoName = "azure-rest-api-specs"; + // END: Code Generation Metadata Section } } + diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj index 12b3c5132c09e..75285d22e2272 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj @@ -6,10 +6,14 @@ Microsoft.Azure.Management.CognitiveServices Microsoft Azure Management Cognitive Services Library - 4.1.1 + 5.0.0 Microsoft.Azure.Management.CognitiveServices Cognitive Services management;Cognitive Services; - Taking dependency on 10.0.3 version of Newtonsoft nuget package. + + + net452;netstandard1.4 diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Properties/AssemblyInfo.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Properties/AssemblyInfo.cs index 15a2e53777828..039fcd3d0e583 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Properties/AssemblyInfo.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ [assembly: AssemblyTitle("Microsoft Azure Cognitive Services Management Library")] [assembly: AssemblyDescription("Provides Microsoft Azure Cognitive Services management functions for managing Microsoft Azure Cognitive Services accounts.")] -[assembly: AssemblyVersion("4.0.0.0")] -[assembly: AssemblyFileVersion("4.1.1.0")] +[assembly: AssemblyVersion("5.0.0.0")] +[assembly: AssemblyFileVersion("5.0.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] diff --git a/src/SDKs/_metadata/cognitiveservices_resource-manager.txt b/src/SDKs/_metadata/cognitiveservices_resource-manager.txt index 7378108a34c04..c738e7f1b5e8e 100644 --- a/src/SDKs/_metadata/cognitiveservices_resource-manager.txt +++ b/src/SDKs/_metadata/cognitiveservices_resource-manager.txt @@ -3,18 +3,12 @@ AutoRest installed successfully. 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/cognitiveservices/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\azure-sdk-for-net\src\SDKs -2018-09-07 22:25:36 UTC -1) azure-rest-api-specs repository information +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\Github\azure-sdk-for-net\src\SDKs +2018-12-14 01:25:15 UTC +Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 7c857063e4b451c7209aa300f01e72665097eaac - -2) AutoRest information +Commit: a5fd13fd813e416fc4500310537491482ad401b3 +AutoRest information Requested version: latest Bootstrapper version: autorest@2.0.4283 - - -Latest installed version: - -