diff --git a/cognitiveservices/resource-manager/v2017_04_18/pom.xml b/cognitiveservices/resource-manager/v2017_04_18/pom.xml index 550eaef6854ef..79c9125c3eaef 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/pom.xml +++ b/cognitiveservices/resource-manager/v2017_04_18/pom.xml @@ -7,19 +7,19 @@ --> 4.0.0 - com.microsoft.azure.azure-mgmt-cognitiveservices-2017-04-18 + com.microsoft.azure.cognitiveservices.v2017_04_18 com.microsoft.azure azure-arm-parent - 1.1.0 - ../../../pom.management.xml + 0.0.3-beta + ../../../pom.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 diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckDomainAvailabilityParameter.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckDomainAvailabilityParameter.java new file mode 100644 index 0000000000000..595a8de9e3158 --- /dev/null +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckDomainAvailabilityParameter.java @@ -0,0 +1,69 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.cognitiveservices.v2017_04_18; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Check Domain availability parameter. + */ +public class CheckDomainAvailabilityParameter { + /** + * The subdomain name to use. + */ + @JsonProperty(value = "subdomainName", required = true) + private String subdomainName; + + /** + * The Type of the resource. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Get the subdomain name to use. + * + * @return the subdomainName value + */ + public String subdomainName() { + return this.subdomainName; + } + + /** + * Set the subdomain name to use. + * + * @param subdomainName the subdomainName value to set + * @return the CheckDomainAvailabilityParameter object itself. + */ + public CheckDomainAvailabilityParameter withSubdomainName(String subdomainName) { + this.subdomainName = subdomainName; + return this; + } + + /** + * Get the Type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the Type of the resource. + * + * @param type the type value to set + * @return the CheckDomainAvailabilityParameter object itself. + */ + public CheckDomainAvailabilityParameter withType(String type) { + this.type = type; + return this; + } + +} diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityParameter.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityParameter.java index 0628af3df9eb4..7ba9af34d08b2 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityParameter.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityParameter.java @@ -19,19 +19,13 @@ public class CheckSkuAvailabilityParameter { * The SKU of the resource. */ @JsonProperty(value = "skus", required = true) - private List skus; + private List skus; /** - * 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. */ @JsonProperty(value = "kind", required = true) - private Kind kind; + private String kind; /** * The Type of the resource. @@ -40,47 +34,47 @@ public class CheckSkuAvailabilityParameter { private String type; /** - * Get the skus value. + * Get the SKU of the resource. * * @return the skus value */ - public List skus() { + public List skus() { return this.skus; } /** - * Set the skus value. + * Set the SKU of the resource. * * @param skus the skus value to set * @return the CheckSkuAvailabilityParameter object itself. */ - public CheckSkuAvailabilityParameter withSkus(List skus) { + public CheckSkuAvailabilityParameter withSkus(List skus) { this.skus = skus; return this; } /** - * Get the kind value. + * Get the Kind of the resource. * * @return the kind value */ - public Kind kind() { + public String kind() { return this.kind; } /** - * Set the kind value. + * Set the Kind of the resource. * * @param kind the kind value to set * @return the CheckSkuAvailabilityParameter object itself. */ - public CheckSkuAvailabilityParameter withKind(Kind kind) { + public CheckSkuAvailabilityParameter withKind(String kind) { this.kind = kind; return this; } /** - * Get the type value. + * Get the Type of the resource. * * @return the type value */ @@ -89,7 +83,7 @@ public String type() { } /** - * Set the type value. + * Set the Type of the resource. * * @param type the type value to set * @return the CheckSkuAvailabilityParameter object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityResult.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityResult.java index c76772c593c35..b74879eca5852 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityResult.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilityResult.java @@ -15,16 +15,10 @@ */ public class CheckSkuAvailabilityResult { /** - * 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. */ @JsonProperty(value = "kind") - private Kind kind; + private String kind; /** * The Type of the resource. @@ -33,11 +27,10 @@ public class CheckSkuAvailabilityResult { private String type; /** - * 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. */ @JsonProperty(value = "skuName") - private SkuName skuName; + private String skuName; /** * Indicates the given SKU is available or not. @@ -58,27 +51,27 @@ public class CheckSkuAvailabilityResult { private String message; /** - * Get the kind value. + * Get the Kind of the resource. * * @return the kind value */ - public Kind kind() { + public String kind() { return this.kind; } /** - * Set the kind value. + * Set the Kind of the resource. * * @param kind the kind value to set * @return the CheckSkuAvailabilityResult object itself. */ - public CheckSkuAvailabilityResult withKind(Kind kind) { + public CheckSkuAvailabilityResult withKind(String kind) { this.kind = kind; return this; } /** - * Get the type value. + * Get the Type of the resource. * * @return the type value */ @@ -87,7 +80,7 @@ public String type() { } /** - * Set the type value. + * Set the Type of the resource. * * @param type the type value to set * @return the CheckSkuAvailabilityResult object itself. @@ -98,27 +91,27 @@ public CheckSkuAvailabilityResult withType(String type) { } /** - * Get the skuName value. + * Get the SKU of Cognitive Services account. * * @return the skuName value */ - public SkuName skuName() { + public String skuName() { return this.skuName; } /** - * Set the skuName value. + * Set the SKU of Cognitive Services account. * * @param skuName the skuName value to set * @return the CheckSkuAvailabilityResult object itself. */ - public CheckSkuAvailabilityResult withSkuName(SkuName skuName) { + public CheckSkuAvailabilityResult withSkuName(String skuName) { this.skuName = skuName; return this; } /** - * Get the skuAvailable value. + * Get indicates the given SKU is available or not. * * @return the skuAvailable value */ @@ -127,7 +120,7 @@ public Boolean skuAvailable() { } /** - * Set the skuAvailable value. + * Set indicates the given SKU is available or not. * * @param skuAvailable the skuAvailable value to set * @return the CheckSkuAvailabilityResult object itself. @@ -138,7 +131,7 @@ public CheckSkuAvailabilityResult withSkuAvailable(Boolean skuAvailable) { } /** - * Get the reason value. + * Get reason why the SKU is not available. * * @return the reason value */ @@ -147,7 +140,7 @@ public String reason() { } /** - * Set the reason value. + * Set reason why the SKU is not available. * * @param reason the reason value to set * @return the CheckSkuAvailabilityResult object itself. @@ -158,7 +151,7 @@ public CheckSkuAvailabilityResult withReason(String reason) { } /** - * Get the message value. + * Get additional error message. * * @return the message value */ @@ -167,7 +160,7 @@ public String message() { } /** - * Set the message value. + * Set additional error message. * * @param message the message value to set * @return the CheckSkuAvailabilityResult object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilitys.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilitys.java index 8d2b7f45e83d1..9d86bf00bd5c9 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilitys.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CheckSkuAvailabilitys.java @@ -22,11 +22,11 @@ public interface CheckSkuAvailabilitys extends HasInner listAsync(String location, List skus, Kind kind, String type); + Observable listAsync(String location, List skus, String kind, String type); } diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccount.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccount.java index b6c4e027e9623..1848629459a54 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccount.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccount.java @@ -10,20 +10,26 @@ 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.v2017_04_18.implementation.CognitiveServicesManager; +import java.util.Map; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.CognitiveServicesAccountInner; /** * Type representing CognitiveServicesAccount. */ public interface CognitiveServicesAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the customSubDomainName value. + */ + String customSubDomainName(); + /** * @return the endpoint value. */ @@ -44,6 +50,11 @@ public interface CognitiveServicesAccount extends HasInner, 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, UpdateStages.WithProperties { } /** * Grouping of CognitiveServicesAccount update stages. */ interface UpdateStages { + /** + * The stage of the cognitiveservicesaccount update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Gets or sets the SKU of the resource + * @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); + } + + /** + * The stage of the cognitiveservicesaccount update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Additional properties for Account. Only provided fields will be updated + * @return the next update stage + */ + Update withProperties(Object properties); + } + } } diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountCreateParameters.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountCreateParameters.java index 33b0cfc9cf786..c05cac6e941de 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountCreateParameters.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountCreateParameters.java @@ -22,16 +22,10 @@ public class CognitiveServicesAccountCreateParameters { private Sku sku; /** - * 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. */ @JsonProperty(value = "kind", required = true) - private Kind kind; + private String kind; /** * Required. Gets or sets the location of the resource. This will be one of @@ -60,7 +54,7 @@ public class CognitiveServicesAccountCreateParameters { private Object properties; /** - * Get the sku value. + * Get required. Gets or sets the SKU of the resource. * * @return the sku value */ @@ -69,7 +63,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set required. Gets or sets the SKU of the resource. * * @param sku the sku value to set * @return the CognitiveServicesAccountCreateParameters object itself. @@ -80,27 +74,27 @@ public CognitiveServicesAccountCreateParameters withSku(Sku sku) { } /** - * Get the kind value. + * Get required. Gets or sets the Kind of the resource. * * @return the kind value */ - public Kind kind() { + public String kind() { return this.kind; } /** - * Set the kind value. + * Set required. Gets or sets the Kind of the resource. * * @param kind the kind value to set * @return the CognitiveServicesAccountCreateParameters object itself. */ - public CognitiveServicesAccountCreateParameters withKind(Kind kind) { + public CognitiveServicesAccountCreateParameters withKind(String kind) { this.kind = kind; return this; } /** - * 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 */ @@ -109,7 +103,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. @@ -120,7 +114,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 */ @@ -129,7 +123,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. @@ -140,7 +134,7 @@ public CognitiveServicesAccountCreateParameters withTags(Map tag } /** - * Get the properties value. + * Get must exist in the request. Must be an empty object. Must not be null. * * @return the properties value */ @@ -149,7 +143,7 @@ public Object properties() { } /** - * Set the properties value. + * Set must exist in the request. Must be an empty object. Must not be null. * * @param properties the properties value to set * @return the CognitiveServicesAccountCreateParameters object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountUpdateParameters.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountUpdateParameters.java index c44814eadb855..402ab26cb9d8a 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountUpdateParameters.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountUpdateParameters.java @@ -32,7 +32,13 @@ public class CognitiveServicesAccountUpdateParameters { private Map tags; /** - * Get the sku value. + * Additional properties for Account. Only provided fields will be updated. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Get gets or sets the SKU of the resource. * * @return the sku value */ @@ -41,7 +47,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set gets or sets the SKU of the resource. * * @param sku the sku value to set * @return the CognitiveServicesAccountUpdateParameters object itself. @@ -52,7 +58,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 +67,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. @@ -71,4 +77,24 @@ public CognitiveServicesAccountUpdateParameters withTags(Map tag return this; } + /** + * Get additional properties for Account. Only provided fields will be updated. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set additional properties for Account. Only provided fields will be updated. + * + * @param properties the properties value to set + * @return the CognitiveServicesAccountUpdateParameters object itself. + */ + public CognitiveServicesAccountUpdateParameters withProperties(Object properties) { + this.properties = properties; + return this; + } + } diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesResourceAndSku.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesResourceAndSku.java index 05101654d7881..fd943f93985bf 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesResourceAndSku.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/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. @@ -47,7 +47,7 @@ public CognitiveServicesResourceAndSku withResourceType(String resourceType) { } /** - * Get the sku value. + * Get the SKU of Cognitive Services account. * * @return the sku value */ @@ -56,7 +56,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the SKU of Cognitive Services account. * * @param sku the sku value to set * @return the CognitiveServicesResourceAndSku object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Error.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Error.java index 3de58ecec4724..18039d91afb79 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Error.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Error.java @@ -21,7 +21,7 @@ public class Error { private ErrorBody error; /** - * Get the error value. + * Get the error body. * * @return the error value */ @@ -30,7 +30,7 @@ public ErrorBody error() { } /** - * Set the error value. + * Set the error body. * * @param error the error value to set * @return the Error object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ErrorBody.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ErrorBody.java index f3272520ef0a4..4bc0931c59ff4 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ErrorBody.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/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/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/IpRule.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/IpRule.java new file mode 100644 index 0000000000000..c9da3991a09e2 --- /dev/null +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/IpRule.java @@ -0,0 +1,45 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.cognitiveservices.v2017_04_18; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A rule governing the accessibility from a specific ip address or ip range. + */ +public class IpRule { + /** + * An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple + * IP address) or '124.56.78.0/24' (all addresses that start with + * 124.56.78). + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Get an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78). + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78). + * + * @param value the value value to set + * @return the IpRule object itself. + */ + public IpRule withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/MetricName.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/MetricName.java index e192df37c15a5..18597d12df49d 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/MetricName.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/MetricName.java @@ -27,7 +27,7 @@ public class MetricName { private String localizedValue; /** - * Get the value value. + * Get the name of the metric. * * @return the value value */ @@ -36,7 +36,7 @@ public String value() { } /** - * Get the localizedValue value. + * Get the friendly name of the metric. * * @return the localizedValue value */ diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleAction.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleAction.java new file mode 100644 index 0000000000000..47ea682cad253 --- /dev/null +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleAction.java @@ -0,0 +1,41 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.cognitiveservices.v2017_04_18; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NetworkRuleAction. + */ +public final class NetworkRuleAction extends ExpandableStringEnum { + /** Static value Allow for NetworkRuleAction. */ + public static final NetworkRuleAction ALLOW = fromString("Allow"); + + /** Static value Deny for NetworkRuleAction. */ + public static final NetworkRuleAction DENY = fromString("Deny"); + + /** + * Creates or finds a NetworkRuleAction from its string representation. + * @param name a name to look for + * @return the corresponding NetworkRuleAction + */ + @JsonCreator + public static NetworkRuleAction fromString(String name) { + return fromString(name, NetworkRuleAction.class); + } + + /** + * @return known NetworkRuleAction values + */ + public static Collection values() { + return values(NetworkRuleAction.class); + } +} diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleBypassOptions.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleBypassOptions.java new file mode 100644 index 0000000000000..0e0cacd30b79c --- /dev/null +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleBypassOptions.java @@ -0,0 +1,41 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.cognitiveservices.v2017_04_18; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NetworkRuleBypassOptions. + */ +public final class NetworkRuleBypassOptions extends ExpandableStringEnum { + /** Static value AzureServices for NetworkRuleBypassOptions. */ + public static final NetworkRuleBypassOptions AZURE_SERVICES = fromString("AzureServices"); + + /** Static value None for NetworkRuleBypassOptions. */ + public static final NetworkRuleBypassOptions NONE = fromString("None"); + + /** + * Creates or finds a NetworkRuleBypassOptions from its string representation. + * @param name a name to look for + * @return the corresponding NetworkRuleBypassOptions + */ + @JsonCreator + public static NetworkRuleBypassOptions fromString(String name) { + return fromString(name, NetworkRuleBypassOptions.class); + } + + /** + * @return known NetworkRuleBypassOptions values + */ + public static Collection values() { + return values(NetworkRuleBypassOptions.class); + } +} diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleSet.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleSet.java new file mode 100644 index 0000000000000..389183f157227 --- /dev/null +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/NetworkRuleSet.java @@ -0,0 +1,126 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.cognitiveservices.v2017_04_18; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A set of rules governing the network accessibility. + */ +public class NetworkRuleSet { + /** + * Tells what traffic can bypass network rules. This can be 'AzureServices' + * or 'None'. If not specified the default is 'AzureServices'. Possible + * values include: 'AzureServices', 'None'. + */ + @JsonProperty(value = "bypass") + private NetworkRuleBypassOptions bypass; + + /** + * The default action when no rule from ipRules and from + * virtualNetworkRules match. This is only used after the bypass property + * has been evaluated. Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "defaultAction") + private NetworkRuleAction defaultAction; + + /** + * The list of IP address rules. + */ + @JsonProperty(value = "ipRules") + private List ipRules; + + /** + * The list of virtual network rules. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /** + * Get tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None'. + * + * @return the bypass value + */ + public NetworkRuleBypassOptions bypass() { + return this.bypass; + } + + /** + * Set tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None'. + * + * @param bypass the bypass value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withBypass(NetworkRuleBypassOptions bypass) { + this.bypass = bypass; + return this; + } + + /** + * Get the default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny'. + * + * @return the defaultAction value + */ + public NetworkRuleAction defaultAction() { + return this.defaultAction; + } + + /** + * Set the default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny'. + * + * @param defaultAction the defaultAction value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withDefaultAction(NetworkRuleAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the list of IP address rules. + * + * @return the ipRules value + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the list of IP address rules. + * + * @param ipRules the ipRules value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * Get the list of virtual network rules. + * + * @return the virtualNetworkRules value + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set the list of virtual network rules. + * + * @param virtualNetworkRules the virtualNetworkRules value to set + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withVirtualNetworkRules(List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + +} diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/OperationDisplayInfo.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/OperationDisplayInfo.java index e4cbb28b61ce7..b104a215eb992 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/OperationDisplayInfo.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/OperationDisplayInfo.java @@ -39,7 +39,7 @@ public class OperationDisplayInfo { private String resource; /** - * Get the description value. + * Get the description of the operation. * * @return the description value */ @@ -48,7 +48,7 @@ public String description() { } /** - * Set the description value. + * Set the description of the operation. * * @param description the description value to set * @return the OperationDisplayInfo object itself. @@ -59,7 +59,7 @@ public OperationDisplayInfo withDescription(String description) { } /** - * Get the operation value. + * Get the action that users can perform, based on their permission level. * * @return the operation value */ @@ -68,7 +68,7 @@ public String operation() { } /** - * Set the operation value. + * Set the action that users can perform, based on their permission level. * * @param operation the operation value to set * @return the OperationDisplayInfo object itself. @@ -79,7 +79,7 @@ public OperationDisplayInfo withOperation(String operation) { } /** - * Get the provider value. + * Get service provider: Microsoft Cognitive Services. * * @return the provider value */ @@ -88,7 +88,7 @@ public String provider() { } /** - * Set the provider value. + * Set service provider: Microsoft Cognitive Services. * * @param provider the provider value to set * @return the OperationDisplayInfo object itself. @@ -99,7 +99,7 @@ public OperationDisplayInfo withProvider(String provider) { } /** - * Get the resource value. + * Get resource on which the operation is performed. * * @return the resource value */ @@ -108,7 +108,7 @@ public String resource() { } /** - * Set the resource value. + * Set resource on which the operation is performed. * * @param resource the resource value to set * @return the OperationDisplayInfo object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/RegenerateKeyParameters.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/RegenerateKeyParameters.java index 7dfb39b092ca7..ffa01d0246464 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/RegenerateKeyParameters.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/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/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictionInfo.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictionInfo.java index d95c2df857c64..2a05b5e5b83a5 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictionInfo.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictionInfo.java @@ -28,7 +28,7 @@ public class ResourceSkuRestrictionInfo { private List zones; /** - * Get the locations value. + * Get locations where the SKU is restricted. * * @return the locations value */ @@ -37,7 +37,7 @@ public List locations() { } /** - * Get the zones value. + * Get list of availability zones where the SKU is restricted. * * @return the zones value */ diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictions.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictions.java index 5d6d556a0accf..53f55127961d5 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictions.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/ResourceSkuRestrictions.java @@ -42,7 +42,7 @@ public class ResourceSkuRestrictions { private ResourceSkuRestrictionsReasonCode reasonCode; /** - * Get the type value. + * Get the type of restrictions. Possible values include: 'Location', 'Zone'. * * @return the type value */ @@ -51,7 +51,7 @@ public ResourceSkuRestrictionsType type() { } /** - * Get the values value. + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. * * @return the values value */ @@ -60,7 +60,7 @@ public List values() { } /** - * Get the restrictionInfo value. + * Get the information about the restriction where the SKU cannot be used. * * @return the restrictionInfo value */ @@ -69,7 +69,7 @@ public ResourceSkuRestrictionInfo restrictionInfo() { } /** - * Get the reasonCode value. + * Get the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. * * @return the reasonCode value */ diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Sku.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Sku.java index 3a958818f8e18..e4b4b0845376c 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Sku.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Sku.java @@ -16,11 +16,10 @@ public class 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'. + * update. */ @JsonProperty(value = "name", required = true) - private SkuName name; + private String name; /** * Gets the sku tier. This is based on the SKU name. Possible values @@ -30,27 +29,27 @@ public class Sku { private SkuTier tier; /** - * Get the name value. + * Get gets or sets the sku name. Required for account creation, optional for update. * * @return the name value */ - public SkuName name() { + public String name() { return this.name; } /** - * Set the name value. + * Set gets or sets the sku name. Required for account creation, optional for update. * * @param name the name value to set * @return the Sku object itself. */ - public Sku withName(SkuName name) { + public Sku withName(String name) { this.name = name; return this; } /** - * 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/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Usage.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Usage.java index 2b1d4cf0737e0..c9cce5e78a656 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Usage.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Usage.java @@ -60,7 +60,7 @@ public class Usage { private QuotaUsageStatus status; /** - * Get the unit value. + * Get the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'. * * @return the unit value */ @@ -69,7 +69,7 @@ public UnitType unit() { } /** - * Set the unit value. + * Set the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'. * * @param unit the unit value to set * @return the Usage object itself. @@ -80,7 +80,7 @@ public Usage withUnit(UnitType unit) { } /** - * Get the name value. + * Get the name information for the metric. * * @return the name value */ @@ -89,7 +89,7 @@ public MetricName name() { } /** - * Get the quotaPeriod value. + * Get the quota period used to summarize the usage values. * * @return the quotaPeriod value */ @@ -98,7 +98,7 @@ public String quotaPeriod() { } /** - * Get the limit value. + * Get maximum value for this metric. * * @return the limit value */ @@ -107,7 +107,7 @@ public Double limit() { } /** - * Get the currentValue value. + * Get current value for this metric. * * @return the currentValue value */ @@ -116,7 +116,7 @@ public Double currentValue() { } /** - * Get the nextResetTime value. + * Get next reset time for current quota. * * @return the nextResetTime value */ @@ -125,7 +125,7 @@ public String nextResetTime() { } /** - * Get the status value. + * Get cognitive Services account quota usage status. Possible values include: 'Included', 'Blocked', 'InOverage', 'Unknown'. * * @return the status value */ @@ -134,7 +134,7 @@ public QuotaUsageStatus status() { } /** - * Set the status value. + * Set cognitive Services account quota usage status. Possible values include: 'Included', 'Blocked', 'InOverage', 'Unknown'. * * @param status the status value to set * @return the Usage object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/VirtualNetworkRule.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/VirtualNetworkRule.java new file mode 100644 index 0000000000000..124697627744b --- /dev/null +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/VirtualNetworkRule.java @@ -0,0 +1,96 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.cognitiveservices.v2017_04_18; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A rule governing the accessibility from a specific virtual network. + */ +public class VirtualNetworkRule { + /** + * Full resource id of a vnet subnet, such as + * '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Gets the state of virtual network rule. + */ + @JsonProperty(value = "state") + private String state; + + /** + * Ignore missing vnet service endpoint or not. + */ + @JsonProperty(value = "ignoreMissingVnetServiceEndpoint") + private Boolean ignoreMissingVnetServiceEndpoint; + + /** + * Get full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + * + * @param id the id value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withId(String id) { + this.id = id; + return this; + } + + /** + * Get gets the state of virtual network rule. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set gets the state of virtual network rule. + * + * @param state the state value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withState(String state) { + this.state = state; + return this; + } + + /** + * Get ignore missing vnet service endpoint or not. + * + * @return the ignoreMissingVnetServiceEndpoint value + */ + public Boolean ignoreMissingVnetServiceEndpoint() { + return this.ignoreMissingVnetServiceEndpoint; + } + + /** + * Set ignore missing vnet service endpoint or not. + * + * @param ignoreMissingVnetServiceEndpoint the ignoreMissingVnetServiceEndpoint value to set + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMissingVnetServiceEndpoint) { + this.ignoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint; + return this; + } + +} diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsImpl.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsImpl.java index 3741d2109158b..702435a0cb806 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsImpl.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsImpl.java @@ -82,41 +82,22 @@ public PagedList listByResourceGroup(String resourceGr return this.wrapList(client.listByResourceGroup(resourceGroupName)); } - private Observable> listByResourceGroupNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - AccountsInner client = this.inner(); - return client.listByResourceGroupNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByResourceGroupNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listByResourceGroupAsync(String resourceGroupName) { AccountsInner client = this.inner(); return client.listByResourceGroupAsync(resourceGroupName) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listByResourceGroupNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public CognitiveServicesAccount call(CognitiveServicesAccountInner inner) { return wrapModel(inner); } - }); + }); } @Override @@ -125,41 +106,22 @@ public PagedList list() { return this.wrapList(client.list()); } - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - AccountsInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listAsync() { AccountsInner client = this.inner(); return client.listAsync() - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public CognitiveServicesAccount call(CognitiveServicesAccountInner inner) { return wrapModel(inner); } - }); + }); } @Override diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java index 55fdcc4cd88d6..9a0de28b8aa51 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java @@ -284,9 +284,11 @@ public Observable> updateWithServ } final Sku sku = null; final Map tags = null; + final Object properties = null; CognitiveServicesAccountUpdateParameters parameters = new CognitiveServicesAccountUpdateParameters(); parameters.withSku(null); parameters.withTags(null); + parameters.withProperties(null); return service.update(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -308,13 +310,14 @@ public Observable> call(Response< * @param accountName The name of Cognitive Services account. * @param sku Gets or sets the SKU of the resource. * @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. + * @param properties Additional properties for Account. Only provided fields will be updated. * @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 * @return the CognitiveServicesAccountInner object if successful. */ - public CognitiveServicesAccountInner update(String resourceGroupName, String accountName, Sku sku, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags).toBlocking().single().body(); + public CognitiveServicesAccountInner update(String resourceGroupName, String accountName, Sku sku, Map tags, Object properties) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags, properties).toBlocking().single().body(); } /** @@ -324,12 +327,13 @@ public CognitiveServicesAccountInner update(String resourceGroupName, String acc * @param accountName The name of Cognitive Services account. * @param sku Gets or sets the SKU of the resource. * @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. + * @param properties Additional properties for Account. Only provided fields will be updated. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String accountName, Sku sku, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags), serviceCallback); + public ServiceFuture updateAsync(String resourceGroupName, String accountName, Sku sku, Map tags, Object properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags, properties), serviceCallback); } /** @@ -339,11 +343,12 @@ public ServiceFuture updateAsync(String resourceG * @param accountName The name of Cognitive Services account. * @param sku Gets or sets the SKU of the resource. * @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. + * @param properties Additional properties for Account. Only provided fields will be updated. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CognitiveServicesAccountInner object */ - public Observable updateAsync(String resourceGroupName, String accountName, Sku sku, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags).map(new Func1, CognitiveServicesAccountInner>() { + public Observable updateAsync(String resourceGroupName, String accountName, Sku sku, Map tags, Object properties) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, sku, tags, properties).map(new Func1, CognitiveServicesAccountInner>() { @Override public CognitiveServicesAccountInner call(ServiceResponse response) { return response.body(); @@ -358,10 +363,11 @@ public CognitiveServicesAccountInner call(ServiceResponse> updateWithServiceResponseAsync(String resourceGroupName, String accountName, Sku sku, Map tags) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, Sku sku, Map tags, Object properties) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -379,6 +385,7 @@ public Observable> updateWithServ CognitiveServicesAccountUpdateParameters parameters = new CognitiveServicesAccountUpdateParameters(); parameters.withSku(sku); parameters.withTags(tags); + parameters.withProperties(properties); return service.update(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckDomainAvailabilityResultInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckDomainAvailabilityResultInner.java new file mode 100644 index 0000000000000..b82eac9e8df26 --- /dev/null +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckDomainAvailabilityResultInner.java @@ -0,0 +1,121 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Check Domain availability result. + */ +public class CheckDomainAvailabilityResultInner { + /** + * Indicates the given SKU is available or not. + */ + @JsonProperty(value = "isSubdomainAvailable") + private Boolean isSubdomainAvailable; + + /** + * Reason why the SKU is not available. + */ + @JsonProperty(value = "reason") + private String reason; + + /** + * The subdomain name to use. + */ + @JsonProperty(value = "subdomainName") + private String subdomainName; + + /** + * The Type of the resource. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get indicates the given SKU is available or not. + * + * @return the isSubdomainAvailable value + */ + public Boolean isSubdomainAvailable() { + return this.isSubdomainAvailable; + } + + /** + * Set indicates the given SKU is available or not. + * + * @param isSubdomainAvailable the isSubdomainAvailable value to set + * @return the CheckDomainAvailabilityResultInner object itself. + */ + public CheckDomainAvailabilityResultInner withIsSubdomainAvailable(Boolean isSubdomainAvailable) { + this.isSubdomainAvailable = isSubdomainAvailable; + return this; + } + + /** + * Get reason why the SKU is not available. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Set reason why the SKU is not available. + * + * @param reason the reason value to set + * @return the CheckDomainAvailabilityResultInner object itself. + */ + public CheckDomainAvailabilityResultInner withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get the subdomain name to use. + * + * @return the subdomainName value + */ + public String subdomainName() { + return this.subdomainName; + } + + /** + * Set the subdomain name to use. + * + * @param subdomainName the subdomainName value to set + * @return the CheckDomainAvailabilityResultInner object itself. + */ + public CheckDomainAvailabilityResultInner withSubdomainName(String subdomainName) { + this.subdomainName = subdomainName; + return this; + } + + /** + * Get the Type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the Type of the resource. + * + * @param type the type value to set + * @return the CheckDomainAvailabilityResultInner object itself. + */ + public CheckDomainAvailabilityResultInner withType(String type) { + this.type = type; + return this; + } + +} diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilityResultListInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilityResultListInner.java index 99e08ca959233..3edc75d3412ca 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilityResultListInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilityResultListInner.java @@ -23,7 +23,7 @@ public class CheckSkuAvailabilityResultListInner { private List value; /** - * Get the value value. + * Get check SKU availability result list. * * @return the value value */ @@ -32,7 +32,7 @@ public List value() { } /** - * Set the value value. + * Set check SKU availability result list. * * @param value the value value to set * @return the CheckSkuAvailabilityResultListInner object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysImpl.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysImpl.java index 03862ab4aa2ab..3723197c7a91b 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysImpl.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysImpl.java @@ -15,8 +15,6 @@ import rx.Observable; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.CheckSkuAvailabilityResultList; import java.util.List; -import com.microsoft.azure.management.cognitiveservices.v2017_04_18.SkuName; -import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Kind; class CheckSkuAvailabilitysImpl extends WrapperImpl implements CheckSkuAvailabilitys { private final CognitiveServicesManager manager; @@ -31,7 +29,7 @@ public CognitiveServicesManager manager() { } @Override - public Observable listAsync(String location, List skus, Kind kind, String type) { + public Observable listAsync(String location, List skus, String kind, String type) { CheckSkuAvailabilitysInner client = this.inner(); return client.listAsync(location, skus, kind, type) .map(new Func1() { diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysInner.java index a10a21e756242..fbdbf95add867 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysInner.java @@ -12,8 +12,6 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.CheckSkuAvailabilityParameter; -import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Kind; -import com.microsoft.azure.management.cognitiveservices.v2017_04_18.SkuName; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; @@ -68,14 +66,14 @@ interface CheckSkuAvailabilitysService { * * @param location Resource location. * @param skus The SKU of the resource. - * @param kind 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' + * @param kind The Kind of the resource. * @param type The Type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the CheckSkuAvailabilityResultListInner object if successful. */ - public CheckSkuAvailabilityResultListInner list(String location, List skus, Kind kind, String type) { + public CheckSkuAvailabilityResultListInner list(String location, List skus, String kind, String type) { return listWithServiceResponseAsync(location, skus, kind, type).toBlocking().single().body(); } @@ -84,13 +82,13 @@ public CheckSkuAvailabilityResultListInner list(String location, List s * * @param location Resource location. * @param skus The SKU of the resource. - * @param kind 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' + * @param kind The Kind of the resource. * @param type The Type of the resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String location, List skus, Kind kind, String type, final ServiceCallback serviceCallback) { + public ServiceFuture listAsync(String location, List skus, String kind, String type, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listWithServiceResponseAsync(location, skus, kind, type), serviceCallback); } @@ -99,12 +97,12 @@ public ServiceFuture listAsync(String locat * * @param location Resource location. * @param skus The SKU of the resource. - * @param kind 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' + * @param kind The Kind of the resource. * @param type The Type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CheckSkuAvailabilityResultListInner object */ - public Observable listAsync(String location, List skus, Kind kind, String type) { + public Observable listAsync(String location, List skus, String kind, String type) { return listWithServiceResponseAsync(location, skus, kind, type).map(new Func1, CheckSkuAvailabilityResultListInner>() { @Override public CheckSkuAvailabilityResultListInner call(ServiceResponse response) { @@ -118,12 +116,12 @@ public CheckSkuAvailabilityResultListInner call(ServiceResponse> listWithServiceResponseAsync(String location, List skus, Kind kind, String type) { + public Observable> listWithServiceResponseAsync(String location, List skus, String kind, String type) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java index f1f50799a0e25..ada320f88f884 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountEnumerateSkusResultInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/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/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountImpl.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountImpl.java index 6f3578436ea2e..e4ecf0e12dcf4 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountImpl.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountImpl.java @@ -11,16 +11,21 @@ import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.CognitiveServicesAccount; import rx.Observable; +import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Sku; +import java.util.Map; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.CognitiveServicesAccountCreateParameters; +import com.microsoft.azure.management.cognitiveservices.v2017_04_18.NetworkRuleSet; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.ProvisioningState; -import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Sku; -import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Kind; import rx.functions.Func1; class CognitiveServicesAccountImpl extends GroupableResourceCoreImpl implements CognitiveServicesAccount, CognitiveServicesAccount.Definition, CognitiveServicesAccount.Update { + private Sku usku; + private Map utags; + private Object uproperties; private CognitiveServicesAccountCreateParameters createParameter; CognitiveServicesAccountImpl(String name, CognitiveServicesAccountInner inner, CognitiveServicesManager manager) { super(name, inner, manager); + this.usku = new Sku(); this.createParameter = new CognitiveServicesAccountCreateParameters(); } @@ -43,7 +48,7 @@ public CognitiveServicesAccountInner call(CognitiveServicesAccountInner resource @Override public Observable updateResourceAsync() { AccountsInner client = this.manager().inner().accounts(); - return client.updateAsync(this.resourceGroupName(), this.name()) + return client.updateAsync(this.resourceGroupName(), this.name(), this.usku, this.utags, this.uproperties) .map(new Func1() { @Override public CognitiveServicesAccountInner call(CognitiveServicesAccountInner resource) { @@ -66,9 +71,15 @@ public boolean isInCreateMode() { } private void resetCreateUpdateParameters() { + this.usku = new Sku(); this.createParameter = new CognitiveServicesAccountCreateParameters(); } + @Override + public String customSubDomainName() { + return this.inner().customSubDomainName(); + } + @Override public String endpoint() { return this.inner().endpoint(); @@ -89,6 +100,11 @@ public String kind() { return this.inner().kind(); } + @Override + public NetworkRuleSet networkAcls() { + return this.inner().networkAcls(); + } + @Override public ProvisioningState provisioningState() { return this.inner().provisioningState(); @@ -100,20 +116,34 @@ public Sku sku() { } @Override - public CognitiveServicesAccountImpl withKind(Kind kind) { + public CognitiveServicesAccountImpl withKind(String kind) { this.createParameter.withKind(kind); return this; } + @Override + public CognitiveServicesAccountImpl withTags(Map tags) { + this.utags = tags; + return this; + } + @Override public CognitiveServicesAccountImpl withProperties(Object properties) { - this.createParameter.withProperties(properties); + if (isInCreateMode()) { + this.createParameter.withProperties(properties); + } else { + this.uproperties = properties; + } 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/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountInner.java index a8e5b3a0817dc..6d5e79d9f5a6e 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountInner.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.ProvisioningState; +import com.microsoft.azure.management.cognitiveservices.v2017_04_18.NetworkRuleSet; import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -52,6 +53,19 @@ public class CognitiveServicesAccountInner extends Resource { @JsonProperty(value = "properties.internalId") private String internalId; + /** + * Optional subdomain name used for token-based authentication. + */ + @JsonProperty(value = "properties.customSubDomainName") + private String customSubDomainName; + + /** + * A collection of rules governing the accessibility from specific network + * locations. + */ + @JsonProperty(value = "properties.networkAcls") + private NetworkRuleSet networkAcls; + /** * The SKU of Cognitive Services account. */ @@ -59,7 +73,7 @@ public class CognitiveServicesAccountInner extends Resource { private Sku sku; /** - * Get the etag value. + * Get entity Tag. * * @return the etag value */ @@ -68,7 +82,7 @@ public String etag() { } /** - * Set the etag value. + * Set entity Tag. * * @param etag the etag value to set * @return the CognitiveServicesAccountInner object itself. @@ -79,7 +93,7 @@ public CognitiveServicesAccountInner withEtag(String etag) { } /** - * Get the kind value. + * Get type of cognitive service account. * * @return the kind value */ @@ -88,7 +102,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. @@ -99,7 +113,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', 'Moving', 'Deleting', 'Succeeded', 'Failed'. * * @return the provisioningState value */ @@ -108,7 +122,7 @@ public ProvisioningState provisioningState() { } /** - * Get the endpoint value. + * Get endpoint of the created account. * * @return the endpoint value */ @@ -117,7 +131,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. @@ -128,7 +142,7 @@ public CognitiveServicesAccountInner withEndpoint(String endpoint) { } /** - * Get the internalId value. + * Get the internal identifier. * * @return the internalId value */ @@ -137,7 +151,7 @@ public String internalId() { } /** - * Set the internalId value. + * Set the internal identifier. * * @param internalId the internalId value to set * @return the CognitiveServicesAccountInner object itself. @@ -148,7 +162,47 @@ public CognitiveServicesAccountInner withInternalId(String internalId) { } /** - * Get the sku value. + * Get optional subdomain name used for token-based authentication. + * + * @return the customSubDomainName value + */ + public String customSubDomainName() { + return this.customSubDomainName; + } + + /** + * Set optional subdomain name used for token-based authentication. + * + * @param customSubDomainName the customSubDomainName value to set + * @return the CognitiveServicesAccountInner object itself. + */ + public CognitiveServicesAccountInner withCustomSubDomainName(String customSubDomainName) { + this.customSubDomainName = customSubDomainName; + return this; + } + + /** + * Get a collection of rules governing the accessibility from specific network locations. + * + * @return the networkAcls value + */ + public NetworkRuleSet networkAcls() { + return this.networkAcls; + } + + /** + * Set a collection of rules governing the accessibility from specific network locations. + * + * @param networkAcls the networkAcls value to set + * @return the CognitiveServicesAccountInner object itself. + */ + public CognitiveServicesAccountInner withNetworkAcls(NetworkRuleSet networkAcls) { + this.networkAcls = networkAcls; + return this; + } + + /** + * Get the SKU of Cognitive Services account. * * @return the sku value */ @@ -157,7 +211,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the SKU of Cognitive Services account. * * @param sku the sku value to set * @return the CognitiveServicesAccountInner object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountKeysInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountKeysInner.java index 6b6d5f6d31553..3e9bc1251a093 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesAccountKeysInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/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/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java index 35bb37c416591..1647b6b86739a 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java @@ -8,15 +8,34 @@ package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation; +import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.cognitiveservices.v2017_04_18.CheckDomainAvailabilityParameter; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; /** * Initializes a new instance of the CognitiveServicesManagementClientImpl class. */ public class CognitiveServicesManagementClientImpl extends AzureServiceClient { + /** The Retrofit service to perform REST calls. */ + private CognitiveServicesManagementClientService service; /** the {@link AzureClient} used for long running operations. */ private AzureClient azureClient; @@ -63,11 +82,11 @@ public String apiVersion() { return this.apiVersion; } - /** Gets or sets the preferred language for the response. */ + /** The preferred language for the response. */ private String acceptLanguage; /** - * Gets Gets or sets the preferred language for the response. + * Gets The preferred language for the response. * * @return the acceptLanguage value. */ @@ -76,7 +95,7 @@ public String acceptLanguage() { } /** - * Sets Gets or sets the preferred language for the response. + * Sets The preferred language for the response. * * @param acceptLanguage the acceptLanguage value. * @return the service client itself @@ -86,11 +105,11 @@ public CognitiveServicesManagementClientImpl withAcceptLanguage(String acceptLan return this; } - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ private int longRunningOperationRetryTimeout; /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @return the longRunningOperationRetryTimeout value. */ @@ -99,7 +118,7 @@ public int longRunningOperationRetryTimeout() { } /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. * @return the service client itself @@ -109,11 +128,11 @@ public CognitiveServicesManagementClientImpl withLongRunningOperationRetryTimeou return this; } - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ private boolean generateClientRequestId; /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @return the generateClientRequestId value. */ @@ -122,7 +141,7 @@ public boolean generateClientRequestId() { } /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. * @return the service client itself @@ -224,6 +243,7 @@ protected void initialize() { this.operations = new OperationsInner(restClient().retrofit(), this); this.checkSkuAvailabilitys = new CheckSkuAvailabilitysInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); + initializeService(); } /** @@ -233,6 +253,111 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "CognitiveServicesManagementClient", "2017-04-18"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "CognitiveServicesManagementClient", "2017-04-18"); } + + private void initializeService() { + service = restClient().retrofit().create(CognitiveServicesManagementClientService.class); + } + + /** + * The interface defining all the services for CognitiveServicesManagementClient to be + * used by Retrofit to perform actually REST calls. + */ + interface CognitiveServicesManagementClientService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.v2017_04_18.CognitiveServicesManagementClient checkDomainAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability") + Observable> checkDomainAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckDomainAvailabilityParameter parameters, @Header("User-Agent") String userAgent); + + } + + /** + * Check whether a domain is available. + * + * @param subdomainName The subdomain name to use. + * @param type The Type of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CheckDomainAvailabilityResultInner object if successful. + */ + public CheckDomainAvailabilityResultInner checkDomainAvailability(String subdomainName, String type) { + return checkDomainAvailabilityWithServiceResponseAsync(subdomainName, type).toBlocking().single().body(); + } + + /** + * Check whether a domain is available. + * + * @param subdomainName The subdomain name to use. + * @param type The Type of the resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkDomainAvailabilityAsync(String subdomainName, String type, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkDomainAvailabilityWithServiceResponseAsync(subdomainName, type), serviceCallback); + } + + /** + * Check whether a domain is available. + * + * @param subdomainName The subdomain name to use. + * @param type The Type of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckDomainAvailabilityResultInner object + */ + public Observable checkDomainAvailabilityAsync(String subdomainName, String type) { + return checkDomainAvailabilityWithServiceResponseAsync(subdomainName, type).map(new Func1, CheckDomainAvailabilityResultInner>() { + @Override + public CheckDomainAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check whether a domain is available. + * + * @param subdomainName The subdomain name to use. + * @param type The Type of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckDomainAvailabilityResultInner object + */ + public Observable> checkDomainAvailabilityWithServiceResponseAsync(String subdomainName, String type) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + if (subdomainName == null) { + throw new IllegalArgumentException("Parameter subdomainName is required and cannot be null."); + } + if (type == null) { + throw new IllegalArgumentException("Parameter type is required and cannot be null."); + } + CheckDomainAvailabilityParameter parameters = new CheckDomainAvailabilityParameter(); + parameters.withSubdomainName(subdomainName); + parameters.withType(type); + return service.checkDomainAvailability(this.subscriptionId(), this.apiVersion(), this.acceptLanguage(), parameters, this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkDomainAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkDomainAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationEntityInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationEntityInner.java index 91702e3f4836b..86b777cac898b 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationEntityInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationEntityInner.java @@ -40,7 +40,7 @@ public class OperationEntityInner { private Object properties; /** - * Get the name value. + * Get operation name: {provider}/{resource}/{operation}. * * @return the name value */ @@ -49,7 +49,7 @@ public String name() { } /** - * Set the name value. + * Set operation name: {provider}/{resource}/{operation}. * * @param name the name value to set * @return the OperationEntityInner object itself. @@ -60,7 +60,7 @@ public OperationEntityInner withName(String name) { } /** - * Get the display value. + * Get the operation supported by Cognitive Services. * * @return the display value */ @@ -69,7 +69,7 @@ public OperationDisplayInfo display() { } /** - * Set the display value. + * Set the operation supported by Cognitive Services. * * @param display the display value to set * @return the OperationEntityInner object itself. @@ -80,7 +80,7 @@ public OperationEntityInner withDisplay(OperationDisplayInfo display) { } /** - * Get the origin value. + * Get the origin of the operation. * * @return the origin value */ @@ -89,7 +89,7 @@ public String origin() { } /** - * Set the origin value. + * Set the origin of the operation. * * @param origin the origin value to set * @return the OperationEntityInner object itself. @@ -100,7 +100,7 @@ public OperationEntityInner withOrigin(String origin) { } /** - * Get the properties value. + * Get additional properties. * * @return the properties value */ @@ -109,7 +109,7 @@ public Object properties() { } /** - * Set the properties value. + * Set additional properties. * * @param properties the properties value to set * @return the OperationEntityInner object itself. diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationsImpl.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationsImpl.java index f5041bdc54609..f8ee98c8195dc 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationsImpl.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/OperationsImpl.java @@ -28,41 +28,22 @@ public CognitiveServicesManager manager() { return this.manager; } - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - OperationsInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listAsync() { OperationsInner client = this.inner(); return client.listAsync() - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public OperationEntity call(OperationEntityInner inner) { return new OperationEntityImpl(inner, manager()); } - }); + }); } } diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkuInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkuInner.java index 909de81a52b00..91e1c829cf214 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkuInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkuInner.java @@ -54,7 +54,7 @@ public class ResourceSkuInner { private List restrictions; /** - * Get the resourceType value. + * Get the type of resource the SKU applies to. * * @return the resourceType value */ @@ -63,7 +63,7 @@ public String resourceType() { } /** - * Get the name value. + * Get the name of SKU. * * @return the name value */ @@ -72,7 +72,7 @@ public String name() { } /** - * Get the tier value. + * Get specifies the tier of Cognitive Services account. * * @return the tier value */ @@ -81,7 +81,7 @@ public String tier() { } /** - * Get the kind value. + * Get the Kind of resources that are supported in this SKU. * * @return the kind value */ @@ -90,7 +90,7 @@ public String kind() { } /** - * Get the locations value. + * Get the set of locations that the SKU is available. * * @return the locations value */ @@ -99,7 +99,7 @@ public List locations() { } /** - * Get the restrictions value. + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. * * @return the restrictions value */ diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkusImpl.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkusImpl.java index f0b7e756f3e26..7f5910f09e496 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkusImpl.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/ResourceSkusImpl.java @@ -28,41 +28,22 @@ public CognitiveServicesManager manager() { return this.manager; } - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - ResourceSkusInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listAsync() { ResourceSkusInner client = this.inner(); return client.listAsync() - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public ResourceSku call(ResourceSkuInner inner) { return new ResourceSkuImpl(inner, manager()); } - }); + }); } } diff --git a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/UsagesResultInner.java b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/UsagesResultInner.java index faa532dc3b219..5eefb86d82985 100644 --- a/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/UsagesResultInner.java +++ b/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/UsagesResultInner.java @@ -23,7 +23,7 @@ public class UsagesResultInner { private List value; /** - * Get the value value. + * Get the list of usages for Cognitive Service account. * * @return the value value */