diff --git a/authorization/resource-manager/v2015_06_01/pom.xml b/authorization/resource-manager/v2015_06_01/pom.xml
new file mode 100644
index 000000000000..be05e0552cfd
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.authorization.v2015_06_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.3-beta
+ ../../../pom.xml
+
+ azure-mgmt-authorization
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for Authorization Management
+ This package contains Microsoft Authorization Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+
* Copyright (c) Microsoft Corporation. All rights reserved.
+
* Licensed under the MIT License. See License.txt in the project root for
+
* license information.
+
*/
+ ]]>
+
+
+
+
+
+
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/ClassicAdministrator.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/ClassicAdministrator.java
new file mode 100644
index 000000000000..c8448eb8ee82
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/ClassicAdministrator.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.authorization.v2015_06_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.authorization.v2015_06_01.implementation.ClassicAdministratorInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.authorization.v2015_06_01.implementation.AuthorizationManager;
+
+/**
+ * Type representing ClassicAdministrator.
+ */
+public interface ClassicAdministrator extends HasInner, HasManager {
+ /**
+ * @return the emailAddress value.
+ */
+ String emailAddress();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the role value.
+ */
+ String role();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/ClassicAdministrators.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/ClassicAdministrators.java
new file mode 100644
index 000000000000..2d465d0699be
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/ClassicAdministrators.java
@@ -0,0 +1,19 @@
+/**
+ * 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.authorization.v2015_06_01;
+
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.authorization.v2015_06_01.implementation.ClassicAdministratorsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ClassicAdministrators.
+ */
+public interface ClassicAdministrators extends SupportsListing, HasInner {
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/AuthorizationManagementClientImpl.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/AuthorizationManagementClientImpl.java
new file mode 100644
index 000000000000..693faccb0cfb
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/AuthorizationManagementClientImpl.java
@@ -0,0 +1,196 @@
+/**
+ * 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.authorization.v2015_06_01.implementation;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+
+/**
+ * Initializes a new instance of the AuthorizationManagementClientImpl class.
+ */
+public class AuthorizationManagementClientImpl extends AzureServiceClient {
+ /** the {@link AzureClient} used for long running operations. */
+ private AzureClient azureClient;
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ public AzureClient getAzureClient() {
+ return this.azureClient;
+ }
+
+ /** The ID of the target subscription. */
+ private String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the service client itself
+ */
+ public AuthorizationManagementClientImpl withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /** The API version to use for this operation. */
+ private String apiVersion;
+
+ /**
+ * Gets The API version to use for this operation.
+ *
+ * @return the apiVersion value.
+ */
+ public String apiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The preferred language for the response. */
+ private String acceptLanguage;
+
+ /**
+ * Gets The preferred language for the response.
+ *
+ * @return the acceptLanguage value.
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Sets The preferred language for the response.
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ public AuthorizationManagementClientImpl withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /** The retry timeout in seconds for Long Running Operations. Default value is 30. */
+ private int longRunningOperationRetryTimeout;
+
+ /**
+ * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ public int longRunningOperationRetryTimeout() {
+ return this.longRunningOperationRetryTimeout;
+ }
+
+ /**
+ * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ public AuthorizationManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
+ return this;
+ }
+
+ /** 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 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.
+ */
+ public boolean generateClientRequestId() {
+ return this.generateClientRequestId;
+ }
+
+ /**
+ * 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
+ */
+ public AuthorizationManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ this.generateClientRequestId = generateClientRequestId;
+ return this;
+ }
+
+ /**
+ * The ClassicAdministratorsInner object to access its operations.
+ */
+ private ClassicAdministratorsInner classicAdministrators;
+
+ /**
+ * Gets the ClassicAdministratorsInner object to access its operations.
+ * @return the ClassicAdministratorsInner object.
+ */
+ public ClassicAdministratorsInner classicAdministrators() {
+ return this.classicAdministrators;
+ }
+
+ /**
+ * Initializes an instance of AuthorizationManagementClient client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public AuthorizationManagementClientImpl(ServiceClientCredentials credentials) {
+ this("https://management.azure.com", credentials);
+ }
+
+ /**
+ * Initializes an instance of AuthorizationManagementClient client.
+ *
+ * @param baseUrl the base URL of the host
+ * @param credentials the management credentials for Azure
+ */
+ public AuthorizationManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) {
+ super(baseUrl, credentials);
+ initialize();
+ }
+
+ /**
+ * Initializes an instance of AuthorizationManagementClient client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public AuthorizationManagementClientImpl(RestClient restClient) {
+ super(restClient);
+ initialize();
+ }
+
+ protected void initialize() {
+ this.apiVersion = "2015-06-01";
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.classicAdministrators = new ClassicAdministratorsInner(restClient().retrofit(), this);
+ this.azureClient = new AzureClient(this);
+ }
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ @Override
+ public String userAgent() {
+ return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "AuthorizationManagementClient", "2015-06-01");
+ }
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/AuthorizationManager.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/AuthorizationManager.java
new file mode 100644
index 000000000000..4a854413172b
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/AuthorizationManager.java
@@ -0,0 +1,99 @@
+/**
+ * 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.authorization.v2015_06_01.implementation;
+
+import com.microsoft.azure.AzureEnvironment;
+import com.microsoft.azure.AzureResponseBuilder;
+import com.microsoft.azure.credentials.AzureTokenCredentials;
+import com.microsoft.azure.management.apigeneration.Beta;
+import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
+import com.microsoft.azure.arm.resources.AzureConfigurable;
+import com.microsoft.azure.serializer.AzureJacksonAdapter;
+import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.authorization.v2015_06_01.ClassicAdministrators;
+import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
+import com.microsoft.azure.arm.resources.implementation.ManagerCore;
+
+/**
+ * Entry point to Azure Authorization resource management.
+ */
+public final class AuthorizationManager extends ManagerCore {
+ private ClassicAdministrators classicAdministrators;
+ /**
+ * Get a Configurable instance that can be used to create AuthorizationManager with optional configuration.
+ *
+ * @return the instance allowing configurations
+ */
+ public static Configurable configure() {
+ return new AuthorizationManager.ConfigurableImpl();
+ }
+ /**
+ * Creates an instance of AuthorizationManager that exposes Authorization resource management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the AuthorizationManager
+ */
+ public static AuthorizationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return new AuthorizationManager(new RestClient.Builder()
+ .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER)
+ .withCredentials(credentials)
+ .withSerializerAdapter(new AzureJacksonAdapter())
+ .withResponseBuilderFactory(new AzureResponseBuilder.Factory())
+ .build(), subscriptionId);
+ }
+ /**
+ * Creates an instance of AuthorizationManager that exposes Authorization resource management API entry points.
+ *
+ * @param restClient the RestClient to be used for API calls.
+ * @param subscriptionId the subscription UUID
+ * @return the AuthorizationManager
+ */
+ public static AuthorizationManager authenticate(RestClient restClient, String subscriptionId) {
+ return new AuthorizationManager(restClient, subscriptionId);
+ }
+ /**
+ * The interface allowing configurations to be set.
+ */
+ public interface Configurable extends AzureConfigurable {
+ /**
+ * Creates an instance of AuthorizationManager that exposes Authorization management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the interface exposing Authorization management API entry points that work across subscriptions
+ */
+ AuthorizationManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
+ }
+
+ /**
+ * @return Entry point to manage ClassicAdministrators.
+ */
+ public ClassicAdministrators classicAdministrators() {
+ if (this.classicAdministrators == null) {
+ this.classicAdministrators = new ClassicAdministratorsImpl(this);
+ }
+ return this.classicAdministrators;
+ }
+
+ /**
+ * The implementation for Configurable interface.
+ */
+ private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable {
+ public AuthorizationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return AuthorizationManager.authenticate(buildRestClient(credentials), subscriptionId);
+ }
+ }
+ private AuthorizationManager(RestClient restClient, String subscriptionId) {
+ super(
+ restClient,
+ subscriptionId,
+ new AuthorizationManagementClientImpl(restClient).withSubscriptionId(subscriptionId));
+ }
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorImpl.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorImpl.java
new file mode 100644
index 000000000000..806f0000000e
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorImpl.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.authorization.v2015_06_01.implementation;
+
+import com.microsoft.azure.management.authorization.v2015_06_01.ClassicAdministrator;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import rx.Observable;
+
+class ClassicAdministratorImpl extends WrapperImpl implements ClassicAdministrator {
+ private final AuthorizationManager manager;
+
+ ClassicAdministratorImpl(ClassicAdministratorInner inner, AuthorizationManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public AuthorizationManager manager() {
+ return this.manager;
+ }
+
+
+
+ @Override
+ public String emailAddress() {
+ return this.inner().emailAddress();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String role() {
+ return this.inner().role();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorInner.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorInner.java
new file mode 100644
index 000000000000..a167874e7f4c
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorInner.java
@@ -0,0 +1,149 @@
+/**
+ * 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.authorization.v2015_06_01.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Classic Administrators.
+ */
+@JsonFlatten
+public class ClassicAdministratorInner {
+ /**
+ * The ID of the administrator.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * The name of the administrator.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * The type of the administrator.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * The email address of the administrator.
+ */
+ @JsonProperty(value = "properties.emailAddress")
+ private String emailAddress;
+
+ /**
+ * The role of the administrator.
+ */
+ @JsonProperty(value = "properties.role")
+ private String role;
+
+ /**
+ * Get the ID of the administrator.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the ID of the administrator.
+ *
+ * @param id the id value to set
+ * @return the ClassicAdministratorInner object itself.
+ */
+ public ClassicAdministratorInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name of the administrator.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the administrator.
+ *
+ * @param name the name value to set
+ * @return the ClassicAdministratorInner object itself.
+ */
+ public ClassicAdministratorInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type of the administrator.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type of the administrator.
+ *
+ * @param type the type value to set
+ * @return the ClassicAdministratorInner object itself.
+ */
+ public ClassicAdministratorInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the email address of the administrator.
+ *
+ * @return the emailAddress value
+ */
+ public String emailAddress() {
+ return this.emailAddress;
+ }
+
+ /**
+ * Set the email address of the administrator.
+ *
+ * @param emailAddress the emailAddress value to set
+ * @return the ClassicAdministratorInner object itself.
+ */
+ public ClassicAdministratorInner withEmailAddress(String emailAddress) {
+ this.emailAddress = emailAddress;
+ return this;
+ }
+
+ /**
+ * Get the role of the administrator.
+ *
+ * @return the role value
+ */
+ public String role() {
+ return this.role;
+ }
+
+ /**
+ * Set the role of the administrator.
+ *
+ * @param role the role value to set
+ * @return the ClassicAdministratorInner object itself.
+ */
+ public ClassicAdministratorInner withRole(String role) {
+ this.role = role;
+ return this;
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorsImpl.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorsImpl.java
new file mode 100644
index 000000000000..c3c07a0dd73b
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorsImpl.java
@@ -0,0 +1,68 @@
+/**
+ * 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.
+ * jkl
+ */
+
+package com.microsoft.azure.management.authorization.v2015_06_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.authorization.v2015_06_01.ClassicAdministrators;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.arm.utils.PagedListConverter;
+import com.microsoft.azure.management.authorization.v2015_06_01.ClassicAdministrator;
+
+class ClassicAdministratorsImpl extends WrapperImpl implements ClassicAdministrators {
+ private PagedListConverter converter;
+ private final AuthorizationManager manager;
+
+ ClassicAdministratorsImpl(AuthorizationManager manager) {
+ super(manager.inner().classicAdministrators());
+ this.manager = manager;
+ this.converter = new PagedListConverter() {
+ @Override
+ public Observable typeConvertAsync(ClassicAdministratorInner inner) {
+ return Observable.just((ClassicAdministrator) wrapModel(inner));
+ }
+ };
+ }
+
+ public AuthorizationManager manager() {
+ return this.manager;
+ }
+
+ private ClassicAdministratorImpl wrapModel(ClassicAdministratorInner inner) {
+ return new ClassicAdministratorImpl(inner, manager());
+ }
+
+ @Override
+ public PagedList list() {
+ ClassicAdministratorsInner client = this.inner();
+ return converter.convert(client.list());
+ }
+
+ @Override
+ public Observable listAsync() {
+ ClassicAdministratorsInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ClassicAdministrator call(ClassicAdministratorInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorsInner.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorsInner.java
new file mode 100644
index 000000000000..4835faab9ca5
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/ClassicAdministratorsInner.java
@@ -0,0 +1,287 @@
+/**
+ * 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.authorization.v2015_06_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ClassicAdministrators.
+ */
+public class ClassicAdministratorsInner {
+ /** The Retrofit service to perform REST calls. */
+ private ClassicAdministratorsService service;
+ /** The service client containing this operation class. */
+ private AuthorizationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ClassicAdministratorsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ClassicAdministratorsInner(Retrofit retrofit, AuthorizationManagementClientImpl client) {
+ this.service = retrofit.create(ClassicAdministratorsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ClassicAdministrators to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ClassicAdministratorsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.authorization.v2015_06_01.ClassicAdministrators list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.authorization.v2015_06_01.ClassicAdministrators listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @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 PagedList<ClassicAdministratorInner> object if successful.
+ */
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @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(final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClassicAdministratorInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClassicAdministratorInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ClassicAdministratorInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @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 PagedList<ClassicAdministratorInner> object if successful.
+ */
+ public PagedList listNext(final String nextPageLink) {
+ ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClassicAdministratorInner> object
+ */
+ public Observable> listNextAsync(final String nextPageLink) {
+ return listNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClassicAdministratorInner> object
+ */
+ public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets service administrator, account administrator, and co-administrators for the subscription.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ClassicAdministratorInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/IdParsingUtils.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/IdParsingUtils.java
new file mode 100644
index 000000000000..0fa4a9f2c8b3
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/IdParsingUtils.java
@@ -0,0 +1,57 @@
+/**
+ * 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.authorization.v2015_06_01.implementation;
+import java.util.Arrays;
+import java.util.Iterator;
+
+class IdParsingUtils {
+ public static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static String getValueFromIdByPosition(String id, int pos) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ int index = 0;
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (index == pos) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ index++;
+ }
+ return null;
+ }
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/PageImpl.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/PageImpl.java
new file mode 100644
index 000000000000..bb1dee787b40
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/PageImpl.java
@@ -0,0 +1,75 @@
+/**
+ * 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.authorization.v2015_06_01.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.Page;
+import java.util.List;
+
+/**
+ * An instance of this class defines a page of Azure resources and a link to
+ * get the next page of resources, if any.
+ *
+ * @param type of Azure resource
+ */
+public class PageImpl implements Page {
+ /**
+ * The link to the next page.
+ */
+ @JsonProperty("nextLink")
+ private String nextPageLink;
+
+ /**
+ * The list of items.
+ */
+ @JsonProperty("value")
+ private List items;
+
+ /**
+ * Gets the link to the next page.
+ *
+ * @return the link to the next page.
+ */
+ @Override
+ public String nextPageLink() {
+ return this.nextPageLink;
+ }
+
+ /**
+ * Gets the list of items.
+ *
+ * @return the list of items in {@link List}.
+ */
+ @Override
+ public List items() {
+ return items;
+ }
+
+ /**
+ * Sets the link to the next page.
+ *
+ * @param nextPageLink the link to the next page.
+ * @return this Page object itself.
+ */
+ public PageImpl setNextPageLink(String nextPageLink) {
+ this.nextPageLink = nextPageLink;
+ return this;
+ }
+
+ /**
+ * Sets the list of items.
+ *
+ * @param items the list of items in {@link List}.
+ * @return this Page object itself.
+ */
+ public PageImpl setItems(List items) {
+ this.items = items;
+ return this;
+ }
+}
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/package-info.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/package-info.java
new file mode 100644
index 000000000000..de24c00afe46
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/implementation/package-info.java
@@ -0,0 +1,11 @@
+// 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.
+
+/**
+ * This package contains the implementation classes for AuthorizationManagementClient.
+ * Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users.
+ */
+package com.microsoft.azure.management.authorization.v2015_06_01.implementation;
diff --git a/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/package-info.java b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/package-info.java
new file mode 100644
index 000000000000..b1d72479e309
--- /dev/null
+++ b/authorization/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/authorization/v2015_06_01/package-info.java
@@ -0,0 +1,11 @@
+// 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.
+
+/**
+ * This package contains the classes for AuthorizationManagementClient.
+ * Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users.
+ */
+package com.microsoft.azure.management.authorization.v2015_06_01;
diff --git a/authorization/resource-manager/v2015_07_01/pom.xml b/authorization/resource-manager/v2015_07_01/pom.xml
index 58d699824738..70c4a4774505 100644
--- a/authorization/resource-manager/v2015_07_01/pom.xml
+++ b/authorization/resource-manager/v2015_07_01/pom.xml
@@ -11,7 +11,7 @@
com.microsoft.azure
azure-arm-parent
- 1.0.0
+ 0.0.3-beta
../../../pom.xml
azure-mgmt-authorization
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministrator.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministrator.java
index 14bd689c278f..303f36a3aa52 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministrator.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministrator.java
@@ -9,14 +9,19 @@
package com.microsoft.azure.management.authorization.v2015_07_01;
import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.authorization.v2015_07_01.implementation.ClassicAdministratorInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.authorization.v2015_07_01.implementation.AuthorizationManager;
-import com.microsoft.azure.management.authorization.v2015_07_01.implementation.ClassicAdministratorInner;
/**
* Type representing ClassicAdministrator.
*/
public interface ClassicAdministrator extends HasInner, HasManager {
+ /**
+ * @return the emailAddress value.
+ */
+ String emailAddress();
+
/**
* @return the id value.
*/
@@ -28,9 +33,9 @@ public interface ClassicAdministrator extends HasInner {
- /**
- * Gets service administrator, account administrator, and co-administrators for the subscription.
- *
- * @param apiVersion The API version to use for this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
- */
- Observable listAsync(final String apiVersion);
-
+public interface ClassicAdministrators extends SupportsListing, HasInner {
}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ElevateAccess.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ElevateAccess.java
new file mode 100644
index 000000000000..f2d4937870ff
--- /dev/null
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ElevateAccess.java
@@ -0,0 +1,27 @@
+/**
+ * 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.authorization.v2015_07_01;
+
+import rx.Completable;
+import com.microsoft.azure.management.authorization.v2015_07_01.implementation.ElevateAccessInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ElevateAccess.
+ */
+public interface ElevateAccess extends HasInner {
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable postAsync();
+
+}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/GlobalAdministrators.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/GlobalAdministrators.java
new file mode 100644
index 000000000000..a2353931649f
--- /dev/null
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/GlobalAdministrators.java
@@ -0,0 +1,27 @@
+/**
+ * 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.authorization.v2015_07_01;
+
+import rx.Completable;
+import com.microsoft.azure.management.authorization.v2015_07_01.implementation.GlobalAdministratorsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing GlobalAdministrators.
+ */
+public interface GlobalAdministrators extends HasInner {
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable elevateAccessAsync();
+
+}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java
index 05c3456f5f3d..7f70ba88a8bb 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java
@@ -24,6 +24,16 @@
* Type representing RoleDefinition.
*/
public interface RoleDefinition extends HasInner, Indexable, Updatable, Refreshable, HasManager {
+ /**
+ * @return the assignableScopes value.
+ */
+ List assignableScopes();
+
+ /**
+ * @return the description value.
+ */
+ String description();
+
/**
* @return the id value.
*/
@@ -35,9 +45,19 @@ public interface RoleDefinition extends HasInner, Indexable
String name();
/**
- * @return the properties value.
+ * @return the permissions value.
+ */
+ List permissions();
+
+ /**
+ * @return the roleName value.
*/
- RoleDefinitionProperties properties();
+ String roleName();
+
+ /**
+ * @return the roleType value.
+ */
+ String roleType();
/**
* @return the type value.
@@ -47,7 +67,7 @@ public interface RoleDefinition extends HasInner, Indexable
/**
* The entirety of the RoleDefinition definition.
*/
- interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithProperties, DefinitionStages.WithCreate {
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate {
}
/**
@@ -69,19 +89,67 @@ interface WithScope {
* @param scope The scope of the role definition
* @return the next definition stage
*/
- WithProperties withScope(String scope);
+ WithCreate withScope(String scope);
}
/**
- * The stage of the roledefinition definition allowing to specify Properties.
+ * The stage of the roledefinition definition allowing to specify AssignableScopes.
*/
- interface WithProperties {
- /**
- * Specifies properties.
- * @param properties Role definition properties
- * @return the next definition stage
- */
- WithCreate withProperties(RoleDefinitionProperties properties);
+ interface WithAssignableScopes {
+ /**
+ * Specifies assignableScopes.
+ * @param assignableScopes Role definition assignable scopes
+ * @return the next definition stage
+ */
+ WithCreate withAssignableScopes(List assignableScopes);
+ }
+
+ /**
+ * The stage of the roledefinition definition allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description The role definition description
+ * @return the next definition stage
+ */
+ WithCreate withDescription(String description);
+ }
+
+ /**
+ * The stage of the roledefinition definition allowing to specify Permissions.
+ */
+ interface WithPermissions {
+ /**
+ * Specifies permissions.
+ * @param permissions Role definition permissions
+ * @return the next definition stage
+ */
+ WithCreate withPermissions(List permissions);
+ }
+
+ /**
+ * The stage of the roledefinition definition allowing to specify RoleName.
+ */
+ interface WithRoleName {
+ /**
+ * Specifies roleName.
+ * @param roleName The role name
+ * @return the next definition stage
+ */
+ WithCreate withRoleName(String roleName);
+ }
+
+ /**
+ * The stage of the roledefinition definition allowing to specify RoleType.
+ */
+ interface WithRoleType {
+ /**
+ * Specifies roleType.
+ * @param roleType The role type
+ * @return the next definition stage
+ */
+ WithCreate withRoleType(String roleType);
}
/**
@@ -89,13 +157,13 @@ interface WithProperties {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
- interface WithCreate extends Creatable {
+ interface WithCreate extends Creatable, DefinitionStages.WithAssignableScopes, DefinitionStages.WithDescription, DefinitionStages.WithPermissions, DefinitionStages.WithRoleName, DefinitionStages.WithRoleType {
}
}
/**
* The template for a RoleDefinition update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithProperties {
+ interface Update extends Appliable, UpdateStages.WithAssignableScopes, UpdateStages.WithDescription, UpdateStages.WithPermissions, UpdateStages.WithRoleName, UpdateStages.WithRoleType {
}
/**
@@ -103,15 +171,63 @@ interface Update extends Appliable, UpdateStages.WithProperties
*/
interface UpdateStages {
/**
- * The stage of the roledefinition update allowing to specify Properties.
+ * The stage of the roledefinition update allowing to specify AssignableScopes.
+ */
+ interface WithAssignableScopes {
+ /**
+ * Specifies assignableScopes.
+ * @param assignableScopes Role definition assignable scopes
+ * @return the next update stage
+ */
+ Update withAssignableScopes(List assignableScopes);
+ }
+
+ /**
+ * The stage of the roledefinition update allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description The role definition description
+ * @return the next update stage
+ */
+ Update withDescription(String description);
+ }
+
+ /**
+ * The stage of the roledefinition update allowing to specify Permissions.
+ */
+ interface WithPermissions {
+ /**
+ * Specifies permissions.
+ * @param permissions Role definition permissions
+ * @return the next update stage
+ */
+ Update withPermissions(List permissions);
+ }
+
+ /**
+ * The stage of the roledefinition update allowing to specify RoleName.
+ */
+ interface WithRoleName {
+ /**
+ * Specifies roleName.
+ * @param roleName The role name
+ * @return the next update stage
+ */
+ Update withRoleName(String roleName);
+ }
+
+ /**
+ * The stage of the roledefinition update allowing to specify RoleType.
*/
- interface WithProperties {
+ interface WithRoleType {
/**
- * Specifies properties.
- * @param properties Role definition properties
+ * Specifies roleType.
+ * @param roleType The role type
* @return the next update stage
*/
- Update withProperties(RoleDefinitionProperties properties);
+ Update withRoleType(String roleType);
}
}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java
index de1757b192e5..3ae5b96363d1 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java
@@ -145,6 +145,19 @@ public PermissionsInner permissions() {
return this.permissions;
}
+ /**
+ * The RoleDefinitionsInner object to access its operations.
+ */
+ private RoleDefinitionsInner roleDefinitions;
+
+ /**
+ * Gets the RoleDefinitionsInner object to access its operations.
+ * @return the RoleDefinitionsInner object.
+ */
+ public RoleDefinitionsInner roleDefinitions() {
+ return this.roleDefinitions;
+ }
+
/**
* The ProviderOperationsMetadatasInner object to access its operations.
*/
@@ -159,29 +172,29 @@ public ProviderOperationsMetadatasInner providerOperationsMetadatas() {
}
/**
- * The RoleAssignmentsInner object to access its operations.
+ * The GlobalAdministratorsInner object to access its operations.
*/
- private RoleAssignmentsInner roleAssignments;
+ private GlobalAdministratorsInner globalAdministrators;
/**
- * Gets the RoleAssignmentsInner object to access its operations.
- * @return the RoleAssignmentsInner object.
+ * Gets the GlobalAdministratorsInner object to access its operations.
+ * @return the GlobalAdministratorsInner object.
*/
- public RoleAssignmentsInner roleAssignments() {
- return this.roleAssignments;
+ public GlobalAdministratorsInner globalAdministrators() {
+ return this.globalAdministrators;
}
/**
- * The RoleDefinitionsInner object to access its operations.
+ * The RoleAssignmentsInner object to access its operations.
*/
- private RoleDefinitionsInner roleDefinitions;
+ private RoleAssignmentsInner roleAssignments;
/**
- * Gets the RoleDefinitionsInner object to access its operations.
- * @return the RoleDefinitionsInner object.
+ * Gets the RoleAssignmentsInner object to access its operations.
+ * @return the RoleAssignmentsInner object.
*/
- public RoleDefinitionsInner roleDefinitions() {
- return this.roleDefinitions;
+ public RoleAssignmentsInner roleAssignments() {
+ return this.roleAssignments;
}
/**
@@ -233,9 +246,10 @@ protected void initialize() {
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.permissions = new PermissionsInner(restClient().retrofit(), this);
+ this.roleDefinitions = new RoleDefinitionsInner(restClient().retrofit(), this);
this.providerOperationsMetadatas = new ProviderOperationsMetadatasInner(restClient().retrofit(), this);
+ this.globalAdministrators = new GlobalAdministratorsInner(restClient().retrofit(), this);
this.roleAssignments = new RoleAssignmentsInner(restClient().retrofit(), this);
- this.roleDefinitions = new RoleDefinitionsInner(restClient().retrofit(), this);
this.classicAdministrators = new ClassicAdministratorsInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java
index 2f96613e2d2d..080ac2a0538a 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java
@@ -17,9 +17,10 @@
import com.microsoft.azure.serializer.AzureJacksonAdapter;
import com.microsoft.rest.RestClient;
import com.microsoft.azure.management.authorization.v2015_07_01.Permissions;
+import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitions;
import com.microsoft.azure.management.authorization.v2015_07_01.ProviderOperationsMetadatas;
+import com.microsoft.azure.management.authorization.v2015_07_01.GlobalAdministrators;
import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignments;
-import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitions;
import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministrators;
import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
import com.microsoft.azure.arm.resources.implementation.ManagerCore;
@@ -29,9 +30,10 @@
*/
public final class AuthorizationManager extends ManagerCore {
private Permissions permissions;
+ private RoleDefinitions roleDefinitions;
private ProviderOperationsMetadatas providerOperationsMetadatas;
+ private GlobalAdministrators globalAdministrators;
private RoleAssignments roleAssignments;
- private RoleDefinitions roleDefinitions;
private ClassicAdministrators classicAdministrators;
/**
* Get a Configurable instance that can be used to create AuthorizationManager with optional configuration.
@@ -90,6 +92,16 @@ public Permissions permissions() {
return this.permissions;
}
+ /**
+ * @return Entry point to manage RoleDefinitions.
+ */
+ public RoleDefinitions roleDefinitions() {
+ if (this.roleDefinitions == null) {
+ this.roleDefinitions = new RoleDefinitionsImpl(this);
+ }
+ return this.roleDefinitions;
+ }
+
/**
* @return Entry point to manage ProviderOperationsMetadatas.
*/
@@ -101,23 +113,23 @@ public ProviderOperationsMetadatas providerOperationsMetadatas() {
}
/**
- * @return Entry point to manage RoleAssignments.
+ * @return Entry point to manage GlobalAdministrators.
*/
- public RoleAssignments roleAssignments() {
- if (this.roleAssignments == null) {
- this.roleAssignments = new RoleAssignmentsImpl(this);
+ public GlobalAdministrators globalAdministrators() {
+ if (this.globalAdministrators == null) {
+ this.globalAdministrators = new GlobalAdministratorsImpl(this);
}
- return this.roleAssignments;
+ return this.globalAdministrators;
}
/**
- * @return Entry point to manage RoleDefinitions.
+ * @return Entry point to manage RoleAssignments.
*/
- public RoleDefinitions roleDefinitions() {
- if (this.roleDefinitions == null) {
- this.roleDefinitions = new RoleDefinitionsImpl(this);
+ public RoleAssignments roleAssignments() {
+ if (this.roleAssignments == null) {
+ this.roleAssignments = new RoleAssignmentsImpl(this);
}
- return this.roleDefinitions;
+ return this.roleAssignments;
}
/**
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorImpl.java
index 9f0d32a96736..0ba8b31c4153 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorImpl.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorImpl.java
@@ -4,17 +4,19 @@
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
+ *
*/
package com.microsoft.azure.management.authorization.v2015_07_01.implementation;
import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministrator;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
-import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministratorProperties;
+import rx.Observable;
class ClassicAdministratorImpl extends WrapperImpl implements ClassicAdministrator {
private final AuthorizationManager manager;
- ClassicAdministratorImpl(ClassicAdministratorInner inner, AuthorizationManager manager) {
+
+ ClassicAdministratorImpl(ClassicAdministratorInner inner, AuthorizationManager manager) {
super(inner);
this.manager = manager;
}
@@ -24,6 +26,13 @@ public AuthorizationManager manager() {
return this.manager;
}
+
+
+ @Override
+ public String emailAddress() {
+ return this.inner().emailAddress();
+ }
+
@Override
public String id() {
return this.inner().id();
@@ -35,8 +44,8 @@ public String name() {
}
@Override
- public ClassicAdministratorProperties properties() {
- return this.inner().properties();
+ public String role() {
+ return this.inner().role();
}
@Override
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java
index 7f18e6610235..c8260ea29b19 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java
@@ -8,12 +8,13 @@
package com.microsoft.azure.management.authorization.v2015_07_01.implementation;
-import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministratorProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
/**
* Classic Administrators.
*/
+@JsonFlatten
public class ClassicAdministratorInner {
/**
* The ID of the administrator.
@@ -34,10 +35,16 @@ public class ClassicAdministratorInner {
private String type;
/**
- * Properties for the classic administrator.
+ * The email address of the administrator.
*/
- @JsonProperty(value = "properties")
- private ClassicAdministratorProperties properties;
+ @JsonProperty(value = "properties.emailAddress")
+ private String emailAddress;
+
+ /**
+ * The role of the administrator.
+ */
+ @JsonProperty(value = "properties.role")
+ private String role;
/**
* Get the ID of the administrator.
@@ -100,22 +107,42 @@ public ClassicAdministratorInner withType(String type) {
}
/**
- * Get properties for the classic administrator.
+ * Get the email address of the administrator.
+ *
+ * @return the emailAddress value
+ */
+ public String emailAddress() {
+ return this.emailAddress;
+ }
+
+ /**
+ * Set the email address of the administrator.
+ *
+ * @param emailAddress the emailAddress value to set
+ * @return the ClassicAdministratorInner object itself.
+ */
+ public ClassicAdministratorInner withEmailAddress(String emailAddress) {
+ this.emailAddress = emailAddress;
+ return this;
+ }
+
+ /**
+ * Get the role of the administrator.
*
- * @return the properties value
+ * @return the role value
*/
- public ClassicAdministratorProperties properties() {
- return this.properties;
+ public String role() {
+ return this.role;
}
/**
- * Set properties for the classic administrator.
+ * Set the role of the administrator.
*
- * @param properties the properties value to set
+ * @param role the role value to set
* @return the ClassicAdministratorInner object itself.
*/
- public ClassicAdministratorInner withProperties(ClassicAdministratorProperties properties) {
- this.properties = properties;
+ public ClassicAdministratorInner withRole(String role) {
+ this.role = role;
return this;
}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java
index 1875e44be030..e5c05e251263 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java
@@ -4,34 +4,53 @@
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * abc
+ * jkl
*/
package com.microsoft.azure.management.authorization.v2015_07_01.implementation;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministrators;
-import rx.functions.Func1;
import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
import com.microsoft.azure.Page;
+import com.microsoft.azure.arm.utils.PagedListConverter;
import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministrator;
class ClassicAdministratorsImpl extends WrapperImpl implements ClassicAdministrators {
+ private PagedListConverter converter;
private final AuthorizationManager manager;
ClassicAdministratorsImpl(AuthorizationManager manager) {
super(manager.inner().classicAdministrators());
this.manager = manager;
+ this.converter = new PagedListConverter() {
+ @Override
+ public Observable typeConvertAsync(ClassicAdministratorInner inner) {
+ return Observable.just((ClassicAdministrator) wrapModel(inner));
+ }
+ };
}
public AuthorizationManager manager() {
return this.manager;
}
+ private ClassicAdministratorImpl wrapModel(ClassicAdministratorInner inner) {
+ return new ClassicAdministratorImpl(inner, manager());
+ }
+
+ @Override
+ public PagedList list() {
+ ClassicAdministratorsInner client = this.inner();
+ return converter.convert(client.list());
+ }
+
@Override
- public Observable listAsync(final String apiVersion) {
+ public Observable listAsync() {
ClassicAdministratorsInner client = this.inner();
- return client.listAsync(apiVersion)
+ return client.listAsync()
.flatMapIterable(new Func1, Iterable>() {
@Override
public Iterable call(Page page) {
@@ -41,7 +60,7 @@ public Iterable call(Page
.map(new Func1() {
@Override
public ClassicAdministrator call(ClassicAdministratorInner inner) {
- return new ClassicAdministratorImpl(inner, manager());
+ return wrapModel(inner);
}
});
}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsInner.java
index d6da92a201ac..52bd3b15b2bf 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsInner.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsInner.java
@@ -69,14 +69,13 @@ interface ClassicAdministratorsService {
/**
* Gets service administrator, account administrator, and co-administrators for the subscription.
*
- * @param apiVersion The API version to use for this operation.
* @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 PagedList<ClassicAdministratorInner> object if successful.
*/
- public PagedList list(final String apiVersion) {
- ServiceResponse> response = listSinglePageAsync(apiVersion).toBlocking().single();
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
return new PagedList(response.body()) {
@Override
public Page nextPage(String nextPageLink) {
@@ -88,14 +87,13 @@ public Page nextPage(String nextPageLink) {
/**
* Gets service administrator, account administrator, and co-administrators for the subscription.
*
- * @param apiVersion The API version to use for this operation.
* @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(final String apiVersion, final ListOperationCallback serviceCallback) {
+ public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) {
return AzureServiceFuture.fromPageResponse(
- listSinglePageAsync(apiVersion),
+ listSinglePageAsync(),
new Func1>>>() {
@Override
public Observable>> call(String nextPageLink) {
@@ -108,12 +106,11 @@ public Observable>> call(String
/**
* Gets service administrator, account administrator, and co-administrators for the subscription.
*
- * @param apiVersion The API version to use for this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ClassicAdministratorInner> object
*/
- public Observable> listAsync(final String apiVersion) {
- return listWithServiceResponseAsync(apiVersion)
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
.map(new Func1>, Page>() {
@Override
public Page call(ServiceResponse> response) {
@@ -125,12 +122,11 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync(final String apiVersion) {
- return listSinglePageAsync(apiVersion)
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
.concatMap(new Func1>, Observable>>>() {
@Override
public Observable>> call(ServiceResponse> page) {
@@ -146,18 +142,17 @@ public Observable>> call(Service
/**
* Gets service administrator, account administrator, and co-administrators for the subscription.
*
- ServiceResponse> * @param apiVersion The API version to use for this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ClassicAdministratorInner> object wrapped in {@link ServiceResponse} if successful.
*/
- public Observable>> listSinglePageAsync(final String apiVersion) {
+ public Observable>> listSinglePageAsync() {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
- if (apiVersion == null) {
- throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null.");
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ElevateAccessImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ElevateAccessImpl.java
new file mode 100644
index 000000000000..4054feaa96ac
--- /dev/null
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ElevateAccessImpl.java
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ * abc
+ */
+
+package com.microsoft.azure.management.authorization.v2015_07_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.authorization.v2015_07_01.ElevateAccess;
+import rx.Completable;
+
+class ElevateAccessImpl extends WrapperImpl implements ElevateAccess {
+ private final AuthorizationManager manager;
+
+ ElevateAccessImpl(AuthorizationManager manager) {
+ super(manager.inner().elevateAccess());
+ this.manager = manager;
+ }
+
+ public AuthorizationManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Completable postAsync() {
+ ElevateAccessInner client = this.inner();
+ return client.postAsync().toCompletable();
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ElevateAccessInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ElevateAccessInner.java
new file mode 100644
index 000000000000..d9e326a9bc91
--- /dev/null
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ElevateAccessInner.java
@@ -0,0 +1,127 @@
+/**
+ * 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.authorization.v2015_07_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+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.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ElevateAccess.
+ */
+public class ElevateAccessInner {
+ /** The Retrofit service to perform REST calls. */
+ private ElevateAccessService service;
+ /** The service client containing this operation class. */
+ private AuthorizationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ElevateAccessInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ElevateAccessInner(Retrofit retrofit, AuthorizationManagementClientImpl client) {
+ this.service = retrofit.create(ElevateAccessService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ElevateAccess to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ElevateAccessService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.authorization.v2015_07_01.ElevateAccess post" })
+ @POST("providers/Microsoft.Authorization/elevateAccess")
+ Observable> post(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @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
+ */
+ public void post() {
+ postWithServiceResponseAsync().toBlocking().single().body();
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @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 postAsync(final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(postWithServiceResponseAsync(), serviceCallback);
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable postAsync() {
+ return postWithServiceResponseAsync().map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> postWithServiceResponseAsync() {
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.post(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = postDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse postDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/GlobalAdministratorsImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/GlobalAdministratorsImpl.java
new file mode 100644
index 000000000000..0d13bd8584b5
--- /dev/null
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/GlobalAdministratorsImpl.java
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ * abc
+ */
+
+package com.microsoft.azure.management.authorization.v2015_07_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.authorization.v2015_07_01.GlobalAdministrators;
+import rx.Completable;
+
+class GlobalAdministratorsImpl extends WrapperImpl implements GlobalAdministrators {
+ private final AuthorizationManager manager;
+
+ GlobalAdministratorsImpl(AuthorizationManager manager) {
+ super(manager.inner().globalAdministrators());
+ this.manager = manager;
+ }
+
+ public AuthorizationManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Completable elevateAccessAsync() {
+ GlobalAdministratorsInner client = this.inner();
+ return client.elevateAccessAsync().toCompletable();
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/GlobalAdministratorsInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/GlobalAdministratorsInner.java
new file mode 100644
index 000000000000..298db8fb4bd6
--- /dev/null
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/GlobalAdministratorsInner.java
@@ -0,0 +1,127 @@
+/**
+ * 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.authorization.v2015_07_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+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.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in GlobalAdministrators.
+ */
+public class GlobalAdministratorsInner {
+ /** The Retrofit service to perform REST calls. */
+ private GlobalAdministratorsService service;
+ /** The service client containing this operation class. */
+ private AuthorizationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of GlobalAdministratorsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public GlobalAdministratorsInner(Retrofit retrofit, AuthorizationManagementClientImpl client) {
+ this.service = retrofit.create(GlobalAdministratorsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for GlobalAdministrators to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface GlobalAdministratorsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.authorization.v2015_07_01.GlobalAdministrators elevateAccess" })
+ @POST("providers/Microsoft.Authorization/elevateAccess")
+ Observable> elevateAccess(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @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
+ */
+ public void elevateAccess() {
+ elevateAccessWithServiceResponseAsync().toBlocking().single().body();
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @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 elevateAccessAsync(final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(elevateAccessWithServiceResponseAsync(), serviceCallback);
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable elevateAccessAsync() {
+ return elevateAccessWithServiceResponseAsync().map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Elevates access for a Global Administrator.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> elevateAccessWithServiceResponseAsync() {
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.elevateAccess(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = elevateAccessDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse elevateAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java
index ac4f77c3aafc..78b99229dba5 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java
@@ -12,15 +12,13 @@
import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinition;
import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
import rx.Observable;
-import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitionProperties;
import java.util.List;
-import rx.functions.Func1;
+import java.util.ArrayList;
+import com.microsoft.azure.management.authorization.v2015_07_01.Permission;
class RoleDefinitionImpl extends CreatableUpdatableImpl implements RoleDefinition, RoleDefinition.Definition, RoleDefinition.Update {
private String scope;
private String roleDefinitionId;
- private RoleDefinitionProperties cproperties;
- private RoleDefinitionProperties uproperties;
private final AuthorizationManager manager;
RoleDefinitionImpl(String name, AuthorizationManager manager) {
@@ -29,8 +27,6 @@ class RoleDefinitionImpl extends CreatableUpdatableImpl createResourceAsync() {
RoleDefinitionsInner client = this.manager().inner().roleDefinitions();
- return client.createOrUpdateAsync(this.scope, this.roleDefinitionId, this.cproperties)
- .map(new Func1() {
- @Override
- public RoleDefinitionInner call(RoleDefinitionInner resource) {
- resetCreateUpdateParameters();
- return resource;
- }
- })
+ return client.createOrUpdateAsync(this.scope, this.roleDefinitionId, this.inner())
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
RoleDefinitionsInner client = this.manager().inner().roleDefinitions();
- return client.createOrUpdateAsync(this.scope, this.roleDefinitionId, this.uproperties)
- .map(new Func1() {
- @Override
- public RoleDefinitionInner call(RoleDefinitionInner resource) {
- resetCreateUpdateParameters();
- return resource;
- }
- })
+ return client.createOrUpdateAsync(this.scope, this.roleDefinitionId, this.inner())
.map(innerToFluentMap(this));
}
@@ -90,9 +70,15 @@ public boolean isInCreateMode() {
return this.inner().id() == null;
}
- private void resetCreateUpdateParameters() {
- this.cproperties = new RoleDefinitionProperties();
- this.uproperties = new RoleDefinitionProperties();
+
+ @Override
+ public List assignableScopes() {
+ return this.inner().assignableScopes();
+ }
+
+ @Override
+ public String description() {
+ return this.inner().description();
}
@Override
@@ -106,8 +92,24 @@ public String name() {
}
@Override
- public RoleDefinitionProperties properties() {
- return this.inner().properties();
+ public List permissions() {
+ List lst = new ArrayList();
+ if (this.inner().permissions() != null) {
+ for (PermissionInner inner : this.inner().permissions()) {
+ lst.add( new PermissionImpl(inner, manager()));
+ }
+ }
+ return lst;
+ }
+
+ @Override
+ public String roleName() {
+ return this.inner().roleName();
+ }
+
+ @Override
+ public String roleType() {
+ return this.inner().roleType();
}
@Override
@@ -122,12 +124,32 @@ public RoleDefinitionImpl withScope(String scope) {
}
@Override
- public RoleDefinitionImpl withProperties(RoleDefinitionProperties properties) {
- if (isInCreateMode()) {
- this.cproperties = properties;
- } else {
- this.uproperties = properties;
- }
+ public RoleDefinitionImpl withAssignableScopes(List assignableScopes) {
+ this.inner().withAssignableScopes(assignableScopes);
+ return this;
+ }
+
+ @Override
+ public RoleDefinitionImpl withDescription(String description) {
+ this.inner().withDescription(description);
+ return this;
+ }
+
+ @Override
+ public RoleDefinitionImpl withPermissions(List permissions) {
+ this.inner().withPermissions(permissions);
+ return this;
+ }
+
+ @Override
+ public RoleDefinitionImpl withRoleName(String roleName) {
+ this.inner().withRoleName(roleName);
+ return this;
+ }
+
+ @Override
+ public RoleDefinitionImpl withRoleType(String roleType) {
+ this.inner().withRoleType(roleType);
return this;
}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java
index b9051b7e60a7..8241bb9f4baa 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java
@@ -8,12 +8,14 @@
package com.microsoft.azure.management.authorization.v2015_07_01.implementation;
-import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitionProperties;
+import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
/**
* Role definition.
*/
+@JsonFlatten
public class RoleDefinitionInner {
/**
* The role definition ID.
@@ -34,10 +36,34 @@ public class RoleDefinitionInner {
private String type;
/**
- * Role definition properties.
+ * The role name.
*/
- @JsonProperty(value = "properties")
- private RoleDefinitionProperties properties;
+ @JsonProperty(value = "properties.roleName")
+ private String roleName;
+
+ /**
+ * The role definition description.
+ */
+ @JsonProperty(value = "properties.description")
+ private String description;
+
+ /**
+ * The role type.
+ */
+ @JsonProperty(value = "properties.type")
+ private String roleType;
+
+ /**
+ * Role definition permissions.
+ */
+ @JsonProperty(value = "properties.permissions")
+ private List permissions;
+
+ /**
+ * Role definition assignable scopes.
+ */
+ @JsonProperty(value = "properties.assignableScopes")
+ private List assignableScopes;
/**
* Get the role definition ID.
@@ -67,22 +93,102 @@ public String type() {
}
/**
- * Get role definition properties.
+ * Get the role name.
+ *
+ * @return the roleName value
+ */
+ public String roleName() {
+ return this.roleName;
+ }
+
+ /**
+ * Set the role name.
+ *
+ * @param roleName the roleName value to set
+ * @return the RoleDefinitionInner object itself.
+ */
+ public RoleDefinitionInner withRoleName(String roleName) {
+ this.roleName = roleName;
+ return this;
+ }
+
+ /**
+ * Get the role definition description.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the role definition description.
+ *
+ * @param description the description value to set
+ * @return the RoleDefinitionInner object itself.
+ */
+ public RoleDefinitionInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the role type.
+ *
+ * @return the roleType value
+ */
+ public String roleType() {
+ return this.roleType;
+ }
+
+ /**
+ * Set the role type.
+ *
+ * @param roleType the roleType value to set
+ * @return the RoleDefinitionInner object itself.
+ */
+ public RoleDefinitionInner withRoleType(String roleType) {
+ this.roleType = roleType;
+ return this;
+ }
+
+ /**
+ * Get role definition permissions.
+ *
+ * @return the permissions value
+ */
+ public List permissions() {
+ return this.permissions;
+ }
+
+ /**
+ * Set role definition permissions.
+ *
+ * @param permissions the permissions value to set
+ * @return the RoleDefinitionInner object itself.
+ */
+ public RoleDefinitionInner withPermissions(List permissions) {
+ this.permissions = permissions;
+ return this;
+ }
+
+ /**
+ * Get role definition assignable scopes.
*
- * @return the properties value
+ * @return the assignableScopes value
*/
- public RoleDefinitionProperties properties() {
- return this.properties;
+ public List assignableScopes() {
+ return this.assignableScopes;
}
/**
- * Set role definition properties.
+ * Set role definition assignable scopes.
*
- * @param properties the properties value to set
+ * @param assignableScopes the assignableScopes value to set
* @return the RoleDefinitionInner object itself.
*/
- public RoleDefinitionInner withProperties(RoleDefinitionProperties properties) {
- this.properties = properties;
+ public RoleDefinitionInner withAssignableScopes(List assignableScopes) {
+ this.assignableScopes = assignableScopes;
return this;
}
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsInner.java
index e3cd36b4a3e8..108f7a2a77da 100644
--- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsInner.java
+++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsInner.java
@@ -14,7 +14,6 @@
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.ListOperationCallback;
-import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitionProperties;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.ServiceCallback;
@@ -73,7 +72,7 @@ interface RoleDefinitionsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitions createOrUpdate" })
@PUT("{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}")
- Observable> createOrUpdate(@Path(value = "scope", encoded = true) String scope, @Path("roleDefinitionId") String roleDefinitionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RoleDefinitionInner roleDefinition, @Header("User-Agent") String userAgent);
+ Observable> createOrUpdate(@Path(value = "scope", encoded = true) String scope, @Path("roleDefinitionId") String roleDefinitionId, @Body RoleDefinitionInner roleDefinition, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitions list" })
@GET("{scope}/providers/Microsoft.Authorization/roleDefinitions")
@@ -260,13 +259,14 @@ private ServiceResponse getDelegate(Response
*
* @param scope The scope of the role definition.
* @param roleDefinitionId The ID of the role definition.
+ * @param roleDefinition The values for the role definition.
* @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 RoleDefinitionInner object if successful.
*/
- public RoleDefinitionInner createOrUpdate(String scope, String roleDefinitionId) {
- return createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId).toBlocking().single().body();
+ public RoleDefinitionInner createOrUpdate(String scope, String roleDefinitionId, RoleDefinitionInner roleDefinition) {
+ return createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId, roleDefinition).toBlocking().single().body();
}
/**
@@ -274,12 +274,13 @@ public RoleDefinitionInner createOrUpdate(String scope, String roleDefinitionId)
*
* @param scope The scope of the role definition.
* @param roleDefinitionId The ID of the role definition.
+ * @param roleDefinition The values for the role definition.
* @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 createOrUpdateAsync(String scope, String roleDefinitionId, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId), serviceCallback);
+ public ServiceFuture createOrUpdateAsync(String scope, String roleDefinitionId, RoleDefinitionInner roleDefinition, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId, roleDefinition), serviceCallback);
}
/**
@@ -287,11 +288,12 @@ public ServiceFuture createOrUpdateAsync(String scope, Stri
*
* @param scope The scope of the role definition.
* @param roleDefinitionId The ID of the role definition.
+ * @param roleDefinition The values for the role definition.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the RoleDefinitionInner object
*/
- public Observable createOrUpdateAsync(String scope, String roleDefinitionId) {
- return createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId).map(new Func1, RoleDefinitionInner>() {
+ public Observable createOrUpdateAsync(String scope, String roleDefinitionId, RoleDefinitionInner roleDefinition) {
+ return createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId, roleDefinition).map(new Func1, RoleDefinitionInner>() {
@Override
public RoleDefinitionInner call(ServiceResponse response) {
return response.body();
@@ -304,106 +306,25 @@ public RoleDefinitionInner call(ServiceResponse response) {
*
* @param scope The scope of the role definition.
* @param roleDefinitionId The ID of the role definition.
+ * @param roleDefinition The values for the role definition.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the RoleDefinitionInner object
*/
- public Observable> createOrUpdateWithServiceResponseAsync(String scope, String roleDefinitionId) {
+ public Observable> createOrUpdateWithServiceResponseAsync(String scope, String roleDefinitionId, RoleDefinitionInner roleDefinition) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (roleDefinitionId == null) {
throw new IllegalArgumentException("Parameter roleDefinitionId is required and cannot be null.");
}
- if (this.client.apiVersion() == null) {
- throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
- }
- final RoleDefinitionProperties properties = null;
- RoleDefinitionInner roleDefinition = new RoleDefinitionInner();
- roleDefinition.withProperties(null);
- return service.createOrUpdate(scope, roleDefinitionId, this.client.apiVersion(), this.client.acceptLanguage(), roleDefinition, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
- @Override
- public Observable> call(Response response) {
- try {
- ServiceResponse clientResponse = createOrUpdateDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
- /**
- * Creates or updates a role definition.
- *
- * @param scope The scope of the role definition.
- * @param roleDefinitionId The ID of the role definition.
- * @param properties Role definition properties.
- * @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 RoleDefinitionInner object if successful.
- */
- public RoleDefinitionInner createOrUpdate(String scope, String roleDefinitionId, RoleDefinitionProperties properties) {
- return createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId, properties).toBlocking().single().body();
- }
-
- /**
- * Creates or updates a role definition.
- *
- * @param scope The scope of the role definition.
- * @param roleDefinitionId The ID of the role definition.
- * @param properties Role definition properties.
- * @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 createOrUpdateAsync(String scope, String roleDefinitionId, RoleDefinitionProperties properties, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId, properties), serviceCallback);
- }
-
- /**
- * Creates or updates a role definition.
- *
- * @param scope The scope of the role definition.
- * @param roleDefinitionId The ID of the role definition.
- * @param properties Role definition properties.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the RoleDefinitionInner object
- */
- public Observable createOrUpdateAsync(String scope, String roleDefinitionId, RoleDefinitionProperties properties) {
- return createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId, properties).map(new Func1, RoleDefinitionInner>() {
- @Override
- public RoleDefinitionInner call(ServiceResponse response) {
- return response.body();
- }
- });
- }
-
- /**
- * Creates or updates a role definition.
- *
- * @param scope The scope of the role definition.
- * @param roleDefinitionId The ID of the role definition.
- * @param properties Role definition properties.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the RoleDefinitionInner object
- */
- public Observable> createOrUpdateWithServiceResponseAsync(String scope, String roleDefinitionId, RoleDefinitionProperties properties) {
- if (scope == null) {
- throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
- }
- if (roleDefinitionId == null) {
- throw new IllegalArgumentException("Parameter roleDefinitionId is required and cannot be null.");
+ if (roleDefinition == null) {
+ throw new IllegalArgumentException("Parameter roleDefinition is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- Validator.validate(properties);
- RoleDefinitionInner roleDefinition = new RoleDefinitionInner();
- roleDefinition.withProperties(properties);
- return service.createOrUpdate(scope, roleDefinitionId, this.client.apiVersion(), this.client.acceptLanguage(), roleDefinition, this.client.userAgent())
+ Validator.validate(roleDefinition);
+ return service.createOrUpdate(scope, roleDefinitionId, roleDefinition, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
diff --git a/authorization/resource-manager/v2018_07_01_preview/pom.xml b/authorization/resource-manager/v2018_07_01_preview/pom.xml
new file mode 100644
index 000000000000..c882ebec8a22
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.authorization.v2018_07_01_preview
+
+