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/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
+
+ 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/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignment.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignment.java
new file mode 100644
index 000000000000..0bf07b0c704f
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignment.java
@@ -0,0 +1,76 @@
+/**
+ * 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.v2018_07_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.implementation.AuthorizationManager;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.implementation.DenyAssignmentInner;
+import java.util.List;
+
+/**
+ * Type representing DenyAssignment.
+ */
+public interface DenyAssignment extends HasInner, HasManager {
+ /**
+ * @return the denyAssignmentName value.
+ */
+ String denyAssignmentName();
+
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the doNotApplyToChildScopes value.
+ */
+ Boolean doNotApplyToChildScopes();
+
+ /**
+ * @return the excludePrincipals value.
+ */
+ List excludePrincipals();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the isSystemProtected value.
+ */
+ Boolean isSystemProtected();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the permissions value.
+ */
+ List permissions();
+
+ /**
+ * @return the principals value.
+ */
+ List principals();
+
+ /**
+ * @return the scope value.
+ */
+ String scope();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignmentFilter.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignmentFilter.java
new file mode 100644
index 000000000000..d940bbee9e06
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignmentFilter.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.authorization.v2018_07_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Deny Assignments filter.
+ */
+public class DenyAssignmentFilter {
+ /**
+ * Return deny assignment with specified name.
+ */
+ @JsonProperty(value = "denyAssignmentName")
+ private String denyAssignmentName;
+
+ /**
+ * Return all deny assignments where the specified principal is listed in
+ * the principals list of deny assignments.
+ */
+ @JsonProperty(value = "principalId")
+ private String principalId;
+
+ /**
+ * Return all deny assignments where the specified principal is listed
+ * either in the principals list or exclude principals list of deny
+ * assignments.
+ */
+ @JsonProperty(value = "gdprExportPrincipalId")
+ private String gdprExportPrincipalId;
+
+ /**
+ * Get return deny assignment with specified name.
+ *
+ * @return the denyAssignmentName value
+ */
+ public String denyAssignmentName() {
+ return this.denyAssignmentName;
+ }
+
+ /**
+ * Set return deny assignment with specified name.
+ *
+ * @param denyAssignmentName the denyAssignmentName value to set
+ * @return the DenyAssignmentFilter object itself.
+ */
+ public DenyAssignmentFilter withDenyAssignmentName(String denyAssignmentName) {
+ this.denyAssignmentName = denyAssignmentName;
+ return this;
+ }
+
+ /**
+ * Get return all deny assignments where the specified principal is listed in the principals list of deny assignments.
+ *
+ * @return the principalId value
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set return all deny assignments where the specified principal is listed in the principals list of deny assignments.
+ *
+ * @param principalId the principalId value to set
+ * @return the DenyAssignmentFilter object itself.
+ */
+ public DenyAssignmentFilter withPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+
+ /**
+ * Get return all deny assignments where the specified principal is listed either in the principals list or exclude principals list of deny assignments.
+ *
+ * @return the gdprExportPrincipalId value
+ */
+ public String gdprExportPrincipalId() {
+ return this.gdprExportPrincipalId;
+ }
+
+ /**
+ * Set return all deny assignments where the specified principal is listed either in the principals list or exclude principals list of deny assignments.
+ *
+ * @param gdprExportPrincipalId the gdprExportPrincipalId value to set
+ * @return the DenyAssignmentFilter object itself.
+ */
+ public DenyAssignmentFilter withGdprExportPrincipalId(String gdprExportPrincipalId) {
+ this.gdprExportPrincipalId = gdprExportPrincipalId;
+ return this;
+ }
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignmentPermission.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignmentPermission.java
new file mode 100644
index 000000000000..43b7ccf3d3c4
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignmentPermission.java
@@ -0,0 +1,123 @@
+/**
+ * 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.v2018_07_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Deny assignment permissions.
+ */
+public class DenyAssignmentPermission {
+ /**
+ * Actions to which the deny assignment does not grant access.
+ */
+ @JsonProperty(value = "actions")
+ private List actions;
+
+ /**
+ * Actions to exclude from that the deny assignment does not grant access.
+ */
+ @JsonProperty(value = "notActions")
+ private List notActions;
+
+ /**
+ * Data actions to which the deny assignment does not grant access.
+ */
+ @JsonProperty(value = "dataActions")
+ private List dataActions;
+
+ /**
+ * Data actions to exclude from that the deny assignment does not grant
+ * access.
+ */
+ @JsonProperty(value = "notDataActions")
+ private List notDataActions;
+
+ /**
+ * Get actions to which the deny assignment does not grant access.
+ *
+ * @return the actions value
+ */
+ public List actions() {
+ return this.actions;
+ }
+
+ /**
+ * Set actions to which the deny assignment does not grant access.
+ *
+ * @param actions the actions value to set
+ * @return the DenyAssignmentPermission object itself.
+ */
+ public DenyAssignmentPermission withActions(List actions) {
+ this.actions = actions;
+ return this;
+ }
+
+ /**
+ * Get actions to exclude from that the deny assignment does not grant access.
+ *
+ * @return the notActions value
+ */
+ public List notActions() {
+ return this.notActions;
+ }
+
+ /**
+ * Set actions to exclude from that the deny assignment does not grant access.
+ *
+ * @param notActions the notActions value to set
+ * @return the DenyAssignmentPermission object itself.
+ */
+ public DenyAssignmentPermission withNotActions(List notActions) {
+ this.notActions = notActions;
+ return this;
+ }
+
+ /**
+ * Get data actions to which the deny assignment does not grant access.
+ *
+ * @return the dataActions value
+ */
+ public List dataActions() {
+ return this.dataActions;
+ }
+
+ /**
+ * Set data actions to which the deny assignment does not grant access.
+ *
+ * @param dataActions the dataActions value to set
+ * @return the DenyAssignmentPermission object itself.
+ */
+ public DenyAssignmentPermission withDataActions(List dataActions) {
+ this.dataActions = dataActions;
+ return this;
+ }
+
+ /**
+ * Get data actions to exclude from that the deny assignment does not grant access.
+ *
+ * @return the notDataActions value
+ */
+ public List notDataActions() {
+ return this.notDataActions;
+ }
+
+ /**
+ * Set data actions to exclude from that the deny assignment does not grant access.
+ *
+ * @param notDataActions the notDataActions value to set
+ * @return the DenyAssignmentPermission object itself.
+ */
+ public DenyAssignmentPermission withNotDataActions(List notDataActions) {
+ this.notDataActions = notDataActions;
+ return this;
+ }
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignments.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignments.java
new file mode 100644
index 000000000000..2d14f4e87c40
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/DenyAssignments.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.v2018_07_01_preview;
+
+import rx.Observable;
+
+/**
+ * Type representing DenyAssignments.
+ */
+public interface DenyAssignments {
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName);
+
+ /**
+ * Get the specified deny assignment.
+ *
+ * @param scope The scope of the deny assignment.
+ * @param denyAssignmentId The ID of the deny assignment to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String scope, String denyAssignmentId);
+
+ /**
+ * Gets a deny assignment by ID.
+ *
+ * @param denyAssignmentId The fully qualified deny assignment ID. For example, use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for subscription level deny assignments, or /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for tenant level deny assignments.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByIdAsync(String denyAssignmentId);
+
+ /**
+ * Gets deny assignments for a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupAsync(final String resourceGroupName);
+
+ /**
+ * Gets all deny assignments for the subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+ /**
+ * Gets deny assignments for a scope.
+ *
+ * @param scope The scope of the deny assignments.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listForScopeAsync(final String scope);
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/Principal.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/Principal.java
new file mode 100644
index 000000000000..d95bf3720271
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/Principal.java
@@ -0,0 +1,53 @@
+/**
+ * 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.v2018_07_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Deny assignment principal.
+ */
+public class Principal {
+ /**
+ * Object ID of the Azure AD principal (user, group, or service principal)
+ * to which the deny assignment applies. An empty guid
+ * '00000000-0000-0000-0000-000000000000' as principal id and principal
+ * type as 'Everyone' represents all users, groups and service principals.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /**
+ * Type of object represented by principal id (user, group, or service
+ * principal). An empty guid '00000000-0000-0000-0000-000000000000' as
+ * principal id and principal type as 'Everyone' represents all users,
+ * groups and service principals.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /**
+ * Get object ID of the Azure AD principal (user, group, or service principal) to which the deny assignment applies. An empty guid '00000000-0000-0000-0000-000000000000' as principal id and principal type as 'Everyone' represents all users, groups and service principals.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get type of object represented by principal id (user, group, or service principal). An empty guid '00000000-0000-0000-0000-000000000000' as principal id and principal type as 'Everyone' represents all users, groups and service principals.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/AuthorizationManagementClientImpl.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/AuthorizationManagementClientImpl.java
new file mode 100644
index 000000000000..3fa2f0a37f64
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/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.v2018_07_01_preview.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 DenyAssignmentsInner object to access its operations.
+ */
+ private DenyAssignmentsInner denyAssignments;
+
+ /**
+ * Gets the DenyAssignmentsInner object to access its operations.
+ * @return the DenyAssignmentsInner object.
+ */
+ public DenyAssignmentsInner denyAssignments() {
+ return this.denyAssignments;
+ }
+
+ /**
+ * 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 = "2018-07-01-preview";
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.denyAssignments = new DenyAssignmentsInner(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", "2018-07-01-preview");
+ }
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/AuthorizationManager.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/AuthorizationManager.java
new file mode 100644
index 000000000000..04c02da17121
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/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.v2018_07_01_preview.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.v2018_07_01_preview.DenyAssignments;
+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 DenyAssignments denyAssignments;
+ /**
+ * 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 DenyAssignments.
+ */
+ public DenyAssignments denyAssignments() {
+ if (this.denyAssignments == null) {
+ this.denyAssignments = new DenyAssignmentsImpl(this);
+ }
+ return this.denyAssignments;
+ }
+
+ /**
+ * 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/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentImpl.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentImpl.java
new file mode 100644
index 000000000000..6dea8a7f7cc6
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentImpl.java
@@ -0,0 +1,84 @@
+/**
+ * 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.v2018_07_01_preview.implementation;
+
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.DenyAssignment;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.List;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.Principal;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.DenyAssignmentPermission;
+
+class DenyAssignmentImpl extends WrapperImpl implements DenyAssignment {
+ private final AuthorizationManager manager;
+ DenyAssignmentImpl(DenyAssignmentInner inner, AuthorizationManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public AuthorizationManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String denyAssignmentName() {
+ return this.inner().denyAssignmentName();
+ }
+
+ @Override
+ public String description() {
+ return this.inner().description();
+ }
+
+ @Override
+ public Boolean doNotApplyToChildScopes() {
+ return this.inner().doNotApplyToChildScopes();
+ }
+
+ @Override
+ public List excludePrincipals() {
+ return this.inner().excludePrincipals();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public Boolean isSystemProtected() {
+ return this.inner().isSystemProtected();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public List permissions() {
+ return this.inner().permissions();
+ }
+
+ @Override
+ public List principals() {
+ return this.inner().principals();
+ }
+
+ @Override
+ public String scope() {
+ return this.inner().scope();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentInner.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentInner.java
new file mode 100644
index 000000000000..e0d46bcc2926
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentInner.java
@@ -0,0 +1,277 @@
+/**
+ * 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.v2018_07_01_preview.implementation;
+
+import java.util.List;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.DenyAssignmentPermission;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.Principal;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Deny Assignment.
+ */
+@JsonFlatten
+public class DenyAssignmentInner {
+ /**
+ * The deny assignment ID.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /**
+ * The deny assignment name.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /**
+ * The deny assignment type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /**
+ * The display name of the deny assignment.
+ */
+ @JsonProperty(value = "properties.denyAssignmentName")
+ private String denyAssignmentName;
+
+ /**
+ * The description of the deny assignment.
+ */
+ @JsonProperty(value = "properties.description")
+ private String description;
+
+ /**
+ * An array of permissions that are denied by the deny assignment.
+ */
+ @JsonProperty(value = "properties.permissions")
+ private List permissions;
+
+ /**
+ * The deny assignment scope.
+ */
+ @JsonProperty(value = "properties.scope")
+ private String scope;
+
+ /**
+ * Determines if the deny assignment applies to child scopes. Default value
+ * is false.
+ */
+ @JsonProperty(value = "properties.doNotApplyToChildScopes")
+ private Boolean doNotApplyToChildScopes;
+
+ /**
+ * Array of principals to which the deny assignment applies.
+ */
+ @JsonProperty(value = "properties.principals")
+ private List principals;
+
+ /**
+ * Array of principals to which the deny assignment does not apply.
+ */
+ @JsonProperty(value = "properties.excludePrincipals")
+ private List excludePrincipals;
+
+ /**
+ * Specifies whether this deny assignment was created by Azure and cannot
+ * be edited or deleted.
+ */
+ @JsonProperty(value = "properties.isSystemProtected")
+ private Boolean isSystemProtected;
+
+ /**
+ * Get the deny assignment ID.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the deny assignment name.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the deny assignment type.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the display name of the deny assignment.
+ *
+ * @return the denyAssignmentName value
+ */
+ public String denyAssignmentName() {
+ return this.denyAssignmentName;
+ }
+
+ /**
+ * Set the display name of the deny assignment.
+ *
+ * @param denyAssignmentName the denyAssignmentName value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withDenyAssignmentName(String denyAssignmentName) {
+ this.denyAssignmentName = denyAssignmentName;
+ return this;
+ }
+
+ /**
+ * Get the description of the deny assignment.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description of the deny assignment.
+ *
+ * @param description the description value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get an array of permissions that are denied by the deny assignment.
+ *
+ * @return the permissions value
+ */
+ public List permissions() {
+ return this.permissions;
+ }
+
+ /**
+ * Set an array of permissions that are denied by the deny assignment.
+ *
+ * @param permissions the permissions value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withPermissions(List permissions) {
+ this.permissions = permissions;
+ return this;
+ }
+
+ /**
+ * Get the deny assignment scope.
+ *
+ * @return the scope value
+ */
+ public String scope() {
+ return this.scope;
+ }
+
+ /**
+ * Set the deny assignment scope.
+ *
+ * @param scope the scope value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+ /**
+ * Get determines if the deny assignment applies to child scopes. Default value is false.
+ *
+ * @return the doNotApplyToChildScopes value
+ */
+ public Boolean doNotApplyToChildScopes() {
+ return this.doNotApplyToChildScopes;
+ }
+
+ /**
+ * Set determines if the deny assignment applies to child scopes. Default value is false.
+ *
+ * @param doNotApplyToChildScopes the doNotApplyToChildScopes value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withDoNotApplyToChildScopes(Boolean doNotApplyToChildScopes) {
+ this.doNotApplyToChildScopes = doNotApplyToChildScopes;
+ return this;
+ }
+
+ /**
+ * Get array of principals to which the deny assignment applies.
+ *
+ * @return the principals value
+ */
+ public List principals() {
+ return this.principals;
+ }
+
+ /**
+ * Set array of principals to which the deny assignment applies.
+ *
+ * @param principals the principals value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withPrincipals(List principals) {
+ this.principals = principals;
+ return this;
+ }
+
+ /**
+ * Get array of principals to which the deny assignment does not apply.
+ *
+ * @return the excludePrincipals value
+ */
+ public List excludePrincipals() {
+ return this.excludePrincipals;
+ }
+
+ /**
+ * Set array of principals to which the deny assignment does not apply.
+ *
+ * @param excludePrincipals the excludePrincipals value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withExcludePrincipals(List excludePrincipals) {
+ this.excludePrincipals = excludePrincipals;
+ return this;
+ }
+
+ /**
+ * Get specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
+ *
+ * @return the isSystemProtected value
+ */
+ public Boolean isSystemProtected() {
+ return this.isSystemProtected;
+ }
+
+ /**
+ * Set specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
+ *
+ * @param isSystemProtected the isSystemProtected value to set
+ * @return the DenyAssignmentInner object itself.
+ */
+ public DenyAssignmentInner withIsSystemProtected(Boolean isSystemProtected) {
+ this.isSystemProtected = isSystemProtected;
+ return this;
+ }
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentsImpl.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentsImpl.java
new file mode 100644
index 000000000000..4e3623c70e54
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentsImpl.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.
+ * abc
+ */
+
+package com.microsoft.azure.management.authorization.v2018_07_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.DenyAssignments;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.authorization.v2018_07_01_preview.DenyAssignment;
+
+class DenyAssignmentsImpl extends WrapperImpl implements DenyAssignments {
+ private final AuthorizationManager manager;
+
+ DenyAssignmentsImpl(AuthorizationManager manager) {
+ super(manager.inner().denyAssignments());
+ this.manager = manager;
+ }
+
+ public AuthorizationManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName) {
+ DenyAssignmentsInner client = this.inner();
+ return client.listForResourceAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DenyAssignment call(DenyAssignmentInner inner) {
+ return new DenyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String scope, String denyAssignmentId) {
+ DenyAssignmentsInner client = this.inner();
+ return client.getAsync(scope, denyAssignmentId)
+ .map(new Func1() {
+ @Override
+ public DenyAssignment call(DenyAssignmentInner inner) {
+ return new DenyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable getByIdAsync(String denyAssignmentId) {
+ DenyAssignmentsInner client = this.inner();
+ return client.getByIdAsync(denyAssignmentId)
+ .map(new Func1() {
+ @Override
+ public DenyAssignment call(DenyAssignmentInner inner) {
+ return new DenyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listByResourceGroupAsync(final String resourceGroupName) {
+ DenyAssignmentsInner client = this.inner();
+ return client.listByResourceGroupAsync(resourceGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DenyAssignment call(DenyAssignmentInner inner) {
+ return new DenyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listAsync() {
+ DenyAssignmentsInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DenyAssignment call(DenyAssignmentInner inner) {
+ return new DenyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listForScopeAsync(final String scope) {
+ DenyAssignmentsInner client = this.inner();
+ return client.listForScopeAsync(scope)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DenyAssignment call(DenyAssignmentInner inner) {
+ return new DenyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentsInner.java b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentsInner.java
new file mode 100644
index 000000000000..88200028e43d
--- /dev/null
+++ b/authorization/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_07_01_preview/implementation/DenyAssignmentsInner.java
@@ -0,0 +1,1664 @@
+/**
+ * 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.v2018_07_01_preview.implementation;
+
+import com.microsoft.azure.arm.collection.InnerSupportsListing;
+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.ServiceCallback;
+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 DenyAssignments.
+ */
+public class DenyAssignmentsInner implements InnerSupportsListing {
+ /** The Retrofit service to perform REST calls. */
+ private DenyAssignmentsService service;
+ /** The service client containing this operation class. */
+ private AuthorizationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DenyAssignmentsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public DenyAssignmentsInner(Retrofit retrofit, AuthorizationManagementClientImpl client) {
+ this.service = retrofit.create(DenyAssignmentsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DenyAssignments to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface DenyAssignmentsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.authorization.v2018_07_01_preview.DenyAssignments listForResource" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/denyAssignments")
+ Observable> listForResource(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceProviderNamespace") String resourceProviderNamespace, @Path(value = "parentResourcePath", encoded = true) String parentResourcePath, @Path(value = "resourceType", encoded = true) String resourceType, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.v2018_07_01_preview.DenyAssignments listByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/denyAssignments")
+ Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.v2018_07_01_preview.DenyAssignments list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.Authorization/denyAssignments")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.v2018_07_01_preview.DenyAssignments get" })
+ @GET("{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}")
+ Observable> get(@Path(value = "scope", encoded = true) String scope, @Path("denyAssignmentId") String denyAssignmentId, @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.v2018_07_01_preview.DenyAssignments getById" })
+ @GET("{denyAssignmentId}")
+ Observable> getById(@Path(value = "denyAssignmentId", encoded = true) String denyAssignmentId, @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.v2018_07_01_preview.DenyAssignments listForScope" })
+ @GET("{scope}/providers/Microsoft.Authorization/denyAssignments")
+ Observable> listForScope(@Path(value = "scope", encoded = true) String scope, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.v2018_07_01_preview.DenyAssignments listForResourceNext" })
+ @GET
+ Observable> listForResourceNext(@Url String nextUrl, @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.v2018_07_01_preview.DenyAssignments listByResourceGroupNext" })
+ @GET
+ Observable> listByResourceGroupNext(@Url String nextUrl, @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.v2018_07_01_preview.DenyAssignments listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @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.v2018_07_01_preview.DenyAssignments listForScopeNext" })
+ @GET
+ Observable> listForScopeNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @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<DenyAssignmentInner> object if successful.
+ */
+ public PagedList listForResource(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName) {
+ ServiceResponse> response = listForResourceSinglePageAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listForResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @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> listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listForResourceSinglePageAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listForResourceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DenyAssignmentInner> object
+ */
+ public Observable> listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName) {
+ return listForResourceWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DenyAssignmentInner> object
+ */
+ public Observable>> listForResourceWithServiceResponseAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName) {
+ return listForResourceSinglePageAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
+ .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(listForResourceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DenyAssignmentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listForResourceSinglePageAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceProviderNamespace == null) {
+ throw new IllegalArgumentException("Parameter resourceProviderNamespace is required and cannot be null.");
+ }
+ if (parentResourcePath == null) {
+ throw new IllegalArgumentException("Parameter parentResourcePath is required and cannot be null.");
+ }
+ if (resourceType == null) {
+ throw new IllegalArgumentException("Parameter resourceType is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName 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 String filter = null;
+ return service.listForResource(this.client.subscriptionId(), resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, this.client.apiVersion(), filter, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listForResourceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @param filter The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.
+ * @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<DenyAssignmentInner> object if successful.
+ */
+ public PagedList listForResource(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final String filter) {
+ ServiceResponse> response = listForResourceSinglePageAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listForResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @param filter The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.
+ * @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> listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final String filter, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listForResourceSinglePageAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listForResourceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @param filter The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DenyAssignmentInner> object
+ */
+ public Observable> listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final String filter) {
+ return listForResourceWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource.
+ * @param resourceName The name of the resource to get deny assignments for.
+ * @param filter The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DenyAssignmentInner> object
+ */
+ public Observable>> listForResourceWithServiceResponseAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final String filter) {
+ return listForResourceSinglePageAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
+ .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(listForResourceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets deny assignments for a resource.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group.
+ ServiceResponse> * @param resourceProviderNamespace The namespace of the resource provider.
+ ServiceResponse> * @param parentResourcePath The parent resource identity.
+ ServiceResponse> * @param resourceType The resource type of the resource.
+ ServiceResponse> * @param resourceName The name of the resource to get deny assignments for.
+ ServiceResponse> * @param filter The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DenyAssignmentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listForResourceSinglePageAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final String filter) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceProviderNamespace == null) {
+ throw new IllegalArgumentException("Parameter resourceProviderNamespace is required and cannot be null.");
+ }
+ if (parentResourcePath == null) {
+ throw new IllegalArgumentException("Parameter parentResourcePath is required and cannot be null.");
+ }
+ if (resourceType == null) {
+ throw new IllegalArgumentException("Parameter resourceType is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName 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.listForResource(this.client.subscriptionId(), resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, this.client.apiVersion(), filter, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listForResourceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listForResourceDelegate(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 deny assignments for a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @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<DenyAssignmentInner> object if successful.
+ */
+ public PagedList listByResourceGroup(final String resourceGroupName) {
+ ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets deny assignments for a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceGroupSinglePageAsync(resourceGroupName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets deny assignments for a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DenyAssignmentInner> object
+ */
+ public Observable> listByResourceGroupAsync(final String resourceGroupName) {
+ return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets deny assignments for a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DenyAssignmentInner> object
+ */
+ public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
+ return listByResourceGroupSinglePageAsync(resourceGroupName)
+ .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets deny assignments for a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DenyAssignmentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName 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 String filter = null;
+ return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), filter, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response