diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml index a336d5ebe501..4e4b053b3925 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml @@ -7,19 +7,19 @@ --> 4.0.0 - com.microsoft.azure.azure-mgmt-cognitiveservices-2016-02-01-preview + com.microsoft.azure.cognitiveservices.v2016_02_01_preview com.microsoft.azure azure-arm-parent - 1.2.0 + 1.1.0 ../../../pom.management.xml azure-mgmt-cognitiveservices - 1.0.0-beta-SNAPSHOT + 1.0.0-beta jar Microsoft Azure SDK for CognitiveServices Management This package contains Microsoft CognitiveServices Management SDK. - https://github.com/Azure/azure-libraries-for-java + https://github.com/Azure/azure-sdk-for-java The MIT License (MIT) @@ -28,8 +28,8 @@ - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccount.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccount.java index 3aae651135f3..df146dbf9891 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccount.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccount.java @@ -10,14 +10,15 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; import com.microsoft.azure.arm.resources.models.HasResourceGroup; import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.model.Updatable; import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; -import com.microsoft.azure.arm.resources.models.GroupableResourceCore; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.implementation.CognitiveServicesManager; +import java.util.Map; import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.implementation.CognitiveServicesAccountInner; /** @@ -77,7 +78,9 @@ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup, Resource.Defin /** * The template for a CognitiveServicesAccount update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithSku, UpdateStages.WithTags { } /** * Grouping of CognitiveServicesAccount update stages. */ interface UpdateStages { + /** + * The stage of the cognitiveservicesaccount update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku the sku parameter value + * @return the next update stage + */ + Update withSku(Sku sku); + } + + /** + * The stage of the cognitiveservicesaccount update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters + * @return the next update stage + */ + Update withTags(Map tags); + } + } } diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountCreateParameters.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountCreateParameters.java index d20ce32cd4bf..da53e191819f 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountCreateParameters.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountCreateParameters.java @@ -79,7 +79,7 @@ public CognitiveServicesAccountCreateParameters withSku(Sku sku) { } /** - * Get the kind value. + * Get required. Indicates the type of cognitive service account. Possible values include: 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'. * * @return the kind value */ @@ -88,7 +88,7 @@ public Kind kind() { } /** - * Set the kind value. + * Set required. Indicates the type of cognitive service account. Possible values include: 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'. * * @param kind the kind value to set * @return the CognitiveServicesAccountCreateParameters object itself. @@ -99,7 +99,7 @@ public CognitiveServicesAccountCreateParameters withKind(Kind kind) { } /** - * Get the location value. + * Get 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 region of a resource cannot be changed once it is created, but if an identical geo region is specified on update the request will succeed. * * @return the location value */ @@ -108,7 +108,7 @@ public String location() { } /** - * Set the location value. + * Set 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 region of a resource cannot be changed once it is created, but if an identical geo region is specified on update the request will succeed. * * @param location the location value to set * @return the CognitiveServicesAccountCreateParameters object itself. @@ -119,7 +119,7 @@ public CognitiveServicesAccountCreateParameters withLocation(String location) { } /** - * Get the tags value. + * Get gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. * * @return the tags value */ @@ -128,7 +128,7 @@ public Map tags() { } /** - * Set the tags value. + * Set gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. * * @param tags the tags value to set * @return the CognitiveServicesAccountCreateParameters object itself. @@ -139,7 +139,7 @@ public CognitiveServicesAccountCreateParameters withTags(Map tag } /** - * Get the properties value. + * Get must exist in the request. Must not be null. * * @return the properties value */ @@ -148,7 +148,7 @@ public Object properties() { } /** - * Set the properties value. + * Set must exist in the request. Must not be null. * * @param properties the properties value to set * @return the CognitiveServicesAccountCreateParameters object itself. diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountUpdateParameters.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountUpdateParameters.java index 436d7281a53b..da50a104060f 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountUpdateParameters.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccountUpdateParameters.java @@ -52,7 +52,7 @@ public CognitiveServicesAccountUpdateParameters withSku(Sku sku) { } /** - * Get the tags value. + * Get gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. * * @return the tags value */ @@ -61,7 +61,7 @@ public Map tags() { } /** - * Set the tags value. + * Set gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. * * @param tags the tags value to set * @return the CognitiveServicesAccountUpdateParameters object itself. diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccounts.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccounts.java index a9bd74564e7d..51c967431057 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccounts.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesAccounts.java @@ -16,6 +16,11 @@ * Type representing CognitiveServicesAccounts. */ public interface CognitiveServicesAccounts { + /** + * Begins definition for a new Account resource. + * @param name resource name. + * @return the first stage of the new Account definition. + */ CognitiveServicesAccount.DefinitionStages.Blank defineAccount(String name); /** @@ -59,7 +64,7 @@ public interface CognitiveServicesAccounts { * Lists the account keys for the specified Cognitive Services account. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of the cognitive services account within the specified resource group. Congitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param accountName The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesResourceAndSku.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesResourceAndSku.java index 7a9fa2080660..3cbacce9ff43 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesResourceAndSku.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/CognitiveServicesResourceAndSku.java @@ -27,7 +27,7 @@ public class CognitiveServicesResourceAndSku { private Sku sku; /** - * Get the resourceType value. + * Get resource Namespace and Type. * * @return the resourceType value */ @@ -36,7 +36,7 @@ public String resourceType() { } /** - * Set the resourceType value. + * Set resource Namespace and Type. * * @param resourceType the resourceType value to set * @return the CognitiveServicesResourceAndSku object itself. diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/ErrorBody.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/ErrorBody.java index be37d00ea466..077d930350d7 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/ErrorBody.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/ErrorBody.java @@ -27,7 +27,7 @@ public class ErrorBody { private String message; /** - * Get the code value. + * Get error code. * * @return the code value */ @@ -36,7 +36,7 @@ public String code() { } /** - * Set the code value. + * Set error code. * * @param code the code value to set * @return the ErrorBody object itself. @@ -47,7 +47,7 @@ public ErrorBody withCode(String code) { } /** - * Get the message value. + * Get error message. * * @return the message value */ @@ -56,7 +56,7 @@ public String message() { } /** - * Set the message value. + * Set error message. * * @param message the message value to set * @return the ErrorBody object itself. diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/RegenerateKeyParameters.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/RegenerateKeyParameters.java index 565f318c28a2..e1e4e5a4a7d0 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/RegenerateKeyParameters.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/RegenerateKeyParameters.java @@ -22,7 +22,7 @@ public class RegenerateKeyParameters { private KeyName keyName; /** - * Get the keyName value. + * Get key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'. * * @return the keyName value */ @@ -31,7 +31,7 @@ public KeyName keyName() { } /** - * Set the keyName value. + * Set key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'. * * @param keyName the keyName value to set * @return the RegenerateKeyParameters object itself. diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/Sku.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/Sku.java index ea67223475e3..f57a04e25728 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/Sku.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/Sku.java @@ -30,7 +30,7 @@ public class Sku { private SkuTier tier; /** - * Get the name value. + * Get 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'. * * @return the name value */ @@ -39,7 +39,7 @@ public SkuName name() { } /** - * Set the name value. + * Set 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'. * * @param name the name value to set * @return the Sku object itself. @@ -50,7 +50,7 @@ public Sku withName(SkuName name) { } /** - * Get the tier value. + * Get gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard', 'Premium'. * * @return the tier value */ diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java index 9cf0351b4e40..525a6e54eecc 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java @@ -23,7 +23,7 @@ public class CognitiveServicesAccountEnumerateSkusResultInner { private List value; /** - * Get the value value. + * Get gets the list of Cognitive Services accounts and their properties. * * @return the value value */ diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountImpl.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountImpl.java index 0889608f5297..677c972aa20e 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountImpl.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountImpl.java @@ -11,16 +11,20 @@ import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.CognitiveServicesAccount; import rx.Observable; +import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.Sku; +import java.util.Map; import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.CognitiveServicesAccountCreateParameters; import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.ProvisioningState; -import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.Sku; import com.microsoft.azure.management.cognitiveservices.v2016_02_01_preview.Kind; import rx.functions.Func1; class CognitiveServicesAccountImpl extends GroupableResourceCoreImpl implements CognitiveServicesAccount, CognitiveServicesAccount.Definition, CognitiveServicesAccount.Update { + private Sku usku; + private Map utags; private CognitiveServicesAccountCreateParameters createParameter; CognitiveServicesAccountImpl(String name, CognitiveServicesAccountInner inner, CognitiveServicesManager manager) { super(name, inner, manager); + this.usku = new Sku(); this.createParameter = new CognitiveServicesAccountCreateParameters(); } @@ -43,7 +47,7 @@ public CognitiveServicesAccountInner call(CognitiveServicesAccountInner resource @Override public Observable updateResourceAsync() { CognitiveServicesAccountsInner client = this.manager().inner().cognitiveServicesAccounts(); - return client.updateAsync(this.resourceGroupName(), this.name()) + return client.updateAsync(this.resourceGroupName(), this.name(), this.usku, this.utags) .map(new Func1() { @Override public CognitiveServicesAccountInner call(CognitiveServicesAccountInner resource) { @@ -66,6 +70,7 @@ public boolean isInCreateMode() { } private void resetCreateUpdateParameters() { + this.usku = new Sku(); this.createParameter = new CognitiveServicesAccountCreateParameters(); } @@ -106,9 +111,19 @@ public CognitiveServicesAccountImpl withProperties(Object properties) { return this; } + @Override + public CognitiveServicesAccountImpl withTags(Map tags) { + this.utags = tags; + return this; + } + @Override public CognitiveServicesAccountImpl withSku(Sku sku) { - this.createParameter.withSku(sku); + if (isInCreateMode()) { + this.createParameter.withSku(sku); + } else { + this.usku = sku; + } return this; } diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountInner.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountInner.java index 23d2c7b85042..be9b50229fdb 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountInner.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountInner.java @@ -53,7 +53,7 @@ public class CognitiveServicesAccountInner extends Resource { private Sku sku; /** - * Get the etag value. + * Get entity Tag. * * @return the etag value */ @@ -62,7 +62,7 @@ public String etag() { } /** - * Set the etag value. + * Set entity Tag. * * @param etag the etag value to set * @return the CognitiveServicesAccountInner object itself. @@ -73,7 +73,7 @@ public CognitiveServicesAccountInner withEtag(String etag) { } /** - * Get the kind value. + * Get type of cognitive service account. * * @return the kind value */ @@ -82,7 +82,7 @@ public String kind() { } /** - * Set the kind value. + * Set type of cognitive service account. * * @param kind the kind value to set * @return the CognitiveServicesAccountInner object itself. @@ -93,7 +93,7 @@ public CognitiveServicesAccountInner withKind(String kind) { } /** - * Get the provisioningState value. + * Get gets the status of the cognitive services account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded', 'Failed'. * * @return the provisioningState value */ @@ -102,7 +102,7 @@ public ProvisioningState provisioningState() { } /** - * Get the endpoint value. + * Get endpoint of the created account. * * @return the endpoint value */ @@ -111,7 +111,7 @@ public String endpoint() { } /** - * Set the endpoint value. + * Set endpoint of the created account. * * @param endpoint the endpoint value to set * @return the CognitiveServicesAccountInner object itself. diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountKeysInner.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountKeysInner.java index aaec76e3bab2..b3f633432c8b 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountKeysInner.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountKeysInner.java @@ -27,7 +27,7 @@ public class CognitiveServicesAccountKeysInner { private String key2; /** - * Get the key1 value. + * Get gets the value of key 1. * * @return the key1 value */ @@ -36,7 +36,7 @@ public String key1() { } /** - * Set the key1 value. + * Set gets the value of key 1. * * @param key1 the key1 value to set * @return the CognitiveServicesAccountKeysInner object itself. @@ -47,7 +47,7 @@ public CognitiveServicesAccountKeysInner withKey1(String key1) { } /** - * Get the key2 value. + * Get gets the value of key 2. * * @return the key2 value */ @@ -56,7 +56,7 @@ public String key2() { } /** - * Set the key2 value. + * Set gets the value of key 2. * * @param key2 the key2 value to set * @return the CognitiveServicesAccountKeysInner object itself. diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsImpl.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsImpl.java index 3b2655409739..c10b7fe9f5c8 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsImpl.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsImpl.java @@ -40,7 +40,7 @@ private CognitiveServicesAccountImpl wrapAccountModel(String name) { return new CognitiveServicesAccountImpl(name, new CognitiveServicesAccountInner(), this.manager()); } - private CognitiveServicesAccountImpl wrapModel(CognitiveServicesAccountInner inner) { + private CognitiveServicesAccountImpl wrapCognitiveServicesAccountModel(CognitiveServicesAccountInner inner) { return new CognitiveServicesAccountImpl(inner.name(), inner, manager()); } @@ -51,10 +51,14 @@ private Observable getCognitiveServicesAccountInn @Override public Observable getByResourceGroupAsync(String resourceGroupName, String name) { - return this.getCognitiveServicesAccountInnerUsingCognitiveServicesAccountsInnerAsync(resourceGroupName, name).map(new Func1 () { + return this.getCognitiveServicesAccountInnerUsingCognitiveServicesAccountsInnerAsync(resourceGroupName, name).flatMap(new Func1> () { @Override - public CognitiveServicesAccount call(CognitiveServicesAccountInner inner) { - return wrapModel(inner); + public Observable call(CognitiveServicesAccountInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((CognitiveServicesAccount)wrapCognitiveServicesAccountModel(inner)); + } } }); } @@ -72,7 +76,7 @@ public Observable call(Page() { @Override public CognitiveServicesAccount call(CognitiveServicesAccountInner inner) { - return wrapModel(inner); + return wrapCognitiveServicesAccountModel(inner); } }); } @@ -90,7 +94,7 @@ public Observable call(Page() { @Override public CognitiveServicesAccount call(CognitiveServicesAccountInner inner) { - return wrapModel(inner); + return wrapCognitiveServicesAccountModel(inner); } }); } diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsInner.java b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsInner.java index 9d3852c459d9..e0a31cda47e8 100644 --- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsInner.java +++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsInner.java @@ -730,7 +730,7 @@ private ServiceResponse> listDelegate(Re * Lists the account keys for the specified Cognitive Services account. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of the cognitive services account within the specified resource group. Congitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param accountName The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -744,7 +744,7 @@ public CognitiveServicesAccountKeysInner listKeys(String resourceGroupName, Stri * Lists the account keys for the specified Cognitive Services account. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of the cognitive services account within the specified resource group. Congitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param accountName The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -757,7 +757,7 @@ public ServiceFuture listKeysAsync(String res * Lists the account keys for the specified Cognitive Services account. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param accountName The name of the cognitive services account within the specified resource group. Congitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param accountName The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CognitiveServicesAccountKeysInner object */ @@ -774,7 +774,7 @@ public CognitiveServicesAccountKeysInner call(ServiceResponse