diff --git a/features/resource-manager/v2015_12_01/pom.xml b/features/resource-manager/v2015_12_01/pom.xml
index 0eec0e2dce11..f5a1268fb93d 100644
--- a/features/resource-manager/v2015_12_01/pom.xml
+++ b/features/resource-manager/v2015_12_01/pom.xml
@@ -11,7 +11,7 @@
com.microsoft.azureazure-arm-parent
- 1.0.0
+ 0.0.3-beta../../../pom.xmlazure-mgmt-features
@@ -19,7 +19,7 @@
jarMicrosoft Azure SDK for Features ManagementThis package contains Microsoft Features Management SDK.
- https://github.com/Azure/azure-libraries-for-java
+ https://github.com/Azure/azure-sdk-for-javaThe MIT License (MIT)
@@ -28,8 +28,8 @@
- scm:git:https://github.com/Azure/azure-libraries-for-java
- scm:git:git@github.com:Azure/azure-libraries-for-java.git
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.gitHEAD
diff --git a/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/OperationDisplay.java b/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/OperationDisplay.java
new file mode 100644
index 000000000000..13e97b37c8ae
--- /dev/null
+++ b/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/OperationDisplay.java
@@ -0,0 +1,95 @@
+/**
+ * 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.features.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that represents the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft.Features.
+ */
+ @JsonProperty(value = "provider")
+ private String provider;
+
+ /**
+ * Resource on which the operation is performed: Profile, endpoint, etc.
+ */
+ @JsonProperty(value = "resource")
+ private String resource;
+
+ /**
+ * Operation type: Read, write, delete, etc.
+ */
+ @JsonProperty(value = "operation")
+ private String operation;
+
+ /**
+ * Get service provider: Microsoft.Features.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Set service provider: Microsoft.Features.
+ *
+ * @param provider the provider value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withProvider(String provider) {
+ this.provider = provider;
+ return this;
+ }
+
+ /**
+ * Get resource on which the operation is performed: Profile, endpoint, etc.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Set resource on which the operation is performed: Profile, endpoint, etc.
+ *
+ * @param resource the resource value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withResource(String resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ /**
+ * Get operation type: Read, write, delete, etc.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set operation type: Read, write, delete, etc.
+ *
+ * @param operation the operation value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withOperation(String operation) {
+ this.operation = operation;
+ return this;
+ }
+
+}
diff --git a/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureClientImpl.java b/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureClientImpl.java
index db2b6732bd67..a6c74d7761c4 100644
--- a/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureClientImpl.java
+++ b/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureClientImpl.java
@@ -8,15 +8,36 @@
package com.microsoft.azure.management.features.v2015_12_01.implementation;
+import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
+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.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
+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.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
/**
* Initializes a new instance of the FeatureClientImpl class.
*/
public class FeatureClientImpl extends AzureServiceClient {
+ /** The Retrofit service to perform REST calls. */
+ private FeatureClientService service;
/** the {@link AzureClient} used for long running operations. */
private AzureClient azureClient;
@@ -63,11 +84,11 @@ public String apiVersion() {
return this.apiVersion;
}
- /** Gets or sets the preferred language for the response. */
+ /** The preferred language for the response. */
private String acceptLanguage;
/**
- * Gets Gets or sets the preferred language for the response.
+ * Gets The preferred language for the response.
*
* @return the acceptLanguage value.
*/
@@ -76,7 +97,7 @@ public String acceptLanguage() {
}
/**
- * Sets Gets or sets the preferred language for the response.
+ * Sets The preferred language for the response.
*
* @param acceptLanguage the acceptLanguage value.
* @return the service client itself
@@ -86,11 +107,11 @@ public FeatureClientImpl withAcceptLanguage(String acceptLanguage) {
return this;
}
- /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */
+ /** The retry timeout in seconds for Long Running Operations. Default value is 30. */
private int longRunningOperationRetryTimeout;
/**
- * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @return the longRunningOperationRetryTimeout value.
*/
@@ -99,7 +120,7 @@ public int longRunningOperationRetryTimeout() {
}
/**
- * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
* @return the service client itself
@@ -109,11 +130,11 @@ public FeatureClientImpl withLongRunningOperationRetryTimeout(int longRunningOpe
return this;
}
- /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
private boolean generateClientRequestId;
/**
- * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @return the generateClientRequestId value.
*/
@@ -122,7 +143,7 @@ public boolean generateClientRequestId() {
}
/**
- * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @param generateClientRequestId the generateClientRequestId value.
* @return the service client itself
@@ -182,6 +203,7 @@ protected void initialize() {
this.generateClientRequestId = true;
this.features = new FeaturesInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
+ initializeService();
}
/**
@@ -191,6 +213,241 @@ protected void initialize() {
*/
@Override
public String userAgent() {
- return String.format("%s (%s, %s)", super.userAgent(), "FeatureClient", "2015-12-01");
+ return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "FeatureClient", "2015-12-01");
}
+
+ private void initializeService() {
+ service = restClient().retrofit().create(FeatureClientService.class);
+ }
+
+ /**
+ * The interface defining all the services for FeatureClient to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface FeatureClientService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.features.v2015_12_01.FeatureClient listOperations" })
+ @GET("providers/Microsoft.Features/operations")
+ Observable> listOperations(@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.features.v2015_12_01.FeatureClient listOperationsNext" })
+ @GET
+ Observable> listOperationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @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<OperationInner> object if successful.
+ */
+ public PagedList listOperations() {
+ ServiceResponse> response = listOperationsSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @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> listOperationsAsync(final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listOperationsSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listOperationsNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> object
+ */
+ public Observable> listOperationsAsync() {
+ return listOperationsWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> object
+ */
+ public Observable>> listOperationsWithServiceResponseAsync() {
+ return listOperationsSinglePageAsync()
+ .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(listOperationsNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listOperationsSinglePageAsync() {
+ if (this.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null.");
+ }
+ return service.listOperations(this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listOperationsDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listOperationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @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<OperationInner> object if successful.
+ */
+ public PagedList listOperationsNext(final String nextPageLink) {
+ ServiceResponse> response = listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @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> listOperationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listOperationsNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listOperationsNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @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<OperationInner> object
+ */
+ public Observable> listOperationsNextAsync(final String nextPageLink) {
+ return listOperationsNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ * @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<OperationInner> object
+ */
+ public Observable>> listOperationsNextWithServiceResponseAsync(final String nextPageLink) {
+ return listOperationsNextSinglePageAsync(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(listOperationsNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listOperationsNextSinglePageAsync(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.listOperationsNext(nextUrl, this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listOperationsNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listOperationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
}
diff --git a/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureResultImpl.java b/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureResultImpl.java
index ee2a56edd3f3..e4322acf9233 100644
--- a/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureResultImpl.java
+++ b/features/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/features/v2015_12_01/implementation/FeatureResultImpl.java
@@ -21,6 +21,7 @@ class FeatureResultImpl extends IndexableRefreshableWrapperImplcom.microsoft.azureazure-arm-parent
- 1.0.0
+ 0.0.3-beta../../../pom.xmlazure-mgmt-locks
- 1.0.0-beta-1
+ 1.0.0-betajarMicrosoft Azure SDK for Authorization ManagementThis package contains Microsoft Authorization Management SDK.
- https://github.com/Azure/azure-libraries-for-java
+ https://github.com/Azure/azure-sdk-for-javaThe MIT License (MIT)
@@ -28,8 +28,8 @@
- scm:git:https://github.com/Azure/azure-libraries-for-java
- scm:git:git@github.com:Azure/azure-libraries-for-java.git
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.gitHEAD
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/AuthorizationOperations.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/AuthorizationOperations.java
new file mode 100644
index 000000000000..6318ce0b2cdb
--- /dev/null
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/AuthorizationOperations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.locks.v2016_09_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.locks.v2016_09_01.implementation.AuthorizationOperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing AuthorizationOperations.
+ */
+public interface AuthorizationOperations extends HasInner {
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/ManagementLockObject.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/ManagementLockObject.java
index a29317269ae9..b1e6c380e8f6 100644
--- a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/ManagementLockObject.java
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/ManagementLockObject.java
@@ -75,6 +75,8 @@ interface Blank extends WithResourceGroupName {
interface WithResourceGroupName {
/**
* Specifies resourceGroupName.
+ * @param resourceGroupName The name of the resource group to lock
+ * @return the next definition stage
*/
WithLevel withResourceGroupName(String resourceGroupName);
}
@@ -85,6 +87,8 @@ interface WithResourceGroupName {
interface WithLevel {
/**
* Specifies level.
+ * @param level The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. Possible values include: 'NotSpecified', 'CanNotDelete', 'ReadOnly'
+ * @return the next definition stage
*/
WithCreate withLevel(LockLevel level);
}
@@ -95,6 +99,8 @@ interface WithLevel {
interface WithNotes {
/**
* Specifies notes.
+ * @param notes Notes about the lock. Maximum of 512 characters
+ * @return the next definition stage
*/
WithCreate withNotes(String notes);
}
@@ -105,6 +111,8 @@ interface WithNotes {
interface WithOwners {
/**
* Specifies owners.
+ * @param owners The owners of the lock
+ * @return the next definition stage
*/
WithCreate withOwners(List owners);
}
@@ -133,6 +141,8 @@ interface UpdateStages {
interface WithNotes {
/**
* Specifies notes.
+ * @param notes Notes about the lock. Maximum of 512 characters
+ * @return the next update stage
*/
Update withNotes(String notes);
}
@@ -143,6 +153,8 @@ interface WithNotes {
interface WithOwners {
/**
* Specifies owners.
+ * @param owners The owners of the lock
+ * @return the next update stage
*/
Update withOwners(List owners);
}
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/Operation.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/Operation.java
new file mode 100644
index 000000000000..8c7fe1172342
--- /dev/null
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/Operation.java
@@ -0,0 +1,30 @@
+/**
+ * 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.locks.v2016_09_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.locks.v2016_09_01.implementation.LocksManager;
+import com.microsoft.azure.management.locks.v2016_09_01.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/OperationDisplay.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/OperationDisplay.java
new file mode 100644
index 000000000000..e23dbc327b57
--- /dev/null
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/OperationDisplay.java
@@ -0,0 +1,95 @@
+/**
+ * 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.locks.v2016_09_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that represents the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft.Authorization.
+ */
+ @JsonProperty(value = "provider")
+ private String provider;
+
+ /**
+ * Resource on which the operation is performed: Profile, endpoint, etc.
+ */
+ @JsonProperty(value = "resource")
+ private String resource;
+
+ /**
+ * Operation type: Read, write, delete, etc.
+ */
+ @JsonProperty(value = "operation")
+ private String operation;
+
+ /**
+ * Get service provider: Microsoft.Authorization.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Set service provider: Microsoft.Authorization.
+ *
+ * @param provider the provider value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withProvider(String provider) {
+ this.provider = provider;
+ return this;
+ }
+
+ /**
+ * Get resource on which the operation is performed: Profile, endpoint, etc.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Set resource on which the operation is performed: Profile, endpoint, etc.
+ *
+ * @param resource the resource value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withResource(String resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ /**
+ * Get operation type: Read, write, delete, etc.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set operation type: Read, write, delete, etc.
+ *
+ * @param operation the operation value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withOperation(String operation) {
+ this.operation = operation;
+ return this;
+ }
+
+}
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/AuthorizationOperationsImpl.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/AuthorizationOperationsImpl.java
new file mode 100644
index 000000000000..b6a2594aec75
--- /dev/null
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/AuthorizationOperationsImpl.java
@@ -0,0 +1,49 @@
+/**
+ * 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.locks.v2016_09_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.locks.v2016_09_01.AuthorizationOperations;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.locks.v2016_09_01.Operation;
+
+class AuthorizationOperationsImpl extends WrapperImpl implements AuthorizationOperations {
+ private final LocksManager manager;
+
+ AuthorizationOperationsImpl(LocksManager manager) {
+ super(manager.inner().authorizationOperations());
+ this.manager = manager;
+ }
+
+ public LocksManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listAsync() {
+ AuthorizationOperationsInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Operation call(OperationInner inner) {
+ return new OperationImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/AuthorizationOperationsInner.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/AuthorizationOperationsInner.java
new file mode 100644
index 000000000000..a5e92ba6383e
--- /dev/null
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/AuthorizationOperationsInner.java
@@ -0,0 +1,283 @@
+/**
+ * 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.locks.v2016_09_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.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 AuthorizationOperations.
+ */
+public class AuthorizationOperationsInner {
+ /** The Retrofit service to perform REST calls. */
+ private AuthorizationOperationsService service;
+ /** The service client containing this operation class. */
+ private ManagementLockClientImpl client;
+
+ /**
+ * Initializes an instance of AuthorizationOperationsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public AuthorizationOperationsInner(Retrofit retrofit, ManagementLockClientImpl client) {
+ this.service = retrofit.create(AuthorizationOperationsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AuthorizationOperations to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface AuthorizationOperationsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.locks.v2016_09_01.AuthorizationOperations list" })
+ @GET("providers/Microsoft.Authorization/operations")
+ Observable> list(@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.locks.v2016_09_01.AuthorizationOperations listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @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<OperationInner> 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();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @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);
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> 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));
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(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);
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @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<OperationInner> 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();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @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);
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @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<OperationInner> object
+ */
+ public Observable> listNextAsync(final String nextPageLink) {
+ return listNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ * @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<OperationInner> 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));
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<OperationInner> 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/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/LocksManager.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/LocksManager.java
index c477e6c55f89..199858cac37d 100644
--- a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/LocksManager.java
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/LocksManager.java
@@ -16,6 +16,7 @@
import com.microsoft.azure.arm.resources.AzureConfigurable;
import com.microsoft.azure.serializer.AzureJacksonAdapter;
import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.locks.v2016_09_01.AuthorizationOperations;
import com.microsoft.azure.management.locks.v2016_09_01.ManagementLocks;
import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
import com.microsoft.azure.arm.resources.implementation.ManagerCore;
@@ -24,6 +25,7 @@
* Entry point to Azure Authorization resource management.
*/
public final class LocksManager extends ManagerCore {
+ private AuthorizationOperations authorizationOperations;
private ManagementLocks managementLocks;
/**
* Get a Configurable instance that can be used to create LocksManager with optional configuration.
@@ -72,6 +74,16 @@ public interface Configurable extends AzureConfigurable {
LocksManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
}
+ /**
+ * @return Entry point to manage AuthorizationOperations.
+ */
+ public AuthorizationOperations authorizationOperations() {
+ if (this.authorizationOperations == null) {
+ this.authorizationOperations = new AuthorizationOperationsImpl(this);
+ }
+ return this.authorizationOperations;
+ }
+
/**
* @return Entry point to manage ManagementLocks.
*/
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockClientImpl.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockClientImpl.java
index ecedf9e3d14f..1c7720448b36 100644
--- a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockClientImpl.java
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockClientImpl.java
@@ -63,11 +63,11 @@ public String apiVersion() {
return this.apiVersion;
}
- /** Gets or sets the preferred language for the response. */
+ /** The preferred language for the response. */
private String acceptLanguage;
/**
- * Gets Gets or sets the preferred language for the response.
+ * Gets The preferred language for the response.
*
* @return the acceptLanguage value.
*/
@@ -76,7 +76,7 @@ public String acceptLanguage() {
}
/**
- * Sets Gets or sets the preferred language for the response.
+ * Sets The preferred language for the response.
*
* @param acceptLanguage the acceptLanguage value.
* @return the service client itself
@@ -86,11 +86,11 @@ public ManagementLockClientImpl withAcceptLanguage(String acceptLanguage) {
return this;
}
- /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */
+ /** The retry timeout in seconds for Long Running Operations. Default value is 30. */
private int longRunningOperationRetryTimeout;
/**
- * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @return the longRunningOperationRetryTimeout value.
*/
@@ -99,7 +99,7 @@ public int longRunningOperationRetryTimeout() {
}
/**
- * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
* @return the service client itself
@@ -109,11 +109,11 @@ public ManagementLockClientImpl withLongRunningOperationRetryTimeout(int longRun
return this;
}
- /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
private boolean generateClientRequestId;
/**
- * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @return the generateClientRequestId value.
*/
@@ -122,7 +122,7 @@ public boolean generateClientRequestId() {
}
/**
- * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @param generateClientRequestId the generateClientRequestId value.
* @return the service client itself
@@ -132,6 +132,19 @@ public ManagementLockClientImpl withGenerateClientRequestId(boolean generateClie
return this;
}
+ /**
+ * The AuthorizationOperationsInner object to access its operations.
+ */
+ private AuthorizationOperationsInner authorizationOperations;
+
+ /**
+ * Gets the AuthorizationOperationsInner object to access its operations.
+ * @return the AuthorizationOperationsInner object.
+ */
+ public AuthorizationOperationsInner authorizationOperations() {
+ return this.authorizationOperations;
+ }
+
/**
* The ManagementLocksInner object to access its operations.
*/
@@ -180,6 +193,7 @@ protected void initialize() {
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
+ this.authorizationOperations = new AuthorizationOperationsInner(restClient().retrofit(), this);
this.managementLocks = new ManagementLocksInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}
@@ -191,6 +205,6 @@ protected void initialize() {
*/
@Override
public String userAgent() {
- return String.format("%s (%s, %s)", super.userAgent(), "ManagementLockClient", "2016-09-01");
+ return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "ManagementLockClient", "2016-09-01");
}
}
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockObjectImpl.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockObjectImpl.java
index 47579b4f1ba0..bacf67e5e00a 100644
--- a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockObjectImpl.java
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLockObjectImpl.java
@@ -34,10 +34,10 @@ class ManagementLockObjectImpl extends CreatableUpdatableImpl implements Operation {
+ private final LocksManager manager;
+ OperationImpl(OperationInner inner, LocksManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public LocksManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public OperationDisplay display() {
+ return this.inner().display();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+}
diff --git a/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/OperationInner.java b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/OperationInner.java
new file mode 100644
index 000000000000..218a9b8c5f48
--- /dev/null
+++ b/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/OperationInner.java
@@ -0,0 +1,70 @@
+/**
+ * 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.locks.v2016_09_01.implementation;
+
+import com.microsoft.azure.management.locks.v2016_09_01.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Microsoft.Authorization operation.
+ */
+public class OperationInner {
+ /**
+ * Operation name: {provider}/{resource}/{operation}.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * The object that represents the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /**
+ * Get operation name: {provider}/{resource}/{operation}.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set operation name: {provider}/{resource}/{operation}.
+ *
+ * @param name the name value to set
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the object that represents the operation.
+ *
+ * @return the display value
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the object that represents the operation.
+ *
+ * @param display the display value to set
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+}
diff --git a/policy/resource-manager/v2016_12_01/pom.xml b/policy/resource-manager/v2016_12_01/pom.xml
index 46843fc0ca4c..6245e5813d11 100644
--- a/policy/resource-manager/v2016_12_01/pom.xml
+++ b/policy/resource-manager/v2016_12_01/pom.xml
@@ -11,15 +11,15 @@
com.microsoft.azureazure-arm-parent
- 1.0.0
+ 0.0.3-beta../../../pom.xmlazure-mgmt-policy
- 1.0.0-beta-1
+ 1.0.0-betajarMicrosoft Azure SDK for Authorization ManagementThis package contains Microsoft Authorization Management SDK.
- https://github.com/Azure/azure-libraries-for-java
+ https://github.com/Azure/azure-sdk-for-javaThe MIT License (MIT)
@@ -28,8 +28,8 @@
- scm:git:https://github.com/Azure/azure-libraries-for-java
- scm:git:git@github.com:Azure/azure-libraries-for-java.git
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.gitHEAD
diff --git a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignment.java b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignment.java
index e682d922d322..53125a6564f9 100644
--- a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignment.java
+++ b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignment.java
@@ -84,6 +84,8 @@ interface Blank extends WithScope {
interface WithScope {
/**
* Specifies scope.
+ * @param scope The scope of the policy assignment
+ * @return the next definition stage
*/
WithCreate withScope(String scope);
}
@@ -94,6 +96,8 @@ interface WithScope {
interface WithDescription {
/**
* Specifies description.
+ * @param description This message will be part of response in case of policy violation
+ * @return the next definition stage
*/
WithCreate withDescription(String description);
}
@@ -104,6 +108,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy assignment
+ * @return the next definition stage
*/
WithCreate withDisplayName(String displayName);
}
@@ -114,6 +120,8 @@ interface WithDisplayName {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next definition stage
*/
WithCreate withParameters(Object parameters);
}
@@ -124,6 +132,8 @@ interface WithParameters {
interface WithPolicyDefinitionId {
/**
* Specifies policyDefinitionId.
+ * @param policyDefinitionId The ID of the policy definition
+ * @return the next definition stage
*/
WithCreate withPolicyDefinitionId(String policyDefinitionId);
}
@@ -134,6 +144,8 @@ interface WithPolicyDefinitionId {
interface WithScopeProperty {
/**
* Specifies scopeProperty.
+ * @param scopeProperty The scope for the policy assignment
+ * @return the next definition stage
*/
WithCreate withScopeProperty(String scopeProperty);
}
@@ -162,6 +174,8 @@ interface UpdateStages {
interface WithDescription {
/**
* Specifies description.
+ * @param description This message will be part of response in case of policy violation
+ * @return the next update stage
*/
Update withDescription(String description);
}
@@ -172,6 +186,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy assignment
+ * @return the next update stage
*/
Update withDisplayName(String displayName);
}
@@ -182,6 +198,8 @@ interface WithDisplayName {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next update stage
*/
Update withParameters(Object parameters);
}
@@ -192,6 +210,8 @@ interface WithParameters {
interface WithPolicyDefinitionId {
/**
* Specifies policyDefinitionId.
+ * @param policyDefinitionId The ID of the policy definition
+ * @return the next update stage
*/
Update withPolicyDefinitionId(String policyDefinitionId);
}
@@ -202,6 +222,8 @@ interface WithPolicyDefinitionId {
interface WithScopeProperty {
/**
* Specifies scopeProperty.
+ * @param scopeProperty The scope for the policy assignment
+ * @return the next update stage
*/
Update withScopeProperty(String scopeProperty);
}
diff --git a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignments.java b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignments.java
index cabdc102fa34..9e9ecbad2ce1 100644
--- a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignments.java
+++ b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/PolicyAssignments.java
@@ -56,7 +56,7 @@ public interface PolicyAssignments extends SupportsCreating> listDelegate(Response deleteByIdAsync(String policyAssignm
/**
* Deletes a policy assignment by ID.
- * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
+ * When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
*
* @param policyAssignmentId The ID of the policy assignment to delete. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -1156,7 +1156,7 @@ public PolicyAssignmentInner call(ServiceResponse respons
/**
* Deletes a policy assignment by ID.
- * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
+ * When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
*
* @param policyAssignmentId The ID of the policy assignment to delete. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -1192,7 +1192,7 @@ private ServiceResponse deleteByIdDelegate(Response createByIdAsync(String policyAssignm
/**
* Creates a policy assignment by ID.
- * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
+ * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
*
* @param policyAssignmentId The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
* @param parameters Parameters for policy assignment.
@@ -1239,7 +1239,7 @@ public PolicyAssignmentInner call(ServiceResponse respons
/**
* Creates a policy assignment by ID.
- * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
+ * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
*
* @param policyAssignmentId The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
* @param parameters Parameters for policy assignment.
@@ -1280,7 +1280,7 @@ private ServiceResponse createByIdDelegate(Response getByIdAsync(String policyAssignment
/**
* Gets a policy assignment by ID.
- * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
+ * When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
*
* @param policyAssignmentId The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -1324,7 +1324,7 @@ public PolicyAssignmentInner call(ServiceResponse respons
/**
* Gets a policy assignment by ID.
- * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
+ * When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.
*
* @param policyAssignmentId The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
* @throws IllegalArgumentException thrown if parameters fail the validation
diff --git a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyClientImpl.java b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyClientImpl.java
index 3dde62ee5992..71ccaf379d55 100644
--- a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyClientImpl.java
+++ b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyClientImpl.java
@@ -63,11 +63,11 @@ public String apiVersion() {
return this.apiVersion;
}
- /** Gets or sets the preferred language for the response. */
+ /** The preferred language for the response. */
private String acceptLanguage;
/**
- * Gets Gets or sets the preferred language for the response.
+ * Gets The preferred language for the response.
*
* @return the acceptLanguage value.
*/
@@ -76,7 +76,7 @@ public String acceptLanguage() {
}
/**
- * Sets Gets or sets the preferred language for the response.
+ * Sets The preferred language for the response.
*
* @param acceptLanguage the acceptLanguage value.
* @return the service client itself
@@ -86,11 +86,11 @@ public PolicyClientImpl withAcceptLanguage(String acceptLanguage) {
return this;
}
- /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */
+ /** The retry timeout in seconds for Long Running Operations. Default value is 30. */
private int longRunningOperationRetryTimeout;
/**
- * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @return the longRunningOperationRetryTimeout value.
*/
@@ -99,7 +99,7 @@ public int longRunningOperationRetryTimeout() {
}
/**
- * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
* @return the service client itself
@@ -109,11 +109,11 @@ public PolicyClientImpl withLongRunningOperationRetryTimeout(int longRunningOper
return this;
}
- /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
private boolean generateClientRequestId;
/**
- * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @return the generateClientRequestId value.
*/
@@ -122,7 +122,7 @@ public boolean generateClientRequestId() {
}
/**
- * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @param generateClientRequestId the generateClientRequestId value.
* @return the service client itself
@@ -205,6 +205,6 @@ protected void initialize() {
*/
@Override
public String userAgent() {
- return String.format("%s (%s, %s)", super.userAgent(), "PolicyClient", "2016-12-01");
+ return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "PolicyClient", "2016-12-01");
}
}
diff --git a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyDefinitionImpl.java b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyDefinitionImpl.java
index 9bb8daa06726..6edb014a0d0f 100644
--- a/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyDefinitionImpl.java
+++ b/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyDefinitionImpl.java
@@ -32,9 +32,9 @@ class PolicyDefinitionImpl extends CreatableUpdatableImplcom.microsoft.azureazure-arm-parent
- 1.0.0
+ 0.0.3-beta../../../pom.xmlazure-mgmt-policy
@@ -19,7 +19,7 @@
jarMicrosoft Azure SDK for Authorization ManagementThis package contains Microsoft Authorization Management SDK.
- https://github.com/Azure/azure-libraries-for-java
+ https://github.com/Azure/azure-sdk-for-javaThe MIT License (MIT)
@@ -28,8 +28,8 @@
- scm:git:https://github.com/Azure/azure-libraries-for-java
- scm:git:git@github.com:Azure/azure-libraries-for-java.git
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.gitHEAD
diff --git a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/ErrorResponse.java b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/ErrorResponse.java
index bfb90927f7db..fedfcf17ff6e 100644
--- a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/ErrorResponse.java
+++ b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/ErrorResponse.java
@@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Error reponse indicates Azure Resource Manager is not able to process the
+ * Error response indicates Azure Resource Manager is not able to process the
* incoming request. The reason is provided in the error message.
*/
public class ErrorResponse {
diff --git a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyAssignment.java b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyAssignment.java
index 6fee8e37c428..4c42fca2951d 100644
--- a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyAssignment.java
+++ b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyAssignment.java
@@ -100,6 +100,8 @@ interface Blank extends WithScope {
interface WithScope {
/**
* Specifies scope.
+ * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * @return the next definition stage
*/
WithCreate withScope(String scope);
}
@@ -110,6 +112,8 @@ interface WithScope {
interface WithDescription {
/**
* Specifies description.
+ * @param description This message will be part of response in case of policy violation
+ * @return the next definition stage
*/
WithCreate withDescription(String description);
}
@@ -120,6 +124,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy assignment
+ * @return the next definition stage
*/
WithCreate withDisplayName(String displayName);
}
@@ -130,6 +136,8 @@ interface WithDisplayName {
interface WithMetadata {
/**
* Specifies metadata.
+ * @param metadata The policy assignment metadata
+ * @return the next definition stage
*/
WithCreate withMetadata(Object metadata);
}
@@ -140,6 +148,8 @@ interface WithMetadata {
interface WithNotScopes {
/**
* Specifies notScopes.
+ * @param notScopes The policy's excluded scopes
+ * @return the next definition stage
*/
WithCreate withNotScopes(List notScopes);
}
@@ -150,6 +160,8 @@ interface WithNotScopes {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next definition stage
*/
WithCreate withParameters(Object parameters);
}
@@ -160,6 +172,8 @@ interface WithParameters {
interface WithPolicyDefinitionId {
/**
* Specifies policyDefinitionId.
+ * @param policyDefinitionId The ID of the policy definition or policy set definition being assigned
+ * @return the next definition stage
*/
WithCreate withPolicyDefinitionId(String policyDefinitionId);
}
@@ -170,6 +184,8 @@ interface WithPolicyDefinitionId {
interface WithScopeProperty {
/**
* Specifies scopeProperty.
+ * @param scopeProperty The scope for the policy assignment
+ * @return the next definition stage
*/
WithCreate withScopeProperty(String scopeProperty);
}
@@ -180,6 +196,8 @@ interface WithScopeProperty {
interface WithSku {
/**
* Specifies sku.
+ * @param sku The policy sku. This property is optional, obsolete, and will be ignored
+ * @return the next definition stage
*/
WithCreate withSku(PolicySku sku);
}
@@ -208,6 +226,8 @@ interface UpdateStages {
interface WithDescription {
/**
* Specifies description.
+ * @param description This message will be part of response in case of policy violation
+ * @return the next update stage
*/
Update withDescription(String description);
}
@@ -218,6 +238,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy assignment
+ * @return the next update stage
*/
Update withDisplayName(String displayName);
}
@@ -228,6 +250,8 @@ interface WithDisplayName {
interface WithMetadata {
/**
* Specifies metadata.
+ * @param metadata The policy assignment metadata
+ * @return the next update stage
*/
Update withMetadata(Object metadata);
}
@@ -238,6 +262,8 @@ interface WithMetadata {
interface WithNotScopes {
/**
* Specifies notScopes.
+ * @param notScopes The policy's excluded scopes
+ * @return the next update stage
*/
Update withNotScopes(List notScopes);
}
@@ -248,6 +274,8 @@ interface WithNotScopes {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next update stage
*/
Update withParameters(Object parameters);
}
@@ -258,6 +286,8 @@ interface WithParameters {
interface WithPolicyDefinitionId {
/**
* Specifies policyDefinitionId.
+ * @param policyDefinitionId The ID of the policy definition or policy set definition being assigned
+ * @return the next update stage
*/
Update withPolicyDefinitionId(String policyDefinitionId);
}
@@ -268,6 +298,8 @@ interface WithPolicyDefinitionId {
interface WithScopeProperty {
/**
* Specifies scopeProperty.
+ * @param scopeProperty The scope for the policy assignment
+ * @return the next update stage
*/
Update withScopeProperty(String scopeProperty);
}
@@ -278,6 +310,8 @@ interface WithScopeProperty {
interface WithSku {
/**
* Specifies sku.
+ * @param sku The policy sku. This property is optional, obsolete, and will be ignored
+ * @return the next update stage
*/
Update withSku(PolicySku sku);
}
diff --git a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyDefinition.java b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyDefinition.java
index ead6195a8b94..4a2a408fd669 100644
--- a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyDefinition.java
+++ b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicyDefinition.java
@@ -94,6 +94,8 @@ interface Blank extends WithCreate {
interface WithDescription {
/**
* Specifies description.
+ * @param description The policy definition description
+ * @return the next definition stage
*/
WithCreate withDescription(String description);
}
@@ -104,6 +106,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy definition
+ * @return the next definition stage
*/
WithCreate withDisplayName(String displayName);
}
@@ -114,6 +118,8 @@ interface WithDisplayName {
interface WithMetadata {
/**
* Specifies metadata.
+ * @param metadata The policy definition metadata
+ * @return the next definition stage
*/
WithCreate withMetadata(Object metadata);
}
@@ -124,6 +130,8 @@ interface WithMetadata {
interface WithMode {
/**
* Specifies mode.
+ * @param mode The policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'
+ * @return the next definition stage
*/
WithCreate withMode(PolicyMode mode);
}
@@ -134,6 +142,8 @@ interface WithMode {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next definition stage
*/
WithCreate withParameters(Object parameters);
}
@@ -144,6 +154,8 @@ interface WithParameters {
interface WithPolicyRule {
/**
* Specifies policyRule.
+ * @param policyRule The policy rule
+ * @return the next definition stage
*/
WithCreate withPolicyRule(Object policyRule);
}
@@ -154,6 +166,8 @@ interface WithPolicyRule {
interface WithPolicyType {
/**
* Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next definition stage
*/
WithCreate withPolicyType(PolicyType policyType);
}
@@ -182,6 +196,8 @@ interface UpdateStages {
interface WithDescription {
/**
* Specifies description.
+ * @param description The policy definition description
+ * @return the next update stage
*/
Update withDescription(String description);
}
@@ -192,6 +208,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy definition
+ * @return the next update stage
*/
Update withDisplayName(String displayName);
}
@@ -202,6 +220,8 @@ interface WithDisplayName {
interface WithMetadata {
/**
* Specifies metadata.
+ * @param metadata The policy definition metadata
+ * @return the next update stage
*/
Update withMetadata(Object metadata);
}
@@ -212,6 +232,8 @@ interface WithMetadata {
interface WithMode {
/**
* Specifies mode.
+ * @param mode The policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'
+ * @return the next update stage
*/
Update withMode(PolicyMode mode);
}
@@ -222,6 +244,8 @@ interface WithMode {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next update stage
*/
Update withParameters(Object parameters);
}
@@ -232,6 +256,8 @@ interface WithParameters {
interface WithPolicyRule {
/**
* Specifies policyRule.
+ * @param policyRule The policy rule
+ * @return the next update stage
*/
Update withPolicyRule(Object policyRule);
}
@@ -242,6 +268,8 @@ interface WithPolicyRule {
interface WithPolicyType {
/**
* Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next update stage
*/
Update withPolicyType(PolicyType policyType);
}
diff --git a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicySetDefinition.java b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicySetDefinition.java
index e785e4d1ee95..73b439fcfd0e 100644
--- a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicySetDefinition.java
+++ b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicySetDefinition.java
@@ -90,6 +90,8 @@ interface Blank extends WithPolicyDefinitions {
interface WithPolicyDefinitions {
/**
* Specifies policyDefinitions.
+ * @param policyDefinitions An array of policy definition references
+ * @return the next definition stage
*/
WithCreate withPolicyDefinitions(List policyDefinitions);
}
@@ -100,6 +102,8 @@ interface WithPolicyDefinitions {
interface WithDescription {
/**
* Specifies description.
+ * @param description The policy set definition description
+ * @return the next definition stage
*/
WithCreate withDescription(String description);
}
@@ -110,6 +114,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy set definition
+ * @return the next definition stage
*/
WithCreate withDisplayName(String displayName);
}
@@ -120,6 +126,8 @@ interface WithDisplayName {
interface WithMetadata {
/**
* Specifies metadata.
+ * @param metadata The policy set definition metadata
+ * @return the next definition stage
*/
WithCreate withMetadata(Object metadata);
}
@@ -130,6 +138,8 @@ interface WithMetadata {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters The policy set definition parameters that can be used in policy definition references
+ * @return the next definition stage
*/
WithCreate withParameters(Object parameters);
}
@@ -140,6 +150,8 @@ interface WithParameters {
interface WithPolicyType {
/**
* Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next definition stage
*/
WithCreate withPolicyType(PolicyType policyType);
}
@@ -168,6 +180,8 @@ interface UpdateStages {
interface WithDescription {
/**
* Specifies description.
+ * @param description The policy set definition description
+ * @return the next update stage
*/
Update withDescription(String description);
}
@@ -178,6 +192,8 @@ interface WithDescription {
interface WithDisplayName {
/**
* Specifies displayName.
+ * @param displayName The display name of the policy set definition
+ * @return the next update stage
*/
Update withDisplayName(String displayName);
}
@@ -188,6 +204,8 @@ interface WithDisplayName {
interface WithMetadata {
/**
* Specifies metadata.
+ * @param metadata The policy set definition metadata
+ * @return the next update stage
*/
Update withMetadata(Object metadata);
}
@@ -198,6 +216,8 @@ interface WithMetadata {
interface WithParameters {
/**
* Specifies parameters.
+ * @param parameters The policy set definition parameters that can be used in policy definition references
+ * @return the next update stage
*/
Update withParameters(Object parameters);
}
@@ -208,6 +228,8 @@ interface WithParameters {
interface WithPolicyType {
/**
* Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next update stage
*/
Update withPolicyType(PolicyType policyType);
}
diff --git a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicyAssignmentImpl.java b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicyAssignmentImpl.java
index e443c60f4f58..c9f759359712 100644
--- a/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicyAssignmentImpl.java
+++ b/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicyAssignmentImpl.java
@@ -33,10 +33,10 @@ class PolicyAssignmentImpl extends CreatableUpdatableImpl
+
+ 4.0.0
+ com.microsoft.azure.policy.v2018_05_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.3-beta
+ ../../../pom.xml
+
+ azure-mgmt-policy
+ 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/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ErrorResponse.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ErrorResponse.java
new file mode 100644
index 000000000000..fd611e675be1
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ErrorResponse.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policy.v2018_05_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response indicates Azure Resource Manager is not able to process the
+ * incoming request. The reason is provided in the error message.
+ */
+public class ErrorResponse {
+ /**
+ * Http status code.
+ */
+ @JsonProperty(value = "httpStatus")
+ private String httpStatus;
+
+ /**
+ * Error code.
+ */
+ @JsonProperty(value = "errorCode")
+ private String errorCode;
+
+ /**
+ * Error message indicating why the operation failed.
+ */
+ @JsonProperty(value = "errorMessage")
+ private String errorMessage;
+
+ /**
+ * Get http status code.
+ *
+ * @return the httpStatus value
+ */
+ public String httpStatus() {
+ return this.httpStatus;
+ }
+
+ /**
+ * Set http status code.
+ *
+ * @param httpStatus the httpStatus value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withHttpStatus(String httpStatus) {
+ this.httpStatus = httpStatus;
+ return this;
+ }
+
+ /**
+ * Get error code.
+ *
+ * @return the errorCode value
+ */
+ public String errorCode() {
+ return this.errorCode;
+ }
+
+ /**
+ * Set error code.
+ *
+ * @param errorCode the errorCode value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ return this;
+ }
+
+ /**
+ * Get error message indicating why the operation failed.
+ *
+ * @return the errorMessage value
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Set error message indicating why the operation failed.
+ *
+ * @param errorMessage the errorMessage value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ return this;
+ }
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ErrorResponseException.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ErrorResponseException.java
new file mode 100644
index 000000000000..3776457c06b1
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policy.v2018_05_01;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/Identity.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/Identity.java
new file mode 100644
index 000000000000..216acc1e31b5
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/Identity.java
@@ -0,0 +1,73 @@
+/**
+ * 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.policy.v2018_05_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Identity for the resource.
+ */
+public class Identity {
+ /**
+ * The principal ID of the resource identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /**
+ * The tenant ID of the resource identity.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /**
+ * The identity type. Possible values include: 'SystemAssigned', 'None'.
+ */
+ @JsonProperty(value = "type")
+ private ResourceIdentityType type;
+
+ /**
+ * Get the principal ID of the resource identity.
+ *
+ * @return the principalId value
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenant ID of the resource identity.
+ *
+ * @return the tenantId value
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the identity type. Possible values include: 'SystemAssigned', 'None'.
+ *
+ * @return the type value
+ */
+ public ResourceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the identity type. Possible values include: 'SystemAssigned', 'None'.
+ *
+ * @param type the type value to set
+ * @return the Identity object itself.
+ */
+ public Identity withType(ResourceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyAssignment.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyAssignment.java
new file mode 100644
index 000000000000..d9a64c840e51
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyAssignment.java
@@ -0,0 +1,378 @@
+/**
+ * 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.policy.v2018_05_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyAssignmentInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyManager;
+import java.util.List;
+
+/**
+ * Type representing PolicyAssignment.
+ */
+public interface PolicyAssignment extends HasInner, Indexable, Updatable, Refreshable, HasManager {
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the identity value.
+ */
+ Identity identity();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the metadata value.
+ */
+ Object metadata();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the notScopes value.
+ */
+ List notScopes();
+
+ /**
+ * @return the parameters value.
+ */
+ Object parameters();
+
+ /**
+ * @return the policyDefinitionId value.
+ */
+ String policyDefinitionId();
+
+ /**
+ * @return the scopeProperty value.
+ */
+ String scopeProperty();
+
+ /**
+ * @return the sku value.
+ */
+ PolicySku sku();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the PolicyAssignment definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of PolicyAssignment definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a PolicyAssignment definition.
+ */
+ interface Blank extends WithScope {
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify Scope.
+ */
+ interface WithScope {
+ /**
+ * Specifies scope.
+ * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * @return the next definition stage
+ */
+ WithCreate withScope(String scope);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description This message will be part of response in case of policy violation
+ * @return the next definition stage
+ */
+ WithCreate withDescription(String description);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify DisplayName.
+ */
+ interface WithDisplayName {
+ /**
+ * Specifies displayName.
+ * @param displayName The display name of the policy assignment
+ * @return the next definition stage
+ */
+ WithCreate withDisplayName(String displayName);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The managed identity associated with the policy assignment
+ * @return the next definition stage
+ */
+ WithCreate withIdentity(Identity identity);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ * @param location The location of the policy assignment. Only required when utilizing managed identity
+ * @return the next definition stage
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata The policy assignment metadata
+ * @return the next definition stage
+ */
+ WithCreate withMetadata(Object metadata);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify NotScopes.
+ */
+ interface WithNotScopes {
+ /**
+ * Specifies notScopes.
+ * @param notScopes The policy's excluded scopes
+ * @return the next definition stage
+ */
+ WithCreate withNotScopes(List notScopes);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify Parameters.
+ */
+ interface WithParameters {
+ /**
+ * Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next definition stage
+ */
+ WithCreate withParameters(Object parameters);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify PolicyDefinitionId.
+ */
+ interface WithPolicyDefinitionId {
+ /**
+ * Specifies policyDefinitionId.
+ * @param policyDefinitionId The ID of the policy definition or policy set definition being assigned
+ * @return the next definition stage
+ */
+ WithCreate withPolicyDefinitionId(String policyDefinitionId);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify ScopeProperty.
+ */
+ interface WithScopeProperty {
+ /**
+ * Specifies scopeProperty.
+ * @param scopeProperty The scope for the policy assignment
+ * @return the next definition stage
+ */
+ WithCreate withScopeProperty(String scopeProperty);
+ }
+
+ /**
+ * The stage of the policyassignment definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The policy sku. This property is optional, obsolete, and will be ignored
+ * @return the next definition stage
+ */
+ WithCreate withSku(PolicySku sku);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithDescription, DefinitionStages.WithDisplayName, DefinitionStages.WithIdentity, DefinitionStages.WithLocation, DefinitionStages.WithMetadata, DefinitionStages.WithNotScopes, DefinitionStages.WithParameters, DefinitionStages.WithPolicyDefinitionId, DefinitionStages.WithScopeProperty, DefinitionStages.WithSku {
+ }
+ }
+ /**
+ * The template for a PolicyAssignment update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithDescription, UpdateStages.WithDisplayName, UpdateStages.WithIdentity, UpdateStages.WithLocation, UpdateStages.WithMetadata, UpdateStages.WithNotScopes, UpdateStages.WithParameters, UpdateStages.WithPolicyDefinitionId, UpdateStages.WithScopeProperty, UpdateStages.WithSku {
+ }
+
+ /**
+ * Grouping of PolicyAssignment update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the policyassignment update allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description This message will be part of response in case of policy violation
+ * @return the next update stage
+ */
+ Update withDescription(String description);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify DisplayName.
+ */
+ interface WithDisplayName {
+ /**
+ * Specifies displayName.
+ * @param displayName The display name of the policy assignment
+ * @return the next update stage
+ */
+ Update withDisplayName(String displayName);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The managed identity associated with the policy assignment
+ * @return the next update stage
+ */
+ Update withIdentity(Identity identity);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ * @param location The location of the policy assignment. Only required when utilizing managed identity
+ * @return the next update stage
+ */
+ Update withLocation(String location);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata The policy assignment metadata
+ * @return the next update stage
+ */
+ Update withMetadata(Object metadata);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify NotScopes.
+ */
+ interface WithNotScopes {
+ /**
+ * Specifies notScopes.
+ * @param notScopes The policy's excluded scopes
+ * @return the next update stage
+ */
+ Update withNotScopes(List notScopes);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify Parameters.
+ */
+ interface WithParameters {
+ /**
+ * Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next update stage
+ */
+ Update withParameters(Object parameters);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify PolicyDefinitionId.
+ */
+ interface WithPolicyDefinitionId {
+ /**
+ * Specifies policyDefinitionId.
+ * @param policyDefinitionId The ID of the policy definition or policy set definition being assigned
+ * @return the next update stage
+ */
+ Update withPolicyDefinitionId(String policyDefinitionId);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify ScopeProperty.
+ */
+ interface WithScopeProperty {
+ /**
+ * Specifies scopeProperty.
+ * @param scopeProperty The scope for the policy assignment
+ * @return the next update stage
+ */
+ Update withScopeProperty(String scopeProperty);
+ }
+
+ /**
+ * The stage of the policyassignment update allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The policy sku. This property is optional, obsolete, and will be ignored
+ * @return the next update stage
+ */
+ Update withSku(PolicySku sku);
+ }
+
+ }
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyAssignments.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyAssignments.java
new file mode 100644
index 000000000000..f36db547c483
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyAssignments.java
@@ -0,0 +1,91 @@
+/**
+ * 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.policy.v2018_05_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyAssignmentInner;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyAssignmentsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PolicyAssignments.
+ */
+public interface PolicyAssignments extends SupportsCreating, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Deletes a policy assignment.
+ * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ *
+ * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * @param policyAssignmentName The name of the policy assignment to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable deleteAsync(String scope, String policyAssignmentName);
+
+ /**
+ * Retrieves a policy assignment.
+ * This operation retrieves a single policy assignment, given its name and the scope it was created at.
+ *
+ * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String scope, String policyAssignmentName);
+
+ /**
+ * Retrieves all policy assignments that apply to a resource.
+ * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
+ *
+ * @param resourceGroupName The name of the resource group containing the resource.
+ * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines)
+ * @param parentResourcePath The parent resource path. Use empty string if there is none.
+ * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).
+ * @param resourceName The name of the resource.
+ * @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);
+
+ /**
+ * Deletes a policy assignment.
+ * This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource).
+ *
+ * @param policyAssignmentId The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable deleteByIdAsync(String policyAssignmentId);
+
+ /**
+ * Creates or updates a policy assignment.
+ * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createByIdAsync(String policyAssignmentId, PolicyAssignmentInner parameters);
+
+ /**
+ * Retrieves the policy assignment with the given ID.
+ * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByIdAsync(String policyAssignmentId);
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinition.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinition.java
new file mode 100644
index 000000000000..19e13c043bf7
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinition.java
@@ -0,0 +1,278 @@
+/**
+ * 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.policy.v2018_05_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyDefinitionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyManager;
+
+/**
+ * Type representing PolicyDefinition.
+ */
+public interface PolicyDefinition extends HasInner, Indexable, Updatable, Refreshable, HasManager {
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the metadata value.
+ */
+ Object metadata();
+
+ /**
+ * @return the mode value.
+ */
+ PolicyMode mode();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the parameters value.
+ */
+ Object parameters();
+
+ /**
+ * @return the policyRule value.
+ */
+ Object policyRule();
+
+ /**
+ * @return the policyType value.
+ */
+ PolicyType policyType();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the PolicyDefinition definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of PolicyDefinition definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a PolicyDefinition definition.
+ */
+ interface Blank extends WithCreate {
+ }
+
+ /**
+ * The stage of the policydefinition definition allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description The policy definition description
+ * @return the next definition stage
+ */
+ WithCreate withDescription(String description);
+ }
+
+ /**
+ * The stage of the policydefinition definition allowing to specify DisplayName.
+ */
+ interface WithDisplayName {
+ /**
+ * Specifies displayName.
+ * @param displayName The display name of the policy definition
+ * @return the next definition stage
+ */
+ WithCreate withDisplayName(String displayName);
+ }
+
+ /**
+ * The stage of the policydefinition definition allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata The policy definition metadata
+ * @return the next definition stage
+ */
+ WithCreate withMetadata(Object metadata);
+ }
+
+ /**
+ * The stage of the policydefinition definition allowing to specify Mode.
+ */
+ interface WithMode {
+ /**
+ * Specifies mode.
+ * @param mode The policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'
+ * @return the next definition stage
+ */
+ WithCreate withMode(PolicyMode mode);
+ }
+
+ /**
+ * The stage of the policydefinition definition allowing to specify Parameters.
+ */
+ interface WithParameters {
+ /**
+ * Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next definition stage
+ */
+ WithCreate withParameters(Object parameters);
+ }
+
+ /**
+ * The stage of the policydefinition definition allowing to specify PolicyRule.
+ */
+ interface WithPolicyRule {
+ /**
+ * Specifies policyRule.
+ * @param policyRule The policy rule
+ * @return the next definition stage
+ */
+ WithCreate withPolicyRule(Object policyRule);
+ }
+
+ /**
+ * The stage of the policydefinition definition allowing to specify PolicyType.
+ */
+ interface WithPolicyType {
+ /**
+ * Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next definition stage
+ */
+ WithCreate withPolicyType(PolicyType policyType);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithDescription, DefinitionStages.WithDisplayName, DefinitionStages.WithMetadata, DefinitionStages.WithMode, DefinitionStages.WithParameters, DefinitionStages.WithPolicyRule, DefinitionStages.WithPolicyType {
+ }
+ }
+ /**
+ * The template for a PolicyDefinition update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithDescription, UpdateStages.WithDisplayName, UpdateStages.WithMetadata, UpdateStages.WithMode, UpdateStages.WithParameters, UpdateStages.WithPolicyRule, UpdateStages.WithPolicyType {
+ }
+
+ /**
+ * Grouping of PolicyDefinition update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the policydefinition update allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description The policy definition description
+ * @return the next update stage
+ */
+ Update withDescription(String description);
+ }
+
+ /**
+ * The stage of the policydefinition update allowing to specify DisplayName.
+ */
+ interface WithDisplayName {
+ /**
+ * Specifies displayName.
+ * @param displayName The display name of the policy definition
+ * @return the next update stage
+ */
+ Update withDisplayName(String displayName);
+ }
+
+ /**
+ * The stage of the policydefinition update allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata The policy definition metadata
+ * @return the next update stage
+ */
+ Update withMetadata(Object metadata);
+ }
+
+ /**
+ * The stage of the policydefinition update allowing to specify Mode.
+ */
+ interface WithMode {
+ /**
+ * Specifies mode.
+ * @param mode The policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'
+ * @return the next update stage
+ */
+ Update withMode(PolicyMode mode);
+ }
+
+ /**
+ * The stage of the policydefinition update allowing to specify Parameters.
+ */
+ interface WithParameters {
+ /**
+ * Specifies parameters.
+ * @param parameters Required if a parameter is used in policy rule
+ * @return the next update stage
+ */
+ Update withParameters(Object parameters);
+ }
+
+ /**
+ * The stage of the policydefinition update allowing to specify PolicyRule.
+ */
+ interface WithPolicyRule {
+ /**
+ * Specifies policyRule.
+ * @param policyRule The policy rule
+ * @return the next update stage
+ */
+ Update withPolicyRule(Object policyRule);
+ }
+
+ /**
+ * The stage of the policydefinition update allowing to specify PolicyType.
+ */
+ interface WithPolicyType {
+ /**
+ * Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next update stage
+ */
+ Update withPolicyType(PolicyType policyType);
+ }
+
+ }
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinitionReference.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinitionReference.java
new file mode 100644
index 000000000000..a5d065bef3a9
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinitionReference.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policy.v2018_05_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The policy definition reference.
+ */
+public class PolicyDefinitionReference {
+ /**
+ * The ID of the policy definition or policy set definition.
+ */
+ @JsonProperty(value = "policyDefinitionId")
+ private String policyDefinitionId;
+
+ /**
+ * Required if a parameter is used in policy rule.
+ */
+ @JsonProperty(value = "parameters")
+ private Object parameters;
+
+ /**
+ * Get the ID of the policy definition or policy set definition.
+ *
+ * @return the policyDefinitionId value
+ */
+ public String policyDefinitionId() {
+ return this.policyDefinitionId;
+ }
+
+ /**
+ * Set the ID of the policy definition or policy set definition.
+ *
+ * @param policyDefinitionId the policyDefinitionId value to set
+ * @return the PolicyDefinitionReference object itself.
+ */
+ public PolicyDefinitionReference withPolicyDefinitionId(String policyDefinitionId) {
+ this.policyDefinitionId = policyDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get required if a parameter is used in policy rule.
+ *
+ * @return the parameters value
+ */
+ public Object parameters() {
+ return this.parameters;
+ }
+
+ /**
+ * Set required if a parameter is used in policy rule.
+ *
+ * @param parameters the parameters value to set
+ * @return the PolicyDefinitionReference object itself.
+ */
+ public PolicyDefinitionReference withParameters(Object parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinitions.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinitions.java
new file mode 100644
index 000000000000..3ae14f085178
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyDefinitions.java
@@ -0,0 +1,106 @@
+/**
+ * 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.policy.v2018_05_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyDefinitionInner;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyDefinitionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PolicyDefinitions.
+ */
+public interface PolicyDefinitions extends SupportsCreating, SupportsListing, HasInner {
+ /**
+ * Deletes a policy definition in a subscription.
+ * This operation deletes the policy definition in the given subscription with the given name.
+ *
+ * @param policyDefinitionName The name of the policy definition to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String policyDefinitionName);
+
+ /**
+ * Retrieves a policy definition in a subscription.
+ * This operation retrieves the policy definition in the given subscription with the given name.
+ *
+ * @param policyDefinitionName The name of the policy definition to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String policyDefinitionName);
+
+ /**
+ * Retrieves a built-in policy definition.
+ * This operation retrieves the built-in policy definition with the given name.
+ *
+ * @param policyDefinitionName The name of the built-in policy definition to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getBuiltInAsync(String policyDefinitionName);
+
+ /**
+ * Creates or updates a policy definition in a management group.
+ * This operation creates or updates a policy definition in the given management group with the given name.
+ *
+ * @param policyDefinitionName The name of the policy definition to create.
+ * @param managementGroupId The ID of the management group.
+ * @param parameters The policy definition properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createOrUpdateAtManagementGroupAsync(String policyDefinitionName, String managementGroupId, PolicyDefinitionInner parameters);
+
+ /**
+ * Deletes a policy definition in a management group.
+ * This operation deletes the policy definition in the given management group with the given name.
+ *
+ * @param policyDefinitionName The name of the policy definition to delete.
+ * @param managementGroupId The ID of the management group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAtManagementGroupAsync(String policyDefinitionName, String managementGroupId);
+
+ /**
+ * Retrieve a policy definition in a management group.
+ * This operation retrieves the policy definition in the given management group with the given name.
+ *
+ * @param policyDefinitionName The name of the policy definition to get.
+ * @param managementGroupId The ID of the management group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAtManagementGroupAsync(String policyDefinitionName, String managementGroupId);
+
+ /**
+ * Retrieve policy definitions in a management group.
+ * This operation retrieves a list of all the policy definitions in a given management group.
+ *
+ * @param managementGroupId The ID of the management group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByManagementGroupAsync(final String managementGroupId);
+
+ /**
+ * Retrieve built-in policy definitions.
+ * This operation retrieves a list of all the built-in policy definitions.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listBuiltInAsync();
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyMode.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyMode.java
new file mode 100644
index 000000000000..ae55d2ce4945
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyMode.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policy.v2018_05_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PolicyMode.
+ */
+public final class PolicyMode extends ExpandableStringEnum {
+ /** Static value NotSpecified for PolicyMode. */
+ public static final PolicyMode NOT_SPECIFIED = fromString("NotSpecified");
+
+ /** Static value Indexed for PolicyMode. */
+ public static final PolicyMode INDEXED = fromString("Indexed");
+
+ /** Static value All for PolicyMode. */
+ public static final PolicyMode ALL = fromString("All");
+
+ /**
+ * Creates or finds a PolicyMode from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PolicyMode
+ */
+ @JsonCreator
+ public static PolicyMode fromString(String name) {
+ return fromString(name, PolicyMode.class);
+ }
+
+ /**
+ * @return known PolicyMode values
+ */
+ public static Collection values() {
+ return values(PolicyMode.class);
+ }
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySetDefinition.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySetDefinition.java
new file mode 100644
index 000000000000..cea1ab86a061
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySetDefinition.java
@@ -0,0 +1,238 @@
+/**
+ * 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.policy.v2018_05_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicySetDefinitionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicyManager;
+import java.util.List;
+
+/**
+ * Type representing PolicySetDefinition.
+ */
+public interface PolicySetDefinition extends HasInner, Indexable, Updatable, Refreshable, HasManager {
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the metadata value.
+ */
+ Object metadata();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the parameters value.
+ */
+ Object parameters();
+
+ /**
+ * @return the policyDefinitions value.
+ */
+ List policyDefinitions();
+
+ /**
+ * @return the policyType value.
+ */
+ PolicyType policyType();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the PolicySetDefinition definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithPolicyDefinitions, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of PolicySetDefinition definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a PolicySetDefinition definition.
+ */
+ interface Blank extends WithPolicyDefinitions {
+ }
+
+ /**
+ * The stage of the policysetdefinition definition allowing to specify PolicyDefinitions.
+ */
+ interface WithPolicyDefinitions {
+ /**
+ * Specifies policyDefinitions.
+ * @param policyDefinitions An array of policy definition references
+ * @return the next definition stage
+ */
+ WithCreate withPolicyDefinitions(List policyDefinitions);
+ }
+
+ /**
+ * The stage of the policysetdefinition definition allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description The policy set definition description
+ * @return the next definition stage
+ */
+ WithCreate withDescription(String description);
+ }
+
+ /**
+ * The stage of the policysetdefinition definition allowing to specify DisplayName.
+ */
+ interface WithDisplayName {
+ /**
+ * Specifies displayName.
+ * @param displayName The display name of the policy set definition
+ * @return the next definition stage
+ */
+ WithCreate withDisplayName(String displayName);
+ }
+
+ /**
+ * The stage of the policysetdefinition definition allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata The policy set definition metadata
+ * @return the next definition stage
+ */
+ WithCreate withMetadata(Object metadata);
+ }
+
+ /**
+ * The stage of the policysetdefinition definition allowing to specify Parameters.
+ */
+ interface WithParameters {
+ /**
+ * Specifies parameters.
+ * @param parameters The policy set definition parameters that can be used in policy definition references
+ * @return the next definition stage
+ */
+ WithCreate withParameters(Object parameters);
+ }
+
+ /**
+ * The stage of the policysetdefinition definition allowing to specify PolicyType.
+ */
+ interface WithPolicyType {
+ /**
+ * Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next definition stage
+ */
+ WithCreate withPolicyType(PolicyType policyType);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithDescription, DefinitionStages.WithDisplayName, DefinitionStages.WithMetadata, DefinitionStages.WithParameters, DefinitionStages.WithPolicyType {
+ }
+ }
+ /**
+ * The template for a PolicySetDefinition update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithDescription, UpdateStages.WithDisplayName, UpdateStages.WithMetadata, UpdateStages.WithParameters, UpdateStages.WithPolicyType {
+ }
+
+ /**
+ * Grouping of PolicySetDefinition update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the policysetdefinition update allowing to specify Description.
+ */
+ interface WithDescription {
+ /**
+ * Specifies description.
+ * @param description The policy set definition description
+ * @return the next update stage
+ */
+ Update withDescription(String description);
+ }
+
+ /**
+ * The stage of the policysetdefinition update allowing to specify DisplayName.
+ */
+ interface WithDisplayName {
+ /**
+ * Specifies displayName.
+ * @param displayName The display name of the policy set definition
+ * @return the next update stage
+ */
+ Update withDisplayName(String displayName);
+ }
+
+ /**
+ * The stage of the policysetdefinition update allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata The policy set definition metadata
+ * @return the next update stage
+ */
+ Update withMetadata(Object metadata);
+ }
+
+ /**
+ * The stage of the policysetdefinition update allowing to specify Parameters.
+ */
+ interface WithParameters {
+ /**
+ * Specifies parameters.
+ * @param parameters The policy set definition parameters that can be used in policy definition references
+ * @return the next update stage
+ */
+ Update withParameters(Object parameters);
+ }
+
+ /**
+ * The stage of the policysetdefinition update allowing to specify PolicyType.
+ */
+ interface WithPolicyType {
+ /**
+ * Specifies policyType.
+ * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
+ * @return the next update stage
+ */
+ Update withPolicyType(PolicyType policyType);
+ }
+
+ }
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySetDefinitions.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySetDefinitions.java
new file mode 100644
index 000000000000..d217d3b4ed6d
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySetDefinitions.java
@@ -0,0 +1,106 @@
+/**
+ * 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.policy.v2018_05_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicySetDefinitionInner;
+import com.microsoft.azure.management.policy.v2018_05_01.implementation.PolicySetDefinitionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PolicySetDefinitions.
+ */
+public interface PolicySetDefinitions extends SupportsCreating, SupportsListing, HasInner {
+ /**
+ * Deletes a policy set definition.
+ * This operation deletes the policy set definition in the given subscription with the given name.
+ *
+ * @param policySetDefinitionName The name of the policy set definition to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String policySetDefinitionName);
+
+ /**
+ * Retrieves a policy set definition.
+ * This operation retrieves the policy set definition in the given subscription with the given name.
+ *
+ * @param policySetDefinitionName The name of the policy set definition to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String policySetDefinitionName);
+
+ /**
+ * Retrieves a built in policy set definition.
+ * This operation retrieves the built-in policy set definition with the given name.
+ *
+ * @param policySetDefinitionName The name of the policy set definition to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getBuiltInAsync(String policySetDefinitionName);
+
+ /**
+ * Creates or updates a policy set definition.
+ * This operation creates or updates a policy set definition in the given management group with the given name.
+ *
+ * @param policySetDefinitionName The name of the policy set definition to create.
+ * @param managementGroupId The ID of the management group.
+ * @param parameters The policy set definition properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createOrUpdateAtManagementGroupAsync(String policySetDefinitionName, String managementGroupId, PolicySetDefinitionInner parameters);
+
+ /**
+ * Deletes a policy set definition.
+ * This operation deletes the policy set definition in the given management group with the given name.
+ *
+ * @param policySetDefinitionName The name of the policy set definition to delete.
+ * @param managementGroupId The ID of the management group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAtManagementGroupAsync(String policySetDefinitionName, String managementGroupId);
+
+ /**
+ * Retrieves a policy set definition.
+ * This operation retrieves the policy set definition in the given management group with the given name.
+ *
+ * @param policySetDefinitionName The name of the policy set definition to get.
+ * @param managementGroupId The ID of the management group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAtManagementGroupAsync(String policySetDefinitionName, String managementGroupId);
+
+ /**
+ * Retrieves all policy set definitions in management group.
+ * This operation retrieves a list of all the a policy set definition in the given management group.
+ *
+ * @param managementGroupId The ID of the management group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByManagementGroupAsync(final String managementGroupId);
+
+ /**
+ * Retrieves built-in policy set definitions.
+ * This operation retrieves a list of all the built-in policy set definitions.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listBuiltInAsync();
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySku.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySku.java
new file mode 100644
index 000000000000..2deb4e814852
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicySku.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policy.v2018_05_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The policy sku. This property is optional, obsolete, and will be ignored.
+ */
+public class PolicySku {
+ /**
+ * The name of the policy sku. Possible values are A0 and A1.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The policy sku tier. Possible values are Free and Standard.
+ */
+ @JsonProperty(value = "tier")
+ private String tier;
+
+ /**
+ * Get the name of the policy sku. Possible values are A0 and A1.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the policy sku. Possible values are A0 and A1.
+ *
+ * @param name the name value to set
+ * @return the PolicySku object itself.
+ */
+ public PolicySku withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the policy sku tier. Possible values are Free and Standard.
+ *
+ * @return the tier value
+ */
+ public String tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set the policy sku tier. Possible values are Free and Standard.
+ *
+ * @param tier the tier value to set
+ * @return the PolicySku object itself.
+ */
+ public PolicySku withTier(String tier) {
+ this.tier = tier;
+ return this;
+ }
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyType.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyType.java
new file mode 100644
index 000000000000..1e66edc8821e
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/PolicyType.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policy.v2018_05_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PolicyType.
+ */
+public final class PolicyType extends ExpandableStringEnum {
+ /** Static value NotSpecified for PolicyType. */
+ public static final PolicyType NOT_SPECIFIED = fromString("NotSpecified");
+
+ /** Static value BuiltIn for PolicyType. */
+ public static final PolicyType BUILT_IN = fromString("BuiltIn");
+
+ /** Static value Custom for PolicyType. */
+ public static final PolicyType CUSTOM = fromString("Custom");
+
+ /**
+ * Creates or finds a PolicyType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PolicyType
+ */
+ @JsonCreator
+ public static PolicyType fromString(String name) {
+ return fromString(name, PolicyType.class);
+ }
+
+ /**
+ * @return known PolicyType values
+ */
+ public static Collection values() {
+ return values(PolicyType.class);
+ }
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ResourceIdentityType.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ResourceIdentityType.java
new file mode 100644
index 000000000000..197ef162980c
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/ResourceIdentityType.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.policy.v2018_05_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for ResourceIdentityType.
+ */
+public enum ResourceIdentityType {
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned"),
+
+ /** Enum value None. */
+ NONE("None");
+
+ /** The actual serialized value for a ResourceIdentityType instance. */
+ private String value;
+
+ ResourceIdentityType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ResourceIdentityType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ResourceIdentityType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ResourceIdentityType fromString(String value) {
+ ResourceIdentityType[] items = ResourceIdentityType.values();
+ for (ResourceIdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/IdParsingUtils.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/IdParsingUtils.java
new file mode 100644
index 000000000000..f1aa3793a6d2
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_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.policy.v2018_05_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/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PageImpl.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PageImpl.java
new file mode 100644
index 000000000000..3424f793e010
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_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.policy.v2018_05_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/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentImpl.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentImpl.java
new file mode 100644
index 000000000000..e18041658250
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentImpl.java
@@ -0,0 +1,205 @@
+/**
+ * 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.policy.v2018_05_01.implementation;
+
+import com.microsoft.azure.management.policy.v2018_05_01.PolicyAssignment;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import java.util.List;
+import com.microsoft.azure.management.policy.v2018_05_01.PolicySku;
+import com.microsoft.azure.management.policy.v2018_05_01.Identity;
+
+class PolicyAssignmentImpl extends CreatableUpdatableImpl implements PolicyAssignment, PolicyAssignment.Definition, PolicyAssignment.Update {
+ private String scope;
+ private String policyAssignmentName;
+ private final PolicyManager manager;
+
+ PolicyAssignmentImpl(String name, PolicyManager manager) {
+ super(name, new PolicyAssignmentInner());
+ this.manager = manager;
+ // Set resource name
+ this.policyAssignmentName = name;
+ //
+ }
+
+ PolicyAssignmentImpl(PolicyAssignmentInner inner, PolicyManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.policyAssignmentName = inner.name();
+ // set resource ancestor and positional variables
+ this.policyAssignmentName = IdParsingUtils.getValueFromIdByName(inner.id(), "policyAssignments");
+ this.scope = IdParsingUtils.getValueFromIdByPosition(inner.id(), 0);
+ // set other parameters for create and update
+ }
+
+ @Override
+ public PolicyManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ PolicyAssignmentsInner client = this.manager().inner().policyAssignments();
+ return client.createAsync(this.scope, this.policyAssignmentName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ PolicyAssignmentsInner client = this.manager().inner().policyAssignments();
+ return client.createAsync(this.scope, this.policyAssignmentName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ PolicyAssignmentsInner client = this.manager().inner().policyAssignments();
+ return client.getAsync(this.scope, this.policyAssignmentName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public String description() {
+ return this.inner().description();
+ }
+
+ @Override
+ public String displayName() {
+ return this.inner().displayName();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public Identity identity() {
+ return this.inner().identity();
+ }
+
+ @Override
+ public String location() {
+ return this.inner().location();
+ }
+
+ @Override
+ public Object metadata() {
+ return this.inner().metadata();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public List notScopes() {
+ return this.inner().notScopes();
+ }
+
+ @Override
+ public Object parameters() {
+ return this.inner().parameters();
+ }
+
+ @Override
+ public String policyDefinitionId() {
+ return this.inner().policyDefinitionId();
+ }
+
+ @Override
+ public String scopeProperty() {
+ return this.inner().scopeProperty();
+ }
+
+ @Override
+ public PolicySku sku() {
+ return this.inner().sku();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public PolicyAssignmentImpl withScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withDescription(String description) {
+ this.inner().withDescription(description);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withDisplayName(String displayName) {
+ this.inner().withDisplayName(displayName);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withIdentity(Identity identity) {
+ this.inner().withIdentity(identity);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withLocation(String location) {
+ this.inner().withLocation(location);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withMetadata(Object metadata) {
+ this.inner().withMetadata(metadata);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withNotScopes(List notScopes) {
+ this.inner().withNotScopes(notScopes);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withParameters(Object parameters) {
+ this.inner().withParameters(parameters);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withPolicyDefinitionId(String policyDefinitionId) {
+ this.inner().withPolicyDefinitionId(policyDefinitionId);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withScopeProperty(String scopeProperty) {
+ this.inner().withScopeProperty(scopeProperty);
+ return this;
+ }
+
+ @Override
+ public PolicyAssignmentImpl withSku(PolicySku sku) {
+ this.inner().withSku(sku);
+ return this;
+ }
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentInner.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentInner.java
new file mode 100644
index 000000000000..f52dd497cf45
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentInner.java
@@ -0,0 +1,285 @@
+/**
+ * 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.policy.v2018_05_01.implementation;
+
+import java.util.List;
+import com.microsoft.azure.management.policy.v2018_05_01.PolicySku;
+import com.microsoft.azure.management.policy.v2018_05_01.Identity;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The policy assignment.
+ */
+@JsonFlatten
+public class PolicyAssignmentInner extends ProxyResource {
+ /**
+ * The display name of the policy assignment.
+ */
+ @JsonProperty(value = "properties.displayName")
+ private String displayName;
+
+ /**
+ * The ID of the policy definition or policy set definition being assigned.
+ */
+ @JsonProperty(value = "properties.policyDefinitionId")
+ private String policyDefinitionId;
+
+ /**
+ * The scope for the policy assignment.
+ */
+ @JsonProperty(value = "properties.scope")
+ private String scopeProperty;
+
+ /**
+ * The policy's excluded scopes.
+ */
+ @JsonProperty(value = "properties.notScopes")
+ private List notScopes;
+
+ /**
+ * Required if a parameter is used in policy rule.
+ */
+ @JsonProperty(value = "properties.parameters")
+ private Object parameters;
+
+ /**
+ * This message will be part of response in case of policy violation.
+ */
+ @JsonProperty(value = "properties.description")
+ private String description;
+
+ /**
+ * The policy assignment metadata.
+ */
+ @JsonProperty(value = "properties.metadata")
+ private Object metadata;
+
+ /**
+ * The policy sku. This property is optional, obsolete, and will be
+ * ignored.
+ */
+ @JsonProperty(value = "sku")
+ private PolicySku sku;
+
+ /**
+ * The location of the policy assignment. Only required when utilizing
+ * managed identity.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * The managed identity associated with the policy assignment.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /**
+ * Get the display name of the policy assignment.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the display name of the policy assignment.
+ *
+ * @param displayName the displayName value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the ID of the policy definition or policy set definition being assigned.
+ *
+ * @return the policyDefinitionId value
+ */
+ public String policyDefinitionId() {
+ return this.policyDefinitionId;
+ }
+
+ /**
+ * Set the ID of the policy definition or policy set definition being assigned.
+ *
+ * @param policyDefinitionId the policyDefinitionId value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withPolicyDefinitionId(String policyDefinitionId) {
+ this.policyDefinitionId = policyDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get the scope for the policy assignment.
+ *
+ * @return the scopeProperty value
+ */
+ public String scopeProperty() {
+ return this.scopeProperty;
+ }
+
+ /**
+ * Set the scope for the policy assignment.
+ *
+ * @param scopeProperty the scopeProperty value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withScopeProperty(String scopeProperty) {
+ this.scopeProperty = scopeProperty;
+ return this;
+ }
+
+ /**
+ * Get the policy's excluded scopes.
+ *
+ * @return the notScopes value
+ */
+ public List notScopes() {
+ return this.notScopes;
+ }
+
+ /**
+ * Set the policy's excluded scopes.
+ *
+ * @param notScopes the notScopes value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withNotScopes(List notScopes) {
+ this.notScopes = notScopes;
+ return this;
+ }
+
+ /**
+ * Get required if a parameter is used in policy rule.
+ *
+ * @return the parameters value
+ */
+ public Object parameters() {
+ return this.parameters;
+ }
+
+ /**
+ * Set required if a parameter is used in policy rule.
+ *
+ * @param parameters the parameters value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withParameters(Object parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+
+ /**
+ * Get this message will be part of response in case of policy violation.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set this message will be part of response in case of policy violation.
+ *
+ * @param description the description value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the policy assignment metadata.
+ *
+ * @return the metadata value
+ */
+ public Object metadata() {
+ return this.metadata;
+ }
+
+ /**
+ * Set the policy assignment metadata.
+ *
+ * @param metadata the metadata value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withMetadata(Object metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Get the policy sku. This property is optional, obsolete, and will be ignored.
+ *
+ * @return the sku value
+ */
+ public PolicySku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the policy sku. This property is optional, obsolete, and will be ignored.
+ *
+ * @param sku the sku value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withSku(PolicySku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the location of the policy assignment. Only required when utilizing managed identity.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location of the policy assignment. Only required when utilizing managed identity.
+ *
+ * @param location the location value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the managed identity associated with the policy assignment.
+ *
+ * @return the identity value
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the managed identity associated with the policy assignment.
+ *
+ * @param identity the identity value to set
+ * @return the PolicyAssignmentInner object itself.
+ */
+ public PolicyAssignmentInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+}
diff --git a/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentsImpl.java b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentsImpl.java
new file mode 100644
index 000000000000..6477daabe945
--- /dev/null
+++ b/policy/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyAssignmentsImpl.java
@@ -0,0 +1,179 @@
+/**
+ * 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.policy.v2018_05_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.policy.v2018_05_01.PolicyAssignments;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.policy.v2018_05_01.PolicyAssignment;
+import com.microsoft.azure.arm.utils.PagedListConverter;
+
+class PolicyAssignmentsImpl extends WrapperImpl implements PolicyAssignments {
+ private PagedListConverter converter;
+ private final PolicyManager manager;
+
+ PolicyAssignmentsImpl(PolicyManager manager) {
+ super(manager.inner().policyAssignments());
+ this.manager = manager;
+ this.converter = new PagedListConverter() {
+ @Override
+ public Observable typeConvertAsync(PolicyAssignmentInner inner) {
+ return Observable.just((PolicyAssignment) wrapModel(inner));
+ }
+ };
+ }
+
+ public PolicyManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public PolicyAssignmentImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private PolicyAssignmentImpl wrapModel(PolicyAssignmentInner inner) {
+ return new PolicyAssignmentImpl(inner, manager());
+ }
+
+ private PolicyAssignmentImpl wrapModel(String name) {
+ return new PolicyAssignmentImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable deleteAsync(String scope, String policyAssignmentName) {
+ PolicyAssignmentsInner client = this.inner();
+ return client.deleteAsync(scope, policyAssignmentName)
+ .map(new Func1() {
+ @Override
+ public PolicyAssignment call(PolicyAssignmentInner inner) {
+ return new PolicyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String scope, String policyAssignmentName) {
+ PolicyAssignmentsInner client = this.inner();
+ return client.getAsync(scope, policyAssignmentName)
+ .map(new Func1() {
+ @Override
+ public PolicyAssignment call(PolicyAssignmentInner inner) {
+ return new PolicyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName) {
+ PolicyAssignmentsInner 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 PolicyAssignment call(PolicyAssignmentInner inner) {
+ return new PolicyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable deleteByIdAsync(String policyAssignmentId) {
+ PolicyAssignmentsInner client = this.inner();
+ return client.deleteByIdAsync(policyAssignmentId)
+ .map(new Func1() {
+ @Override
+ public PolicyAssignment call(PolicyAssignmentInner inner) {
+ return new PolicyAssignmentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable createByIdAsync(String policyAssignmentId, PolicyAssignmentInner parameters) {
+ PolicyAssignmentsInner client = this.inner();
+ return client.createByIdAsync(policyAssignmentId, parameters)
+ .map(new Func1