diff --git a/sdk/resources/mgmt-v2019_06_01/pom.xml b/sdk/resources/mgmt-v2019_06_01/pom.xml
index ecff030b0e2d1..33b38c1b9afaa 100644
--- a/sdk/resources/mgmt-v2019_06_01/pom.xml
+++ b/sdk/resources/mgmt-v2019_06_01/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
- ../../parents/azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
azure-mgmt-resources
1.0.0-beta
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorDefinition.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorDefinition.java
new file mode 100644
index 0000000000000..89b2e062f3095
--- /dev/null
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorDefinition.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.resources.v2019_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error description and code explaining why resource name is invalid.
+ */
+public class ErrorDefinition {
+ /**
+ * Description of the error.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Code of the error.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /**
+ * Get description of the error.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set description of the error.
+ *
+ * @param message the message value to set
+ * @return the ErrorDefinition object itself.
+ */
+ public ErrorDefinition withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get code of the error.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set code of the error.
+ *
+ * @param code the code value to set
+ * @return the ErrorDefinition object itself.
+ */
+ public ErrorDefinition withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponse.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponse.java
new file mode 100644
index 0000000000000..a07ffc25d5830
--- /dev/null
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponse.java
@@ -0,0 +1,43 @@
+/**
+ * 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.resources.v2019_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response.
+ */
+public class ErrorResponse {
+ /**
+ * The error details.
+ */
+ @JsonProperty(value = "error")
+ private ErrorDefinition error;
+
+ /**
+ * Get the error details.
+ *
+ * @return the error value
+ */
+ public ErrorDefinition error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error details.
+ *
+ * @param error the error value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withError(ErrorDefinition error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponseException.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponseException.java
new file mode 100644
index 0000000000000..d016fd84ca57e
--- /dev/null
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * 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.resources.v2019_06_01;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceName.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceName.java
new file mode 100644
index 0000000000000..cb420077cbc81
--- /dev/null
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceName.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.resources.v2019_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Name and Type of the Resource.
+ */
+public class ResourceName {
+ /**
+ * Name of the resource.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The type of the resource.
+ */
+ @JsonProperty(value = "type", required = true)
+ private String type;
+
+ /**
+ * Get name of the resource.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name of the resource.
+ *
+ * @param name the name value to set
+ * @return the ResourceName object itself.
+ */
+ public ResourceName withName(String name) {
+ this.name = name;
+ 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 ResourceName object itself.
+ */
+ public ResourceName withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceNameStatus.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceNameStatus.java
new file mode 100644
index 0000000000000..7a43b6b759ba4
--- /dev/null
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceNameStatus.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.resources.v2019_06_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ResourceNameStatus.
+ */
+public final class ResourceNameStatus extends ExpandableStringEnum {
+ /** Static value Allowed for ResourceNameStatus. */
+ public static final ResourceNameStatus ALLOWED = fromString("Allowed");
+
+ /** Static value Reserved for ResourceNameStatus. */
+ public static final ResourceNameStatus RESERVED = fromString("Reserved");
+
+ /**
+ * Creates or finds a ResourceNameStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ResourceNameStatus
+ */
+ @JsonCreator
+ public static ResourceNameStatus fromString(String name) {
+ return fromString(name, ResourceNameStatus.class);
+ }
+
+ /**
+ * @return known ResourceNameStatus values
+ */
+ public static Collection values() {
+ return values(ResourceNameStatus.class);
+ }
+}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantCategory.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantCategory.java
new file mode 100644
index 0000000000000..2081fd906665b
--- /dev/null
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantCategory.java
@@ -0,0 +1,56 @@
+/**
+ * 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.resources.v2019_06_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for TenantCategory.
+ */
+public enum TenantCategory {
+ /** Enum value Home. */
+ HOME("Home"),
+
+ /** Enum value ProjectedBy. */
+ PROJECTED_BY("ProjectedBy"),
+
+ /** Enum value ManagedBy. */
+ MANAGED_BY("ManagedBy");
+
+ /** The actual serialized value for a TenantCategory instance. */
+ private String value;
+
+ TenantCategory(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a TenantCategory instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed TenantCategory object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static TenantCategory fromString(String value) {
+ TenantCategory[] items = TenantCategory.values();
+ for (TenantCategory item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantIdDescription.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantIdDescription.java
index e2be7984a9985..680938b1d2484 100644
--- a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantIdDescription.java
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantIdDescription.java
@@ -12,16 +12,42 @@
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.resources.v2019_06_01.implementation.ResourcesManager;
import com.microsoft.azure.management.resources.v2019_06_01.implementation.TenantIdDescriptionInner;
+import java.util.List;
/**
* Type representing TenantIdDescription.
*/
public interface TenantIdDescription extends HasInner, HasManager {
+ /**
+ * @return the country value.
+ */
+ String country();
+
+ /**
+ * @return the countryCode value.
+ */
+ String countryCode();
+
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the domains value.
+ */
+ List domains();
+
/**
* @return the id value.
*/
String id();
+ /**
+ * @return the tenantCategory value.
+ */
+ TenantCategory tenantCategory();
+
/**
* @return the tenantId value.
*/
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/CheckResourceNameResultInner.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/CheckResourceNameResultInner.java
new file mode 100644
index 0000000000000..7d4067ec557d8
--- /dev/null
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/CheckResourceNameResultInner.java
@@ -0,0 +1,98 @@
+/**
+ * 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.resources.v2019_06_01.implementation;
+
+import com.microsoft.azure.management.resources.v2019_06_01.ResourceNameStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Resource Name valid if not a reserved word, does not contain a reserved word
+ * and does not start with a reserved word.
+ */
+public class CheckResourceNameResultInner {
+ /**
+ * Name of Resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Type of Resource.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Is the resource name Allowed or Reserved. Possible values include:
+ * 'Allowed', 'Reserved'.
+ */
+ @JsonProperty(value = "status")
+ private ResourceNameStatus status;
+
+ /**
+ * Get name of Resource.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name of Resource.
+ *
+ * @param name the name value to set
+ * @return the CheckResourceNameResultInner object itself.
+ */
+ public CheckResourceNameResultInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get type of Resource.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set type of Resource.
+ *
+ * @param type the type value to set
+ * @return the CheckResourceNameResultInner object itself.
+ */
+ public CheckResourceNameResultInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get is the resource name Allowed or Reserved. Possible values include: 'Allowed', 'Reserved'.
+ *
+ * @return the status value
+ */
+ public ResourceNameStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set is the resource name Allowed or Reserved. Possible values include: 'Allowed', 'Reserved'.
+ *
+ * @param status the status value to set
+ * @return the CheckResourceNameResultInner object itself.
+ */
+ public CheckResourceNameResultInner withStatus(ResourceNameStatus status) {
+ this.status = status;
+ return this;
+ }
+
+}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/SubscriptionClientImpl.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/SubscriptionClientImpl.java
index 59a693d9a68d4..c7839febfe09f 100644
--- a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/SubscriptionClientImpl.java
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/SubscriptionClientImpl.java
@@ -8,15 +8,34 @@
package com.microsoft.azure.management.resources.v2019_06_01.implementation;
+import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.azure.management.resources.v2019_06_01.ErrorResponseException;
+import com.microsoft.azure.management.resources.v2019_06_01.ResourceName;
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 com.microsoft.rest.Validator;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
/**
* Initializes a new instance of the SubscriptionClientImpl class.
*/
public class SubscriptionClientImpl extends AzureServiceClient {
+ /** The Retrofit service to perform REST calls. */
+ private SubscriptionClientService service;
/** the {@link AzureClient} used for long running operations. */
private AzureClient azureClient;
@@ -187,6 +206,7 @@ protected void initialize() {
this.subscriptions = new SubscriptionsInner(restClient().retrofit(), this);
this.tenants = new TenantsInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
+ initializeService();
}
/**
@@ -198,4 +218,165 @@ protected void initialize() {
public String userAgent() {
return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "SubscriptionClient", "2019-06-01");
}
+
+ private void initializeService() {
+ service = restClient().retrofit().create(SubscriptionClientService.class);
+ }
+
+ /**
+ * The interface defining all the services for SubscriptionClient to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface SubscriptionClientService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.v2019_06_01.SubscriptionClient checkResourceName" })
+ @POST("providers/Microsoft.Resources/checkResourceName")
+ Observable> checkResourceName(@Body ResourceName resourceNameDefinition, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CheckResourceNameResultInner object if successful.
+ */
+ public CheckResourceNameResultInner checkResourceName() {
+ return checkResourceNameWithServiceResponseAsync().toBlocking().single().body();
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @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 checkResourceNameAsync(final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(checkResourceNameWithServiceResponseAsync(), serviceCallback);
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CheckResourceNameResultInner object
+ */
+ public Observable checkResourceNameAsync() {
+ return checkResourceNameWithServiceResponseAsync().map(new Func1, CheckResourceNameResultInner>() {
+ @Override
+ public CheckResourceNameResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CheckResourceNameResultInner object
+ */
+ public Observable> checkResourceNameWithServiceResponseAsync() {
+ if (this.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null.");
+ }
+ final ResourceName resourceNameDefinition = null;
+ return service.checkResourceName(resourceNameDefinition, this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = checkResourceNameDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @param resourceNameDefinition Resource object with values for resource name and resource type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CheckResourceNameResultInner object if successful.
+ */
+ public CheckResourceNameResultInner checkResourceName(ResourceName resourceNameDefinition) {
+ return checkResourceNameWithServiceResponseAsync(resourceNameDefinition).toBlocking().single().body();
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @param resourceNameDefinition Resource object with values for resource name and resource type
+ * @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 checkResourceNameAsync(ResourceName resourceNameDefinition, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(checkResourceNameWithServiceResponseAsync(resourceNameDefinition), serviceCallback);
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @param resourceNameDefinition Resource object with values for resource name and resource type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CheckResourceNameResultInner object
+ */
+ public Observable checkResourceNameAsync(ResourceName resourceNameDefinition) {
+ return checkResourceNameWithServiceResponseAsync(resourceNameDefinition).map(new Func1, CheckResourceNameResultInner>() {
+ @Override
+ public CheckResourceNameResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Checks resource name validity.
+ * A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word.
+ *
+ * @param resourceNameDefinition Resource object with values for resource name and resource type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CheckResourceNameResultInner object
+ */
+ public Observable> checkResourceNameWithServiceResponseAsync(ResourceName resourceNameDefinition) {
+ if (this.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(resourceNameDefinition);
+ return service.checkResourceName(resourceNameDefinition, this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = checkResourceNameDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse checkResourceNameDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
}
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionImpl.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionImpl.java
index 91f580bdbf9c3..78c56340b7e7d 100644
--- a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionImpl.java
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionImpl.java
@@ -10,6 +10,8 @@
import com.microsoft.azure.management.resources.v2019_06_01.TenantIdDescription;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.List;
+import com.microsoft.azure.management.resources.v2019_06_01.TenantCategory;
class TenantIdDescriptionImpl extends WrapperImpl implements TenantIdDescription {
private final ResourcesManager manager;
@@ -23,11 +25,36 @@ public ResourcesManager manager() {
return this.manager;
}
+ @Override
+ public String country() {
+ return this.inner().country();
+ }
+
+ @Override
+ public String countryCode() {
+ return this.inner().countryCode();
+ }
+
+ @Override
+ public String displayName() {
+ return this.inner().displayName();
+ }
+
+ @Override
+ public List domains() {
+ return this.inner().domains();
+ }
+
@Override
public String id() {
return this.inner().id();
}
+ @Override
+ public TenantCategory tenantCategory() {
+ return this.inner().tenantCategory();
+ }
+
@Override
public String tenantId() {
return this.inner().tenantId();
diff --git a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionInner.java b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionInner.java
index ee2db511d6aba..8d58f210f757d 100644
--- a/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionInner.java
+++ b/sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/implementation/TenantIdDescriptionInner.java
@@ -8,6 +8,8 @@
package com.microsoft.azure.management.resources.v2019_06_01.implementation;
+import com.microsoft.azure.management.resources.v2019_06_01.TenantCategory;
+import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
@@ -27,6 +29,37 @@ public class TenantIdDescriptionInner {
@JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
private String tenantId;
+ /**
+ * The tenant category. Possible values include: 'Home', 'ProjectedBy',
+ * 'ManagedBy'.
+ */
+ @JsonProperty(value = "tenantCategory", access = JsonProperty.Access.WRITE_ONLY)
+ private TenantCategory tenantCategory;
+
+ /**
+ * Country/region name of the address for the tenant.
+ */
+ @JsonProperty(value = "country", access = JsonProperty.Access.WRITE_ONLY)
+ private String country;
+
+ /**
+ * Country/region abbreviation for the tenant.
+ */
+ @JsonProperty(value = "countryCode", access = JsonProperty.Access.WRITE_ONLY)
+ private String countryCode;
+
+ /**
+ * The display name of the tenant.
+ */
+ @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayName;
+
+ /**
+ * The list of domains for the tenant.
+ */
+ @JsonProperty(value = "domains", access = JsonProperty.Access.WRITE_ONLY)
+ private List domains;
+
/**
* Get the fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000.
*
@@ -45,4 +78,49 @@ public String tenantId() {
return this.tenantId;
}
+ /**
+ * Get the tenant category. Possible values include: 'Home', 'ProjectedBy', 'ManagedBy'.
+ *
+ * @return the tenantCategory value
+ */
+ public TenantCategory tenantCategory() {
+ return this.tenantCategory;
+ }
+
+ /**
+ * Get country/region name of the address for the tenant.
+ *
+ * @return the country value
+ */
+ public String country() {
+ return this.country;
+ }
+
+ /**
+ * Get country/region abbreviation for the tenant.
+ *
+ * @return the countryCode value
+ */
+ public String countryCode() {
+ return this.countryCode;
+ }
+
+ /**
+ * Get the display name of the tenant.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Get the list of domains for the tenant.
+ *
+ * @return the domains value
+ */
+ public List domains() {
+ return this.domains;
+ }
+
}