diff --git a/sdk/policyinsights/mgmt-v2020_07_01/pom.xml b/sdk/policyinsights/mgmt-v2020_07_01/pom.xml
new file mode 100644
index 000000000000..ae17a11bd4b7
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.policyinsights.v2020_07_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-policyinsights
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for PolicyInsights Management
+ This package contains Microsoft PolicyInsights 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
+
+ 1.6.5
+
+
+
+
+
+ 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/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsRequest.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsRequest.java
new file mode 100644
index 000000000000..6e15e5b3ed94
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsRequest.java
@@ -0,0 +1,72 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The check policy restrictions parameters describing the resource that is
+ * being evaluated.
+ */
+public class CheckRestrictionsRequest {
+ /**
+ * The information about the resource that will be evaluated.
+ */
+ @JsonProperty(value = "resourceDetails", required = true)
+ private CheckRestrictionsResourceDetails resourceDetails;
+
+ /**
+ * The list of fields and values that should be evaluated for potential
+ * restrictions.
+ */
+ @JsonProperty(value = "pendingFields")
+ private List pendingFields;
+
+ /**
+ * Get the information about the resource that will be evaluated.
+ *
+ * @return the resourceDetails value
+ */
+ public CheckRestrictionsResourceDetails resourceDetails() {
+ return this.resourceDetails;
+ }
+
+ /**
+ * Set the information about the resource that will be evaluated.
+ *
+ * @param resourceDetails the resourceDetails value to set
+ * @return the CheckRestrictionsRequest object itself.
+ */
+ public CheckRestrictionsRequest withResourceDetails(CheckRestrictionsResourceDetails resourceDetails) {
+ this.resourceDetails = resourceDetails;
+ return this;
+ }
+
+ /**
+ * Get the list of fields and values that should be evaluated for potential restrictions.
+ *
+ * @return the pendingFields value
+ */
+ public List pendingFields() {
+ return this.pendingFields;
+ }
+
+ /**
+ * Set the list of fields and values that should be evaluated for potential restrictions.
+ *
+ * @param pendingFields the pendingFields value to set
+ * @return the CheckRestrictionsRequest object itself.
+ */
+ public CheckRestrictionsRequest withPendingFields(List pendingFields) {
+ this.pendingFields = pendingFields;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResourceDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResourceDetails.java
new file mode 100644
index 000000000000..ba1f5049b14e
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResourceDetails.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The information about the resource that will be evaluated.
+ */
+public class CheckRestrictionsResourceDetails {
+ /**
+ * The resource content. This should include whatever properties are
+ * already known and can be a partial set of all resource properties.
+ */
+ @JsonProperty(value = "resourceContent", required = true)
+ private Object resourceContent;
+
+ /**
+ * The api-version of the resource content.
+ */
+ @JsonProperty(value = "apiVersion")
+ private String apiVersion;
+
+ /**
+ * The scope where the resource is being created. For example, if the
+ * resource is a child resource this would be the parent resource's
+ * resource ID.
+ */
+ @JsonProperty(value = "scope")
+ private String scope;
+
+ /**
+ * Get the resource content. This should include whatever properties are already known and can be a partial set of all resource properties.
+ *
+ * @return the resourceContent value
+ */
+ public Object resourceContent() {
+ return this.resourceContent;
+ }
+
+ /**
+ * Set the resource content. This should include whatever properties are already known and can be a partial set of all resource properties.
+ *
+ * @param resourceContent the resourceContent value to set
+ * @return the CheckRestrictionsResourceDetails object itself.
+ */
+ public CheckRestrictionsResourceDetails withResourceContent(Object resourceContent) {
+ this.resourceContent = resourceContent;
+ return this;
+ }
+
+ /**
+ * Get the api-version of the resource content.
+ *
+ * @return the apiVersion value
+ */
+ public String apiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * Set the api-version of the resource content.
+ *
+ * @param apiVersion the apiVersion value to set
+ * @return the CheckRestrictionsResourceDetails object itself.
+ */
+ public CheckRestrictionsResourceDetails withApiVersion(String apiVersion) {
+ this.apiVersion = apiVersion;
+ return this;
+ }
+
+ /**
+ * Get the scope where the resource is being created. For example, if the resource is a child resource this would be the parent resource's resource ID.
+ *
+ * @return the scope value
+ */
+ public String scope() {
+ return this.scope;
+ }
+
+ /**
+ * Set the scope where the resource is being created. For example, if the resource is a child resource this would be the parent resource's resource ID.
+ *
+ * @param scope the scope value to set
+ * @return the CheckRestrictionsResourceDetails object itself.
+ */
+ public CheckRestrictionsResourceDetails withScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResult.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResult.java
new file mode 100644
index 000000000000..8c373a4498cc
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResult.java
@@ -0,0 +1,31 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.CheckRestrictionsResultInner;
+import java.util.List;
+
+/**
+ * Type representing CheckRestrictionsResult.
+ */
+public interface CheckRestrictionsResult extends HasInner, HasManager {
+ /**
+ * @return the contentEvaluationResult value.
+ */
+ CheckRestrictionsResultContentEvaluationResult contentEvaluationResult();
+
+ /**
+ * @return the fieldRestrictions value.
+ */
+ List fieldRestrictions();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResultContentEvaluationResult.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResultContentEvaluationResult.java
new file mode 100644
index 000000000000..b74b837f40dd
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/CheckRestrictionsResultContentEvaluationResult.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Evaluation results for the provided partial resource content.
+ */
+public class CheckRestrictionsResultContentEvaluationResult {
+ /**
+ * Policy evaluation results against the given resource content. This will
+ * indicate if the partial content that was provided will be denied as-is.
+ */
+ @JsonProperty(value = "policyEvaluations")
+ private List policyEvaluations;
+
+ /**
+ * Get policy evaluation results against the given resource content. This will indicate if the partial content that was provided will be denied as-is.
+ *
+ * @return the policyEvaluations value
+ */
+ public List policyEvaluations() {
+ return this.policyEvaluations;
+ }
+
+ /**
+ * Set policy evaluation results against the given resource content. This will indicate if the partial content that was provided will be denied as-is.
+ *
+ * @param policyEvaluations the policyEvaluations value to set
+ * @return the CheckRestrictionsResultContentEvaluationResult object itself.
+ */
+ public CheckRestrictionsResultContentEvaluationResult withPolicyEvaluations(List policyEvaluations) {
+ this.policyEvaluations = policyEvaluations;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComplianceDetail.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComplianceDetail.java
new file mode 100644
index 000000000000..6c9128103891
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComplianceDetail.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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The compliance state rollup.
+ */
+public class ComplianceDetail {
+ /**
+ * The compliance state.
+ */
+ @JsonProperty(value = "complianceState")
+ private String complianceState;
+
+ /**
+ * Summarized count value for this compliance state.
+ */
+ @JsonProperty(value = "count")
+ private Integer count;
+
+ /**
+ * Get the compliance state.
+ *
+ * @return the complianceState value
+ */
+ public String complianceState() {
+ return this.complianceState;
+ }
+
+ /**
+ * Set the compliance state.
+ *
+ * @param complianceState the complianceState value to set
+ * @return the ComplianceDetail object itself.
+ */
+ public ComplianceDetail withComplianceState(String complianceState) {
+ this.complianceState = complianceState;
+ return this;
+ }
+
+ /**
+ * Get summarized count value for this compliance state.
+ *
+ * @return the count value
+ */
+ public Integer count() {
+ return this.count;
+ }
+
+ /**
+ * Set summarized count value for this compliance state.
+ *
+ * @param count the count value to set
+ * @return the ComplianceDetail object itself.
+ */
+ public ComplianceDetail withCount(Integer count) {
+ this.count = count;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComponentEventDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComponentEventDetails.java
new file mode 100644
index 000000000000..35dd4b58d0d8
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComponentEventDetails.java
@@ -0,0 +1,228 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.Map;
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Component event details.
+ */
+public class ComponentEventDetails {
+ /**
+ * Unmatched properties from the message are deserialized this collection.
+ */
+ @JsonProperty(value = "")
+ private Map additionalProperties;
+
+ /**
+ * Component Id.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * Component type.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Component name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Timestamp for component policy event record.
+ */
+ @JsonProperty(value = "timestamp")
+ private DateTime timestamp;
+
+ /**
+ * Tenant ID for the policy event record.
+ */
+ @JsonProperty(value = "tenantId")
+ private String tenantId;
+
+ /**
+ * Principal object ID for the user who initiated the resource component
+ * operation that triggered the policy event.
+ */
+ @JsonProperty(value = "principalOid")
+ private String principalOid;
+
+ /**
+ * Policy definition action, i.e. effect.
+ */
+ @JsonProperty(value = "policyDefinitionAction")
+ private String policyDefinitionAction;
+
+ /**
+ * Get unmatched properties from the message are deserialized this collection.
+ *
+ * @return the additionalProperties value
+ */
+ public Map additionalProperties() {
+ return this.additionalProperties;
+ }
+
+ /**
+ * Set unmatched properties from the message are deserialized this collection.
+ *
+ * @param additionalProperties the additionalProperties value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withAdditionalProperties(Map additionalProperties) {
+ this.additionalProperties = additionalProperties;
+ return this;
+ }
+
+ /**
+ * Get component Id.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set component Id.
+ *
+ * @param id the id value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get component type.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set component type.
+ *
+ * @param type the type value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get component name.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set component name.
+ *
+ * @param name the name value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get timestamp for component policy event record.
+ *
+ * @return the timestamp value
+ */
+ public DateTime timestamp() {
+ return this.timestamp;
+ }
+
+ /**
+ * Set timestamp for component policy event record.
+ *
+ * @param timestamp the timestamp value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withTimestamp(DateTime timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ /**
+ * Get tenant ID for the policy event record.
+ *
+ * @return the tenantId value
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set tenant ID for the policy event record.
+ *
+ * @param tenantId the tenantId value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Get principal object ID for the user who initiated the resource component operation that triggered the policy event.
+ *
+ * @return the principalOid value
+ */
+ public String principalOid() {
+ return this.principalOid;
+ }
+
+ /**
+ * Set principal object ID for the user who initiated the resource component operation that triggered the policy event.
+ *
+ * @param principalOid the principalOid value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withPrincipalOid(String principalOid) {
+ this.principalOid = principalOid;
+ return this;
+ }
+
+ /**
+ * Get policy definition action, i.e. effect.
+ *
+ * @return the policyDefinitionAction value
+ */
+ public String policyDefinitionAction() {
+ return this.policyDefinitionAction;
+ }
+
+ /**
+ * Set policy definition action, i.e. effect.
+ *
+ * @param policyDefinitionAction the policyDefinitionAction value to set
+ * @return the ComponentEventDetails object itself.
+ */
+ public ComponentEventDetails withPolicyDefinitionAction(String policyDefinitionAction) {
+ this.policyDefinitionAction = policyDefinitionAction;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComponentStateDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComponentStateDetails.java
new file mode 100644
index 000000000000..ceaa6cb61ac3
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ComponentStateDetails.java
@@ -0,0 +1,175 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.Map;
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Component state details.
+ */
+public class ComponentStateDetails {
+ /**
+ * Unmatched properties from the message are deserialized this collection.
+ */
+ @JsonProperty(value = "")
+ private Map additionalProperties;
+
+ /**
+ * Component Id.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * Component type.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Component name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Component compliance evaluation timestamp.
+ */
+ @JsonProperty(value = "timestamp")
+ private DateTime timestamp;
+
+ /**
+ * Component compliance state.
+ */
+ @JsonProperty(value = "complianceState")
+ private String complianceState;
+
+ /**
+ * Get unmatched properties from the message are deserialized this collection.
+ *
+ * @return the additionalProperties value
+ */
+ public Map additionalProperties() {
+ return this.additionalProperties;
+ }
+
+ /**
+ * Set unmatched properties from the message are deserialized this collection.
+ *
+ * @param additionalProperties the additionalProperties value to set
+ * @return the ComponentStateDetails object itself.
+ */
+ public ComponentStateDetails withAdditionalProperties(Map additionalProperties) {
+ this.additionalProperties = additionalProperties;
+ return this;
+ }
+
+ /**
+ * Get component Id.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set component Id.
+ *
+ * @param id the id value to set
+ * @return the ComponentStateDetails object itself.
+ */
+ public ComponentStateDetails withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get component type.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set component type.
+ *
+ * @param type the type value to set
+ * @return the ComponentStateDetails object itself.
+ */
+ public ComponentStateDetails withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get component name.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set component name.
+ *
+ * @param name the name value to set
+ * @return the ComponentStateDetails object itself.
+ */
+ public ComponentStateDetails withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get component compliance evaluation timestamp.
+ *
+ * @return the timestamp value
+ */
+ public DateTime timestamp() {
+ return this.timestamp;
+ }
+
+ /**
+ * Set component compliance evaluation timestamp.
+ *
+ * @param timestamp the timestamp value to set
+ * @return the ComponentStateDetails object itself.
+ */
+ public ComponentStateDetails withTimestamp(DateTime timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ /**
+ * Get component compliance state.
+ *
+ * @return the complianceState value
+ */
+ public String complianceState() {
+ return this.complianceState;
+ }
+
+ /**
+ * Set component compliance state.
+ *
+ * @param complianceState the complianceState value to set
+ * @return the ComponentStateDetails object itself.
+ */
+ public ComponentStateDetails withComplianceState(String complianceState) {
+ this.complianceState = complianceState;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorDefinition.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorDefinition.java
new file mode 100644
index 000000000000..b657f249688b
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorDefinition.java
@@ -0,0 +1,94 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error definition.
+ */
+public class ErrorDefinition {
+ /**
+ * Service specific error code which serves as the substatus for the HTTP
+ * error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * Description of the error.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The target of the error.
+ */
+ @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
+ private String target;
+
+ /**
+ * Internal error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private List details;
+
+ /**
+ * Additional scenario specific error details.
+ */
+ @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
+ private List additionalInfo;
+
+ /**
+ * Get service specific error code which serves as the substatus for the HTTP error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get description of the error.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the target of the error.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Get internal error details.
+ *
+ * @return the details value
+ */
+ public List details() {
+ return this.details;
+ }
+
+ /**
+ * Get additional scenario specific error details.
+ *
+ * @return the additionalInfo value
+ */
+ public List additionalInfo() {
+ return this.additionalInfo;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorResponse.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorResponse.java
new file mode 100644
index 000000000000..07fef237965d
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorResponse.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response.
+ */
+public class ErrorResponse {
+ /**
+ * The error details.
+ */
+ @JsonProperty(value = "error")
+ private ErrorDefinition error;
+
+ /**
+ * Get the error details.
+ *
+ * @return the error value
+ */
+ public ErrorDefinition error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error details.
+ *
+ * @param error the error value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withError(ErrorDefinition error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorResponseException.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ErrorResponseException.java
new file mode 100644
index 000000000000..428f54590690
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_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.policyinsights.v2020_07_01;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ExpressionEvaluationDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ExpressionEvaluationDetails.java
new file mode 100644
index 000000000000..36546dfd594b
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ExpressionEvaluationDetails.java
@@ -0,0 +1,188 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Evaluation details of policy language expressions.
+ */
+public class ExpressionEvaluationDetails {
+ /**
+ * Evaluation result.
+ */
+ @JsonProperty(value = "result")
+ private String result;
+
+ /**
+ * Expression evaluated.
+ */
+ @JsonProperty(value = "expression")
+ private String expression;
+
+ /**
+ * The kind of expression that was evaluated.
+ */
+ @JsonProperty(value = "expressionKind", access = JsonProperty.Access.WRITE_ONLY)
+ private String expressionKind;
+
+ /**
+ * Property path if the expression is a field or an alias.
+ */
+ @JsonProperty(value = "path")
+ private String path;
+
+ /**
+ * Value of the expression.
+ */
+ @JsonProperty(value = "expressionValue")
+ private Object expressionValue;
+
+ /**
+ * Target value to be compared with the expression value.
+ */
+ @JsonProperty(value = "targetValue")
+ private Object targetValue;
+
+ /**
+ * Operator to compare the expression value and the target value.
+ */
+ @JsonProperty(value = "operator")
+ private String operator;
+
+ /**
+ * Get evaluation result.
+ *
+ * @return the result value
+ */
+ public String result() {
+ return this.result;
+ }
+
+ /**
+ * Set evaluation result.
+ *
+ * @param result the result value to set
+ * @return the ExpressionEvaluationDetails object itself.
+ */
+ public ExpressionEvaluationDetails withResult(String result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get expression evaluated.
+ *
+ * @return the expression value
+ */
+ public String expression() {
+ return this.expression;
+ }
+
+ /**
+ * Set expression evaluated.
+ *
+ * @param expression the expression value to set
+ * @return the ExpressionEvaluationDetails object itself.
+ */
+ public ExpressionEvaluationDetails withExpression(String expression) {
+ this.expression = expression;
+ return this;
+ }
+
+ /**
+ * Get the kind of expression that was evaluated.
+ *
+ * @return the expressionKind value
+ */
+ public String expressionKind() {
+ return this.expressionKind;
+ }
+
+ /**
+ * Get property path if the expression is a field or an alias.
+ *
+ * @return the path value
+ */
+ public String path() {
+ return this.path;
+ }
+
+ /**
+ * Set property path if the expression is a field or an alias.
+ *
+ * @param path the path value to set
+ * @return the ExpressionEvaluationDetails object itself.
+ */
+ public ExpressionEvaluationDetails withPath(String path) {
+ this.path = path;
+ return this;
+ }
+
+ /**
+ * Get value of the expression.
+ *
+ * @return the expressionValue value
+ */
+ public Object expressionValue() {
+ return this.expressionValue;
+ }
+
+ /**
+ * Set value of the expression.
+ *
+ * @param expressionValue the expressionValue value to set
+ * @return the ExpressionEvaluationDetails object itself.
+ */
+ public ExpressionEvaluationDetails withExpressionValue(Object expressionValue) {
+ this.expressionValue = expressionValue;
+ return this;
+ }
+
+ /**
+ * Get target value to be compared with the expression value.
+ *
+ * @return the targetValue value
+ */
+ public Object targetValue() {
+ return this.targetValue;
+ }
+
+ /**
+ * Set target value to be compared with the expression value.
+ *
+ * @param targetValue the targetValue value to set
+ * @return the ExpressionEvaluationDetails object itself.
+ */
+ public ExpressionEvaluationDetails withTargetValue(Object targetValue) {
+ this.targetValue = targetValue;
+ return this;
+ }
+
+ /**
+ * Get operator to compare the expression value and the target value.
+ *
+ * @return the operator value
+ */
+ public String operator() {
+ return this.operator;
+ }
+
+ /**
+ * Set operator to compare the expression value and the target value.
+ *
+ * @param operator the operator value to set
+ * @return the ExpressionEvaluationDetails object itself.
+ */
+ public ExpressionEvaluationDetails withOperator(String operator) {
+ this.operator = operator;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestriction.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestriction.java
new file mode 100644
index 000000000000..3298c2cdf04e
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestriction.java
@@ -0,0 +1,80 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The restrictions on a field imposed by a specific policy.
+ */
+public class FieldRestriction {
+ /**
+ * The type of restriction that is imposed on the field. Possible values
+ * include: 'Required', 'Removed', 'Deny'.
+ */
+ @JsonProperty(value = "result", access = JsonProperty.Access.WRITE_ONLY)
+ private FieldRestrictionResult result;
+
+ /**
+ * The value that policy will set for the field if the user does not
+ * provide a value.
+ */
+ @JsonProperty(value = "defaultValue", access = JsonProperty.Access.WRITE_ONLY)
+ private String defaultValue;
+
+ /**
+ * The values that policy either requires or denies for the field.
+ */
+ @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY)
+ private List values;
+
+ /**
+ * The details of the policy that is causing the field restriction.
+ */
+ @JsonProperty(value = "policy", access = JsonProperty.Access.WRITE_ONLY)
+ private PolicyReference policy;
+
+ /**
+ * Get the type of restriction that is imposed on the field. Possible values include: 'Required', 'Removed', 'Deny'.
+ *
+ * @return the result value
+ */
+ public FieldRestrictionResult result() {
+ return this.result;
+ }
+
+ /**
+ * Get the value that policy will set for the field if the user does not provide a value.
+ *
+ * @return the defaultValue value
+ */
+ public String defaultValue() {
+ return this.defaultValue;
+ }
+
+ /**
+ * Get the values that policy either requires or denies for the field.
+ *
+ * @return the values value
+ */
+ public List values() {
+ return this.values;
+ }
+
+ /**
+ * Get the details of the policy that is causing the field restriction.
+ *
+ * @return the policy value
+ */
+ public PolicyReference policy() {
+ return this.policy;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestrictionResult.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestrictionResult.java
new file mode 100644
index 000000000000..7f2bd1ca862a
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestrictionResult.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.policyinsights.v2020_07_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for FieldRestrictionResult.
+ */
+public final class FieldRestrictionResult extends ExpandableStringEnum {
+ /** Static value Required for FieldRestrictionResult. */
+ public static final FieldRestrictionResult REQUIRED = fromString("Required");
+
+ /** Static value Removed for FieldRestrictionResult. */
+ public static final FieldRestrictionResult REMOVED = fromString("Removed");
+
+ /** Static value Deny for FieldRestrictionResult. */
+ public static final FieldRestrictionResult DENY = fromString("Deny");
+
+ /**
+ * Creates or finds a FieldRestrictionResult from its string representation.
+ * @param name a name to look for
+ * @return the corresponding FieldRestrictionResult
+ */
+ @JsonCreator
+ public static FieldRestrictionResult fromString(String name) {
+ return fromString(name, FieldRestrictionResult.class);
+ }
+
+ /**
+ * @return known FieldRestrictionResult values
+ */
+ public static Collection values() {
+ return values(FieldRestrictionResult.class);
+ }
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestrictions.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestrictions.java
new file mode 100644
index 000000000000..93bda9c6b48e
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/FieldRestrictions.java
@@ -0,0 +1,60 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The restrictions that will be placed on a field in the resource by policy.
+ */
+public class FieldRestrictions {
+ /**
+ * The name of the field. This can be a top-level property like 'name' or
+ * 'type' or an Azure Policy field alias.
+ */
+ @JsonProperty(value = "field", access = JsonProperty.Access.WRITE_ONLY)
+ private String field;
+
+ /**
+ * The restrictions placed on that field by policy.
+ */
+ @JsonProperty(value = "restrictions")
+ private List restrictions;
+
+ /**
+ * Get the name of the field. This can be a top-level property like 'name' or 'type' or an Azure Policy field alias.
+ *
+ * @return the field value
+ */
+ public String field() {
+ return this.field;
+ }
+
+ /**
+ * Get the restrictions placed on that field by policy.
+ *
+ * @return the restrictions value
+ */
+ public List restrictions() {
+ return this.restrictions;
+ }
+
+ /**
+ * Set the restrictions placed on that field by policy.
+ *
+ * @param restrictions the restrictions value to set
+ * @return the FieldRestrictions object itself.
+ */
+ public FieldRestrictions withRestrictions(List restrictions) {
+ this.restrictions = restrictions;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/IfNotExistsEvaluationDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/IfNotExistsEvaluationDetails.java
new file mode 100644
index 000000000000..0622cbc27961
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/IfNotExistsEvaluationDetails.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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Evaluation details of IfNotExists effect.
+ */
+public class IfNotExistsEvaluationDetails {
+ /**
+ * ID of the last evaluated resource for IfNotExists effect.
+ */
+ @JsonProperty(value = "resourceId")
+ private String resourceId;
+
+ /**
+ * Total number of resources to which the existence condition is
+ * applicable.
+ */
+ @JsonProperty(value = "totalResources")
+ private Integer totalResources;
+
+ /**
+ * Get iD of the last evaluated resource for IfNotExists effect.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set iD of the last evaluated resource for IfNotExists effect.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the IfNotExistsEvaluationDetails object itself.
+ */
+ public IfNotExistsEvaluationDetails withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get total number of resources to which the existence condition is applicable.
+ *
+ * @return the totalResources value
+ */
+ public Integer totalResources() {
+ return this.totalResources;
+ }
+
+ /**
+ * Set total number of resources to which the existence condition is applicable.
+ *
+ * @param totalResources the totalResources value to set
+ * @return the IfNotExistsEvaluationDetails object itself.
+ */
+ public IfNotExistsEvaluationDetails withTotalResources(Integer totalResources) {
+ this.totalResources = totalResources;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/OperationDisplay.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/OperationDisplay.java
new file mode 100644
index 000000000000..a387f693c2c9
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/OperationDisplay.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Display metadata associated with the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Resource provider name.
+ */
+ @JsonProperty(value = "provider")
+ private String provider;
+
+ /**
+ * Resource name on which the operation is performed.
+ */
+ @JsonProperty(value = "resource")
+ private String resource;
+
+ /**
+ * Operation name.
+ */
+ @JsonProperty(value = "operation")
+ private String operation;
+
+ /**
+ * Operation description.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get resource provider name.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Set resource provider name.
+ *
+ * @param provider the provider value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withProvider(String provider) {
+ this.provider = provider;
+ return this;
+ }
+
+ /**
+ * Get resource name on which the operation is performed.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Set resource name on which the operation is performed.
+ *
+ * @param resource the resource value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withResource(String resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ /**
+ * Get operation name.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set operation name.
+ *
+ * @param operation the operation value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withOperation(String operation) {
+ this.operation = operation;
+ return this;
+ }
+
+ /**
+ * Get operation description.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set operation description.
+ *
+ * @param description the description value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Operations.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Operations.java
new file mode 100644
index 000000000000..7350424a3c21
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Operations.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.policyinsights.v2020_07_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists available operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/OperationsListResults.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/OperationsListResults.java
new file mode 100644
index 000000000000..fc2dc1e851f3
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/OperationsListResults.java
@@ -0,0 +1,32 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.OperationsListResultsInner;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.OperationInner;
+import java.util.List;
+
+/**
+ * Type representing OperationsListResults.
+ */
+public interface OperationsListResults extends HasInner, HasManager {
+ /**
+ * @return the odatacount value.
+ */
+ Integer odatacount();
+
+ /**
+ * @return the value value.
+ */
+ List value();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PendingField.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PendingField.java
new file mode 100644
index 000000000000..5cd208bb5ed9
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PendingField.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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A field that should be evaluated against Azure Policy to determine
+ * restrictions.
+ */
+public class PendingField {
+ /**
+ * The name of the field. This can be a top-level property like 'name' or
+ * 'type' or an Azure Policy field alias.
+ */
+ @JsonProperty(value = "field", required = true)
+ private String field;
+
+ /**
+ * The list of potential values for the field that should be evaluated
+ * against Azure Policy.
+ */
+ @JsonProperty(value = "values")
+ private List values;
+
+ /**
+ * Get the name of the field. This can be a top-level property like 'name' or 'type' or an Azure Policy field alias.
+ *
+ * @return the field value
+ */
+ public String field() {
+ return this.field;
+ }
+
+ /**
+ * Set the name of the field. This can be a top-level property like 'name' or 'type' or an Azure Policy field alias.
+ *
+ * @param field the field value to set
+ * @return the PendingField object itself.
+ */
+ public PendingField withField(String field) {
+ this.field = field;
+ return this;
+ }
+
+ /**
+ * Get the list of potential values for the field that should be evaluated against Azure Policy.
+ *
+ * @return the values value
+ */
+ public List values() {
+ return this.values;
+ }
+
+ /**
+ * Set the list of potential values for the field that should be evaluated against Azure Policy.
+ *
+ * @param values the values value to set
+ * @return the PendingField object itself.
+ */
+ public PendingField withValues(List values) {
+ this.values = values;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyAssignmentSummary.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyAssignmentSummary.java
new file mode 100644
index 000000000000..9eddd309bbaa
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyAssignmentSummary.java
@@ -0,0 +1,148 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Policy assignment summary.
+ */
+public class PolicyAssignmentSummary {
+ /**
+ * Policy assignment ID.
+ */
+ @JsonProperty(value = "policyAssignmentId")
+ private String policyAssignmentId;
+
+ /**
+ * Policy set definition ID, if the policy assignment is for a policy set.
+ */
+ @JsonProperty(value = "policySetDefinitionId")
+ private String policySetDefinitionId;
+
+ /**
+ * Compliance summary for the policy assignment.
+ */
+ @JsonProperty(value = "results")
+ private SummaryResults results;
+
+ /**
+ * Policy definitions summary.
+ */
+ @JsonProperty(value = "policyDefinitions")
+ private List policyDefinitions;
+
+ /**
+ * Policy definition group summary.
+ */
+ @JsonProperty(value = "policyGroups")
+ private List policyGroups;
+
+ /**
+ * Get policy assignment ID.
+ *
+ * @return the policyAssignmentId value
+ */
+ public String policyAssignmentId() {
+ return this.policyAssignmentId;
+ }
+
+ /**
+ * Set policy assignment ID.
+ *
+ * @param policyAssignmentId the policyAssignmentId value to set
+ * @return the PolicyAssignmentSummary object itself.
+ */
+ public PolicyAssignmentSummary withPolicyAssignmentId(String policyAssignmentId) {
+ this.policyAssignmentId = policyAssignmentId;
+ return this;
+ }
+
+ /**
+ * Get policy set definition ID, if the policy assignment is for a policy set.
+ *
+ * @return the policySetDefinitionId value
+ */
+ public String policySetDefinitionId() {
+ return this.policySetDefinitionId;
+ }
+
+ /**
+ * Set policy set definition ID, if the policy assignment is for a policy set.
+ *
+ * @param policySetDefinitionId the policySetDefinitionId value to set
+ * @return the PolicyAssignmentSummary object itself.
+ */
+ public PolicyAssignmentSummary withPolicySetDefinitionId(String policySetDefinitionId) {
+ this.policySetDefinitionId = policySetDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get compliance summary for the policy assignment.
+ *
+ * @return the results value
+ */
+ public SummaryResults results() {
+ return this.results;
+ }
+
+ /**
+ * Set compliance summary for the policy assignment.
+ *
+ * @param results the results value to set
+ * @return the PolicyAssignmentSummary object itself.
+ */
+ public PolicyAssignmentSummary withResults(SummaryResults results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Get policy definitions summary.
+ *
+ * @return the policyDefinitions value
+ */
+ public List policyDefinitions() {
+ return this.policyDefinitions;
+ }
+
+ /**
+ * Set policy definitions summary.
+ *
+ * @param policyDefinitions the policyDefinitions value to set
+ * @return the PolicyAssignmentSummary object itself.
+ */
+ public PolicyAssignmentSummary withPolicyDefinitions(List policyDefinitions) {
+ this.policyDefinitions = policyDefinitions;
+ return this;
+ }
+
+ /**
+ * Get policy definition group summary.
+ *
+ * @return the policyGroups value
+ */
+ public List policyGroups() {
+ return this.policyGroups;
+ }
+
+ /**
+ * Set policy definition group summary.
+ *
+ * @param policyGroups the policyGroups value to set
+ * @return the PolicyAssignmentSummary object itself.
+ */
+ public PolicyAssignmentSummary withPolicyGroups(List policyGroups) {
+ this.policyGroups = policyGroups;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyDefinitionSummary.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyDefinitionSummary.java
new file mode 100644
index 000000000000..2c83a3c84c5e
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyDefinitionSummary.java
@@ -0,0 +1,148 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Policy definition summary.
+ */
+public class PolicyDefinitionSummary {
+ /**
+ * Policy definition ID.
+ */
+ @JsonProperty(value = "policyDefinitionId")
+ private String policyDefinitionId;
+
+ /**
+ * Policy definition reference ID.
+ */
+ @JsonProperty(value = "policyDefinitionReferenceId")
+ private String policyDefinitionReferenceId;
+
+ /**
+ * Policy definition group names.
+ */
+ @JsonProperty(value = "policyDefinitionGroupNames")
+ private List policyDefinitionGroupNames;
+
+ /**
+ * Policy effect, i.e. policy definition action.
+ */
+ @JsonProperty(value = "effect")
+ private String effect;
+
+ /**
+ * Compliance summary for the policy definition.
+ */
+ @JsonProperty(value = "results")
+ private SummaryResults results;
+
+ /**
+ * Get policy definition ID.
+ *
+ * @return the policyDefinitionId value
+ */
+ public String policyDefinitionId() {
+ return this.policyDefinitionId;
+ }
+
+ /**
+ * Set policy definition ID.
+ *
+ * @param policyDefinitionId the policyDefinitionId value to set
+ * @return the PolicyDefinitionSummary object itself.
+ */
+ public PolicyDefinitionSummary withPolicyDefinitionId(String policyDefinitionId) {
+ this.policyDefinitionId = policyDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get policy definition reference ID.
+ *
+ * @return the policyDefinitionReferenceId value
+ */
+ public String policyDefinitionReferenceId() {
+ return this.policyDefinitionReferenceId;
+ }
+
+ /**
+ * Set policy definition reference ID.
+ *
+ * @param policyDefinitionReferenceId the policyDefinitionReferenceId value to set
+ * @return the PolicyDefinitionSummary object itself.
+ */
+ public PolicyDefinitionSummary withPolicyDefinitionReferenceId(String policyDefinitionReferenceId) {
+ this.policyDefinitionReferenceId = policyDefinitionReferenceId;
+ return this;
+ }
+
+ /**
+ * Get policy definition group names.
+ *
+ * @return the policyDefinitionGroupNames value
+ */
+ public List policyDefinitionGroupNames() {
+ return this.policyDefinitionGroupNames;
+ }
+
+ /**
+ * Set policy definition group names.
+ *
+ * @param policyDefinitionGroupNames the policyDefinitionGroupNames value to set
+ * @return the PolicyDefinitionSummary object itself.
+ */
+ public PolicyDefinitionSummary withPolicyDefinitionGroupNames(List policyDefinitionGroupNames) {
+ this.policyDefinitionGroupNames = policyDefinitionGroupNames;
+ return this;
+ }
+
+ /**
+ * Get policy effect, i.e. policy definition action.
+ *
+ * @return the effect value
+ */
+ public String effect() {
+ return this.effect;
+ }
+
+ /**
+ * Set policy effect, i.e. policy definition action.
+ *
+ * @param effect the effect value to set
+ * @return the PolicyDefinitionSummary object itself.
+ */
+ public PolicyDefinitionSummary withEffect(String effect) {
+ this.effect = effect;
+ return this;
+ }
+
+ /**
+ * Get compliance summary for the policy definition.
+ *
+ * @return the results value
+ */
+ public SummaryResults results() {
+ return this.results;
+ }
+
+ /**
+ * Set compliance summary for the policy definition.
+ *
+ * @param results the results value to set
+ * @return the PolicyDefinitionSummary object itself.
+ */
+ public PolicyDefinitionSummary withResults(SummaryResults results) {
+ this.results = results;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyDetails.java
new file mode 100644
index 000000000000..474288866386
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyDetails.java
@@ -0,0 +1,107 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The policy details.
+ */
+public class PolicyDetails {
+ /**
+ * The ID of the policy definition.
+ */
+ @JsonProperty(value = "policyDefinitionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyDefinitionId;
+
+ /**
+ * The ID of the policy assignment.
+ */
+ @JsonProperty(value = "policyAssignmentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyAssignmentId;
+
+ /**
+ * The display name of the policy assignment.
+ */
+ @JsonProperty(value = "policyAssignmentDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyAssignmentDisplayName;
+
+ /**
+ * The scope of the policy assignment.
+ */
+ @JsonProperty(value = "policyAssignmentScope", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyAssignmentScope;
+
+ /**
+ * The ID of the policy set definition.
+ */
+ @JsonProperty(value = "policySetDefinitionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policySetDefinitionId;
+
+ /**
+ * The policy definition reference ID within the policy set definition.
+ */
+ @JsonProperty(value = "policyDefinitionReferenceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyDefinitionReferenceId;
+
+ /**
+ * Get the ID of the policy definition.
+ *
+ * @return the policyDefinitionId value
+ */
+ public String policyDefinitionId() {
+ return this.policyDefinitionId;
+ }
+
+ /**
+ * Get the ID of the policy assignment.
+ *
+ * @return the policyAssignmentId value
+ */
+ public String policyAssignmentId() {
+ return this.policyAssignmentId;
+ }
+
+ /**
+ * Get the display name of the policy assignment.
+ *
+ * @return the policyAssignmentDisplayName value
+ */
+ public String policyAssignmentDisplayName() {
+ return this.policyAssignmentDisplayName;
+ }
+
+ /**
+ * Get the scope of the policy assignment.
+ *
+ * @return the policyAssignmentScope value
+ */
+ public String policyAssignmentScope() {
+ return this.policyAssignmentScope;
+ }
+
+ /**
+ * Get the ID of the policy set definition.
+ *
+ * @return the policySetDefinitionId value
+ */
+ public String policySetDefinitionId() {
+ return this.policySetDefinitionId;
+ }
+
+ /**
+ * Get the policy definition reference ID within the policy set definition.
+ *
+ * @return the policyDefinitionReferenceId value
+ */
+ public String policyDefinitionReferenceId() {
+ return this.policyDefinitionReferenceId;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvaluationDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvaluationDetails.java
new file mode 100644
index 000000000000..457061158b0c
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvaluationDetails.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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Policy evaluation details.
+ */
+public class PolicyEvaluationDetails {
+ /**
+ * Details of the evaluated expressions.
+ */
+ @JsonProperty(value = "evaluatedExpressions")
+ private List evaluatedExpressions;
+
+ /**
+ * Evaluation details of IfNotExists effect.
+ */
+ @JsonProperty(value = "ifNotExistsDetails")
+ private IfNotExistsEvaluationDetails ifNotExistsDetails;
+
+ /**
+ * Get details of the evaluated expressions.
+ *
+ * @return the evaluatedExpressions value
+ */
+ public List evaluatedExpressions() {
+ return this.evaluatedExpressions;
+ }
+
+ /**
+ * Set details of the evaluated expressions.
+ *
+ * @param evaluatedExpressions the evaluatedExpressions value to set
+ * @return the PolicyEvaluationDetails object itself.
+ */
+ public PolicyEvaluationDetails withEvaluatedExpressions(List evaluatedExpressions) {
+ this.evaluatedExpressions = evaluatedExpressions;
+ return this;
+ }
+
+ /**
+ * Get evaluation details of IfNotExists effect.
+ *
+ * @return the ifNotExistsDetails value
+ */
+ public IfNotExistsEvaluationDetails ifNotExistsDetails() {
+ return this.ifNotExistsDetails;
+ }
+
+ /**
+ * Set evaluation details of IfNotExists effect.
+ *
+ * @param ifNotExistsDetails the ifNotExistsDetails value to set
+ * @return the PolicyEvaluationDetails object itself.
+ */
+ public PolicyEvaluationDetails withIfNotExistsDetails(IfNotExistsEvaluationDetails ifNotExistsDetails) {
+ this.ifNotExistsDetails = ifNotExistsDetails;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvaluationResult.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvaluationResult.java
new file mode 100644
index 000000000000..76a4c1483d06
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvaluationResult.java
@@ -0,0 +1,66 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The result of a non-compliant policy evaluation against the given resource
+ * content.
+ */
+public class PolicyEvaluationResult {
+ /**
+ * The details of the policy that was evaluated.
+ */
+ @JsonProperty(value = "policyInfo", access = JsonProperty.Access.WRITE_ONLY)
+ private PolicyReference policyInfo;
+
+ /**
+ * The result of the policy evaluation against the resource. This will
+ * typically be 'NonCompliant' but may contain other values if errors were
+ * encountered.
+ */
+ @JsonProperty(value = "evaluationResult", access = JsonProperty.Access.WRITE_ONLY)
+ private String evaluationResult;
+
+ /**
+ * The detailed results of the policy expressions and values that were
+ * evaluated.
+ */
+ @JsonProperty(value = "evaluationDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private PolicyEvaluationDetails evaluationDetails;
+
+ /**
+ * Get the details of the policy that was evaluated.
+ *
+ * @return the policyInfo value
+ */
+ public PolicyReference policyInfo() {
+ return this.policyInfo;
+ }
+
+ /**
+ * Get the result of the policy evaluation against the resource. This will typically be 'NonCompliant' but may contain other values if errors were encountered.
+ *
+ * @return the evaluationResult value
+ */
+ public String evaluationResult() {
+ return this.evaluationResult;
+ }
+
+ /**
+ * Get the detailed results of the policy expressions and values that were evaluated.
+ *
+ * @return the evaluationDetails value
+ */
+ public PolicyEvaluationDetails evaluationDetails() {
+ return this.evaluationDetails;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvent.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvent.java
new file mode 100644
index 000000000000..45db816b1a36
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvent.java
@@ -0,0 +1,183 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyEventInner;
+import java.util.Map;
+import java.util.List;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing PolicyEvent.
+ */
+public interface PolicyEvent extends HasInner, HasManager {
+ /**
+ * @return the additionalProperties value.
+ */
+ Map additionalProperties();
+
+ /**
+ * @return the complianceState value.
+ */
+ String complianceState();
+
+ /**
+ * @return the components value.
+ */
+ List components();
+
+ /**
+ * @return the effectiveParameters value.
+ */
+ String effectiveParameters();
+
+ /**
+ * @return the isCompliant value.
+ */
+ Boolean isCompliant();
+
+ /**
+ * @return the managementGroupIds value.
+ */
+ String managementGroupIds();
+
+ /**
+ * @return the odatacontext value.
+ */
+ String odatacontext();
+
+ /**
+ * @return the odataid value.
+ */
+ String odataid();
+
+ /**
+ * @return the policyAssignmentId value.
+ */
+ String policyAssignmentId();
+
+ /**
+ * @return the policyAssignmentName value.
+ */
+ String policyAssignmentName();
+
+ /**
+ * @return the policyAssignmentOwner value.
+ */
+ String policyAssignmentOwner();
+
+ /**
+ * @return the policyAssignmentParameters value.
+ */
+ String policyAssignmentParameters();
+
+ /**
+ * @return the policyAssignmentScope value.
+ */
+ String policyAssignmentScope();
+
+ /**
+ * @return the policyDefinitionAction value.
+ */
+ String policyDefinitionAction();
+
+ /**
+ * @return the policyDefinitionCategory value.
+ */
+ String policyDefinitionCategory();
+
+ /**
+ * @return the policyDefinitionId value.
+ */
+ String policyDefinitionId();
+
+ /**
+ * @return the policyDefinitionName value.
+ */
+ String policyDefinitionName();
+
+ /**
+ * @return the policyDefinitionReferenceId value.
+ */
+ String policyDefinitionReferenceId();
+
+ /**
+ * @return the policySetDefinitionCategory value.
+ */
+ String policySetDefinitionCategory();
+
+ /**
+ * @return the policySetDefinitionId value.
+ */
+ String policySetDefinitionId();
+
+ /**
+ * @return the policySetDefinitionName value.
+ */
+ String policySetDefinitionName();
+
+ /**
+ * @return the policySetDefinitionOwner value.
+ */
+ String policySetDefinitionOwner();
+
+ /**
+ * @return the policySetDefinitionParameters value.
+ */
+ String policySetDefinitionParameters();
+
+ /**
+ * @return the principalOid value.
+ */
+ String principalOid();
+
+ /**
+ * @return the resourceGroup value.
+ */
+ String resourceGroup();
+
+ /**
+ * @return the resourceId value.
+ */
+ String resourceId();
+
+ /**
+ * @return the resourceLocation value.
+ */
+ String resourceLocation();
+
+ /**
+ * @return the resourceTags value.
+ */
+ String resourceTags();
+
+ /**
+ * @return the resourceType value.
+ */
+ String resourceType();
+
+ /**
+ * @return the subscriptionId value.
+ */
+ String subscriptionId();
+
+ /**
+ * @return the tenantId value.
+ */
+ String tenantId();
+
+ /**
+ * @return the timestamp value.
+ */
+ DateTime timestamp();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvents.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvents.java
new file mode 100644
index 000000000000..16fd274d0617
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyEvents.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.policyinsights.v2020_07_01;
+
+import rx.Observable;
+
+/**
+ * Type representing PolicyEvents.
+ */
+public interface PolicyEvents {
+ /**
+ * Queries policy events for the resources under the management group.
+ *
+ * @param managementGroupName Management group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForManagementGroupAsync(final String managementGroupName);
+
+ /**
+ * Queries policy events for the resources under the subscription.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForSubscriptionAsync(final String subscriptionId);
+
+ /**
+ * Queries policy events for the resources under the resource group.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceGroupAsync(final String subscriptionId, final String resourceGroupName);
+
+ /**
+ * Queries policy events for the resource.
+ *
+ * @param resourceId Resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceAsync(final String resourceId);
+
+ /**
+ * Queries policy events for the subscription level policy set definition.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policySetDefinitionName Policy set definition name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForPolicySetDefinitionAsync(final String subscriptionId, final String policySetDefinitionName);
+
+ /**
+ * Queries policy events for the subscription level policy definition.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policyDefinitionName Policy definition name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForPolicyDefinitionAsync(final String subscriptionId, final String policyDefinitionName);
+
+ /**
+ * Queries policy events for the subscription level policy assignment.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policyAssignmentName Policy assignment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForSubscriptionLevelPolicyAssignmentAsync(final String subscriptionId, final String policyAssignmentName);
+
+ /**
+ * Queries policy events for the resource group level policy assignment.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param policyAssignmentName Policy assignment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceGroupLevelPolicyAssignmentAsync(final String subscriptionId, final String resourceGroupName, final String policyAssignmentName);
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyGroupSummary.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyGroupSummary.java
new file mode 100644
index 000000000000..e13d7e64a99a
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyGroupSummary.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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Policy definition group summary.
+ */
+public class PolicyGroupSummary {
+ /**
+ * Policy group name.
+ */
+ @JsonProperty(value = "policyGroupName")
+ private String policyGroupName;
+
+ /**
+ * Compliance summary for the policy definition group.
+ */
+ @JsonProperty(value = "results")
+ private SummaryResults results;
+
+ /**
+ * Get policy group name.
+ *
+ * @return the policyGroupName value
+ */
+ public String policyGroupName() {
+ return this.policyGroupName;
+ }
+
+ /**
+ * Set policy group name.
+ *
+ * @param policyGroupName the policyGroupName value to set
+ * @return the PolicyGroupSummary object itself.
+ */
+ public PolicyGroupSummary withPolicyGroupName(String policyGroupName) {
+ this.policyGroupName = policyGroupName;
+ return this;
+ }
+
+ /**
+ * Get compliance summary for the policy definition group.
+ *
+ * @return the results value
+ */
+ public SummaryResults results() {
+ return this.results;
+ }
+
+ /**
+ * Set compliance summary for the policy definition group.
+ *
+ * @param results the results value to set
+ * @return the PolicyGroupSummary object itself.
+ */
+ public PolicyGroupSummary withResults(SummaryResults results) {
+ this.results = results;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyMetadata.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyMetadata.java
new file mode 100644
index 000000000000..a0709b2b98ce
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyMetadata.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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyMetadataInner;
+
+/**
+ * Type representing PolicyMetadata.
+ */
+public interface PolicyMetadata extends HasInner, HasManager {
+ /**
+ * @return the additionalContentUrl value.
+ */
+ String additionalContentUrl();
+
+ /**
+ * @return the category value.
+ */
+ String category();
+
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the metadata value.
+ */
+ Object metadata();
+
+ /**
+ * @return the metadataId value.
+ */
+ String metadataId();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the owner value.
+ */
+ String owner();
+
+ /**
+ * @return the requirements value.
+ */
+ String requirements();
+
+ /**
+ * @return the title value.
+ */
+ String title();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyMetadatas.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyMetadatas.java
new file mode 100644
index 000000000000..5fa565547e58
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyMetadatas.java
@@ -0,0 +1,36 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyMetadatasInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PolicyMetadatas.
+ */
+public interface PolicyMetadatas extends HasInner {
+ /**
+ * Get policy metadata resource.
+ *
+ * @param resourceName The name of the policy metadata resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getResourceAsync(String resourceName);
+
+ /**
+ * Get a list of the policy metadata resources.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyReference.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyReference.java
new file mode 100644
index 000000000000..84c59d8ac8c4
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyReference.java
@@ -0,0 +1,78 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Resource identifiers for a policy.
+ */
+public class PolicyReference {
+ /**
+ * The resource identifier of the policy definition.
+ */
+ @JsonProperty(value = "policyDefinitionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyDefinitionId;
+
+ /**
+ * The resource identifier of the policy set definition.
+ */
+ @JsonProperty(value = "policySetDefinitionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policySetDefinitionId;
+
+ /**
+ * The reference identifier of a specific policy definition within a policy
+ * set definition.
+ */
+ @JsonProperty(value = "policyDefinitionReferenceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyDefinitionReferenceId;
+
+ /**
+ * The resource identifier of the policy assignment.
+ */
+ @JsonProperty(value = "policyAssignmentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String policyAssignmentId;
+
+ /**
+ * Get the resource identifier of the policy definition.
+ *
+ * @return the policyDefinitionId value
+ */
+ public String policyDefinitionId() {
+ return this.policyDefinitionId;
+ }
+
+ /**
+ * Get the resource identifier of the policy set definition.
+ *
+ * @return the policySetDefinitionId value
+ */
+ public String policySetDefinitionId() {
+ return this.policySetDefinitionId;
+ }
+
+ /**
+ * Get the reference identifier of a specific policy definition within a policy set definition.
+ *
+ * @return the policyDefinitionReferenceId value
+ */
+ public String policyDefinitionReferenceId() {
+ return this.policyDefinitionReferenceId;
+ }
+
+ /**
+ * Get the resource identifier of the policy assignment.
+ *
+ * @return the policyAssignmentId value
+ */
+ public String policyAssignmentId() {
+ return this.policyAssignmentId;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyRestrictions.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyRestrictions.java
new file mode 100644
index 000000000000..999cba8c808e
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyRestrictions.java
@@ -0,0 +1,40 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyRestrictionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PolicyRestrictions.
+ */
+public interface PolicyRestrictions extends HasInner {
+ /**
+ * Checks what restrictions Azure Policy will place on a resource within a subscription.
+ *
+ * @param subscriptionId The ID of the target subscription.
+ * @param parameters The check policy restrictions parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkAtSubscriptionScopeAsync(String subscriptionId, CheckRestrictionsRequest parameters);
+
+ /**
+ * Checks what restrictions Azure Policy will place on a resource within a resource group. Use this when the resource group the resource will be created in is already known.
+ *
+ * @param subscriptionId The ID of the target subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The check policy restrictions parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkAtResourceGroupScopeAsync(String subscriptionId, String resourceGroupName, CheckRestrictionsRequest parameters);
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyState.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyState.java
new file mode 100644
index 000000000000..bb6c56519c37
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyState.java
@@ -0,0 +1,198 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyStateInner;
+import java.util.Map;
+import java.util.List;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing PolicyState.
+ */
+public interface PolicyState extends HasInner, HasManager {
+ /**
+ * @return the additionalProperties value.
+ */
+ Map additionalProperties();
+
+ /**
+ * @return the complianceState value.
+ */
+ String complianceState();
+
+ /**
+ * @return the components value.
+ */
+ List components();
+
+ /**
+ * @return the effectiveParameters value.
+ */
+ String effectiveParameters();
+
+ /**
+ * @return the isCompliant value.
+ */
+ Boolean isCompliant();
+
+ /**
+ * @return the managementGroupIds value.
+ */
+ String managementGroupIds();
+
+ /**
+ * @return the odatacontext value.
+ */
+ String odatacontext();
+
+ /**
+ * @return the odataid value.
+ */
+ String odataid();
+
+ /**
+ * @return the policyAssignmentId value.
+ */
+ String policyAssignmentId();
+
+ /**
+ * @return the policyAssignmentName value.
+ */
+ String policyAssignmentName();
+
+ /**
+ * @return the policyAssignmentOwner value.
+ */
+ String policyAssignmentOwner();
+
+ /**
+ * @return the policyAssignmentParameters value.
+ */
+ String policyAssignmentParameters();
+
+ /**
+ * @return the policyAssignmentScope value.
+ */
+ String policyAssignmentScope();
+
+ /**
+ * @return the policyAssignmentVersion value.
+ */
+ String policyAssignmentVersion();
+
+ /**
+ * @return the policyDefinitionAction value.
+ */
+ String policyDefinitionAction();
+
+ /**
+ * @return the policyDefinitionCategory value.
+ */
+ String policyDefinitionCategory();
+
+ /**
+ * @return the policyDefinitionGroupNames value.
+ */
+ List policyDefinitionGroupNames();
+
+ /**
+ * @return the policyDefinitionId value.
+ */
+ String policyDefinitionId();
+
+ /**
+ * @return the policyDefinitionName value.
+ */
+ String policyDefinitionName();
+
+ /**
+ * @return the policyDefinitionReferenceId value.
+ */
+ String policyDefinitionReferenceId();
+
+ /**
+ * @return the policyDefinitionVersion value.
+ */
+ String policyDefinitionVersion();
+
+ /**
+ * @return the policyEvaluationDetails value.
+ */
+ PolicyEvaluationDetails policyEvaluationDetails();
+
+ /**
+ * @return the policySetDefinitionCategory value.
+ */
+ String policySetDefinitionCategory();
+
+ /**
+ * @return the policySetDefinitionId value.
+ */
+ String policySetDefinitionId();
+
+ /**
+ * @return the policySetDefinitionName value.
+ */
+ String policySetDefinitionName();
+
+ /**
+ * @return the policySetDefinitionOwner value.
+ */
+ String policySetDefinitionOwner();
+
+ /**
+ * @return the policySetDefinitionParameters value.
+ */
+ String policySetDefinitionParameters();
+
+ /**
+ * @return the policySetDefinitionVersion value.
+ */
+ String policySetDefinitionVersion();
+
+ /**
+ * @return the resourceGroup value.
+ */
+ String resourceGroup();
+
+ /**
+ * @return the resourceId value.
+ */
+ String resourceId();
+
+ /**
+ * @return the resourceLocation value.
+ */
+ String resourceLocation();
+
+ /**
+ * @return the resourceTags value.
+ */
+ String resourceTags();
+
+ /**
+ * @return the resourceType value.
+ */
+ String resourceType();
+
+ /**
+ * @return the subscriptionId value.
+ */
+ String subscriptionId();
+
+ /**
+ * @return the timestamp value.
+ */
+ DateTime timestamp();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyStates.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyStates.java
new file mode 100644
index 000000000000..4f525e39c86c
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyStates.java
@@ -0,0 +1,201 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import rx.Completable;
+import rx.Observable;
+
+/**
+ * Type representing PolicyStates.
+ */
+public interface PolicyStates {
+ /**
+ * Queries policy states for the resources under the management group.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param managementGroupName Management group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForManagementGroupAsync(final PolicyStatesResource policyStatesResource, final String managementGroupName);
+
+ /**
+ * Summarizes policy states for the resources under the management group.
+ *
+ * @param managementGroupName Management group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForManagementGroupAsync(String managementGroupName);
+
+ /**
+ * Queries policy states for the resources under the subscription.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForSubscriptionAsync(final PolicyStatesResource policyStatesResource, final String subscriptionId);
+
+ /**
+ * Summarizes policy states for the resources under the subscription.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForSubscriptionAsync(String subscriptionId);
+
+ /**
+ * Queries policy states for the resources under the resource group.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceGroupAsync(final PolicyStatesResource policyStatesResource, final String subscriptionId, final String resourceGroupName);
+
+ /**
+ * Summarizes policy states for the resources under the resource group.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForResourceGroupAsync(String subscriptionId, String resourceGroupName);
+
+ /**
+ * Queries policy states for the resource.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param resourceId Resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceAsync(final PolicyStatesResource policyStatesResource, final String resourceId);
+
+ /**
+ * Summarizes policy states for the resource.
+ *
+ * @param resourceId Resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForResourceAsync(String resourceId);
+
+ /**
+ * Triggers a policy evaluation scan for all the resources under the subscription.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable triggerSubscriptionEvaluationAsync(String subscriptionId);
+
+ /**
+ * Triggers a policy evaluation scan for all the resources under the resource group.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable triggerResourceGroupEvaluationAsync(String subscriptionId, String resourceGroupName);
+
+ /**
+ * Queries policy states for the subscription level policy set definition.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policySetDefinitionName Policy set definition name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForPolicySetDefinitionAsync(final PolicyStatesResource policyStatesResource, final String subscriptionId, final String policySetDefinitionName);
+
+ /**
+ * Summarizes policy states for the subscription level policy set definition.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policySetDefinitionName Policy set definition name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForPolicySetDefinitionAsync(String subscriptionId, String policySetDefinitionName);
+
+ /**
+ * Queries policy states for the subscription level policy definition.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policyDefinitionName Policy definition name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForPolicyDefinitionAsync(final PolicyStatesResource policyStatesResource, final String subscriptionId, final String policyDefinitionName);
+
+ /**
+ * Summarizes policy states for the subscription level policy definition.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policyDefinitionName Policy definition name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForPolicyDefinitionAsync(String subscriptionId, String policyDefinitionName);
+
+ /**
+ * Queries policy states for the subscription level policy assignment.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policyAssignmentName Policy assignment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForSubscriptionLevelPolicyAssignmentAsync(final PolicyStatesResource policyStatesResource, final String subscriptionId, final String policyAssignmentName);
+
+ /**
+ * Summarizes policy states for the subscription level policy assignment.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param policyAssignmentName Policy assignment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForSubscriptionLevelPolicyAssignmentAsync(String subscriptionId, String policyAssignmentName);
+
+ /**
+ * Queries policy states for the resource group level policy assignment.
+ *
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param policyAssignmentName Policy assignment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceGroupLevelPolicyAssignmentAsync(final PolicyStatesResource policyStatesResource, final String subscriptionId, final String resourceGroupName, final String policyAssignmentName);
+
+ /**
+ * Summarizes policy states for the resource group level policy assignment.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param policyAssignmentName Policy assignment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable summarizeForResourceGroupLevelPolicyAssignmentAsync(String subscriptionId, String resourceGroupName, String policyAssignmentName);
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyStatesResource.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyStatesResource.java
new file mode 100644
index 000000000000..6861ae7b4b1b
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyStatesResource.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PolicyStatesResource.
+ */
+public final class PolicyStatesResource extends ExpandableStringEnum {
+ /** Static value default for PolicyStatesResource. */
+ public static final PolicyStatesResource DEFAULT = fromString("default");
+
+ /** Static value latest for PolicyStatesResource. */
+ public static final PolicyStatesResource LATEST = fromString("latest");
+
+ /**
+ * Creates or finds a PolicyStatesResource from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PolicyStatesResource
+ */
+ @JsonCreator
+ public static PolicyStatesResource fromString(String name) {
+ return fromString(name, PolicyStatesResource.class);
+ }
+
+ /**
+ * @return known PolicyStatesResource values
+ */
+ public static Collection values() {
+ return values(PolicyStatesResource.class);
+ }
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyTrackedResource.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyTrackedResource.java
new file mode 100644
index 000000000000..ff3ddef5cec2
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyTrackedResource.java
@@ -0,0 +1,46 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyTrackedResourceInner;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing PolicyTrackedResource.
+ */
+public interface PolicyTrackedResource extends HasInner, HasManager {
+ /**
+ * @return the createdBy value.
+ */
+ TrackedResourceModificationDetails createdBy();
+
+ /**
+ * @return the lastModifiedBy value.
+ */
+ TrackedResourceModificationDetails lastModifiedBy();
+
+ /**
+ * @return the lastUpdateUtc value.
+ */
+ DateTime lastUpdateUtc();
+
+ /**
+ * @return the policyDetails value.
+ */
+ PolicyDetails policyDetails();
+
+ /**
+ * @return the trackedResourceId value.
+ */
+ String trackedResourceId();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyTrackedResources.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyTrackedResources.java
new file mode 100644
index 000000000000..fa8f1701ad5b
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/PolicyTrackedResources.java
@@ -0,0 +1,54 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import rx.Observable;
+
+/**
+ * Type representing PolicyTrackedResources.
+ */
+public interface PolicyTrackedResources {
+ /**
+ * Queries policy tracked resources under the management group.
+ *
+ * @param managementGroupName Management group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForManagementGroupAsync(final String managementGroupName);
+
+ /**
+ * Queries policy tracked resources under the subscription.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForSubscriptionAsync(final String subscriptionId);
+
+ /**
+ * Queries policy tracked resources under the resource group.
+ *
+ * @param resourceGroupName Resource group name.
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceGroupAsync(final String resourceGroupName, final String subscriptionId);
+
+ /**
+ * Queries policy tracked resources under the resource.
+ *
+ * @param resourceId Resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listQueryResultsForResourceAsync(final String resourceId);
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailure.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailure.java
new file mode 100644
index 000000000000..376e1505a2e0
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailure.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response.
+ */
+public class QueryFailure {
+ /**
+ * Error definition.
+ */
+ @JsonProperty(value = "error")
+ private QueryFailureError error;
+
+ /**
+ * Get error definition.
+ *
+ * @return the error value
+ */
+ public QueryFailureError error() {
+ return this.error;
+ }
+
+ /**
+ * Set error definition.
+ *
+ * @param error the error value to set
+ * @return the QueryFailure object itself.
+ */
+ public QueryFailure withError(QueryFailureError error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailureError.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailureError.java
new file mode 100644
index 000000000000..00d26e6beaea
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailureError.java
@@ -0,0 +1,48 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error definition.
+ */
+public class QueryFailureError {
+ /**
+ * Service specific error code which serves as the substatus for the HTTP
+ * error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * Description of the error.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * Get service specific error code which serves as the substatus for the HTTP error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get description of the error.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailureException.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailureException.java
new file mode 100644
index 000000000000..23c06053c0c6
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryFailureException.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.policyinsights.v2020_07_01;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with QueryFailure information.
+ */
+public class QueryFailureException extends RestException {
+ /**
+ * Initializes a new instance of the QueryFailureException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public QueryFailureException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the QueryFailureException 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 QueryFailureException(final String message, final Response response, final QueryFailure body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public QueryFailure body() {
+ return (QueryFailure) super.body();
+ }
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryOptions.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryOptions.java
new file mode 100644
index 000000000000..cfd68216357b
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/QueryOptions.java
@@ -0,0 +1,260 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Additional parameters for a set of operations.
+ */
+public class QueryOptions {
+ /**
+ * Maximum number of records to return.
+ */
+ @JsonProperty(value = "")
+ private Integer top;
+
+ /**
+ * OData filter expression.
+ */
+ @JsonProperty(value = "")
+ private String filter;
+
+ /**
+ * Ordering expression using OData notation. One or more comma-separated
+ * column names with an optional "desc" (the default) or "asc", e.g.
+ * "$orderby=PolicyAssignmentId, ResourceId asc".
+ */
+ @JsonProperty(value = "")
+ private String orderBy;
+
+ /**
+ * Select expression using OData notation. Limits the columns on each
+ * record to just those requested, e.g. "$select=PolicyAssignmentId,
+ * ResourceId".
+ */
+ @JsonProperty(value = "")
+ private String select;
+
+ /**
+ * ISO 8601 formatted timestamp specifying the start time of the interval
+ * to query. When not specified, the service uses ($to - 1-day).
+ */
+ @JsonProperty(value = "")
+ private DateTime from;
+
+ /**
+ * ISO 8601 formatted timestamp specifying the end time of the interval to
+ * query. When not specified, the service uses request time.
+ */
+ @JsonProperty(value = "")
+ private DateTime to;
+
+ /**
+ * OData apply expression for aggregations.
+ */
+ @JsonProperty(value = "")
+ private String apply;
+
+ /**
+ * Skiptoken is only provided if a previous response returned a partial
+ * result as a part of nextLink element.
+ */
+ @JsonProperty(value = "")
+ private String skipToken;
+
+ /**
+ * The $expand query parameter. For example, to expand components use
+ * $expand=components.
+ */
+ @JsonProperty(value = "")
+ private String expand;
+
+ /**
+ * Get maximum number of records to return.
+ *
+ * @return the top value
+ */
+ public Integer top() {
+ return this.top;
+ }
+
+ /**
+ * Set maximum number of records to return.
+ *
+ * @param top the top value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withTop(Integer top) {
+ this.top = top;
+ return this;
+ }
+
+ /**
+ * Get oData filter expression.
+ *
+ * @return the filter value
+ */
+ public String filter() {
+ return this.filter;
+ }
+
+ /**
+ * Set oData filter expression.
+ *
+ * @param filter the filter value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withFilter(String filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * Get ordering expression using OData notation. One or more comma-separated column names with an optional "desc" (the default) or "asc", e.g. "$orderby=PolicyAssignmentId, ResourceId asc".
+ *
+ * @return the orderBy value
+ */
+ public String orderBy() {
+ return this.orderBy;
+ }
+
+ /**
+ * Set ordering expression using OData notation. One or more comma-separated column names with an optional "desc" (the default) or "asc", e.g. "$orderby=PolicyAssignmentId, ResourceId asc".
+ *
+ * @param orderBy the orderBy value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withOrderBy(String orderBy) {
+ this.orderBy = orderBy;
+ return this;
+ }
+
+ /**
+ * Get select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId".
+ *
+ * @return the select value
+ */
+ public String select() {
+ return this.select;
+ }
+
+ /**
+ * Set select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId".
+ *
+ * @param select the select value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withSelect(String select) {
+ this.select = select;
+ return this;
+ }
+
+ /**
+ * Get iSO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).
+ *
+ * @return the from value
+ */
+ public DateTime from() {
+ return this.from;
+ }
+
+ /**
+ * Set iSO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).
+ *
+ * @param from the from value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withFrom(DateTime from) {
+ this.from = from;
+ return this;
+ }
+
+ /**
+ * Get iSO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.
+ *
+ * @return the to value
+ */
+ public DateTime to() {
+ return this.to;
+ }
+
+ /**
+ * Set iSO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.
+ *
+ * @param to the to value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withTo(DateTime to) {
+ this.to = to;
+ return this;
+ }
+
+ /**
+ * Get oData apply expression for aggregations.
+ *
+ * @return the apply value
+ */
+ public String apply() {
+ return this.apply;
+ }
+
+ /**
+ * Set oData apply expression for aggregations.
+ *
+ * @param apply the apply value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withApply(String apply) {
+ this.apply = apply;
+ return this;
+ }
+
+ /**
+ * Get skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.
+ *
+ * @return the skipToken value
+ */
+ public String skipToken() {
+ return this.skipToken;
+ }
+
+ /**
+ * Set skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.
+ *
+ * @param skipToken the skipToken value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withSkipToken(String skipToken) {
+ this.skipToken = skipToken;
+ return this;
+ }
+
+ /**
+ * Get the $expand query parameter. For example, to expand components use $expand=components.
+ *
+ * @return the expand value
+ */
+ public String expand() {
+ return this.expand;
+ }
+
+ /**
+ * Set the $expand query parameter. For example, to expand components use $expand=components.
+ *
+ * @param expand the expand value to set
+ * @return the QueryOptions object itself.
+ */
+ public QueryOptions withExpand(String expand) {
+ this.expand = expand;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Remediation.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Remediation.java
new file mode 100644
index 000000000000..2187c9fc574d
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Remediation.java
@@ -0,0 +1,223 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.RemediationInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing Remediation.
+ */
+public interface Remediation extends HasInner, Indexable, Updatable, HasManager {
+ /**
+ * @return the createdOn value.
+ */
+ DateTime createdOn();
+
+ /**
+ * @return the deploymentStatus value.
+ */
+ RemediationDeploymentSummary deploymentStatus();
+
+ /**
+ * @return the filters value.
+ */
+ RemediationFilters filters();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lastUpdatedOn value.
+ */
+ DateTime lastUpdatedOn();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the policyAssignmentId value.
+ */
+ String policyAssignmentId();
+
+ /**
+ * @return the policyDefinitionReferenceId value.
+ */
+ String policyDefinitionReferenceId();
+
+ /**
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * @return the resourceDiscoveryMode value.
+ */
+ ResourceDiscoveryMode resourceDiscoveryMode();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the Remediation definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithMicrosoft.PolicyInsight, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of Remediation definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a Remediation definition.
+ */
+ interface Blank extends WithMicrosoft.PolicyInsight {
+ }
+
+ /**
+ * The stage of the remediation definition allowing to specify Microsoft.PolicyInsight.
+ */
+ interface WithMicrosoft.PolicyInsight {
+ /**
+ * Specifies managementGroupId.
+ * @param managementGroupId Management group ID
+ * @return the next definition stage
+ */
+ WithCreate withExistingMicrosoft.PolicyInsight(String managementGroupId);
+ }
+
+ /**
+ * The stage of the remediation definition allowing to specify Filters.
+ */
+ interface WithFilters {
+ /**
+ * Specifies filters.
+ * @param filters The filters that will be applied to determine which resources to remediate
+ * @return the next definition stage
+ */
+ WithCreate withFilters(RemediationFilters filters);
+ }
+
+ /**
+ * The stage of the remediation definition allowing to specify PolicyAssignmentId.
+ */
+ interface WithPolicyAssignmentId {
+ /**
+ * Specifies policyAssignmentId.
+ * @param policyAssignmentId The resource ID of the policy assignment that should be remediated
+ * @return the next definition stage
+ */
+ WithCreate withPolicyAssignmentId(String policyAssignmentId);
+ }
+
+ /**
+ * The stage of the remediation definition allowing to specify PolicyDefinitionReferenceId.
+ */
+ interface WithPolicyDefinitionReferenceId {
+ /**
+ * Specifies policyDefinitionReferenceId.
+ * @param policyDefinitionReferenceId The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition
+ * @return the next definition stage
+ */
+ WithCreate withPolicyDefinitionReferenceId(String policyDefinitionReferenceId);
+ }
+
+ /**
+ * The stage of the remediation definition allowing to specify ResourceDiscoveryMode.
+ */
+ interface WithResourceDiscoveryMode {
+ /**
+ * Specifies resourceDiscoveryMode.
+ * @param resourceDiscoveryMode The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified. Possible values include: 'ExistingNonCompliant', 'ReEvaluateCompliance'
+ * @return the next definition stage
+ */
+ WithCreate withResourceDiscoveryMode(ResourceDiscoveryMode resourceDiscoveryMode);
+ }
+
+ /**
+ * 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.WithFilters, DefinitionStages.WithPolicyAssignmentId, DefinitionStages.WithPolicyDefinitionReferenceId, DefinitionStages.WithResourceDiscoveryMode {
+ }
+ }
+ /**
+ * The template for a Remediation update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithFilters, UpdateStages.WithPolicyAssignmentId, UpdateStages.WithPolicyDefinitionReferenceId, UpdateStages.WithResourceDiscoveryMode {
+ }
+
+ /**
+ * Grouping of Remediation update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the remediation update allowing to specify Filters.
+ */
+ interface WithFilters {
+ /**
+ * Specifies filters.
+ * @param filters The filters that will be applied to determine which resources to remediate
+ * @return the next update stage
+ */
+ Update withFilters(RemediationFilters filters);
+ }
+
+ /**
+ * The stage of the remediation update allowing to specify PolicyAssignmentId.
+ */
+ interface WithPolicyAssignmentId {
+ /**
+ * Specifies policyAssignmentId.
+ * @param policyAssignmentId The resource ID of the policy assignment that should be remediated
+ * @return the next update stage
+ */
+ Update withPolicyAssignmentId(String policyAssignmentId);
+ }
+
+ /**
+ * The stage of the remediation update allowing to specify PolicyDefinitionReferenceId.
+ */
+ interface WithPolicyDefinitionReferenceId {
+ /**
+ * Specifies policyDefinitionReferenceId.
+ * @param policyDefinitionReferenceId The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition
+ * @return the next update stage
+ */
+ Update withPolicyDefinitionReferenceId(String policyDefinitionReferenceId);
+ }
+
+ /**
+ * The stage of the remediation update allowing to specify ResourceDiscoveryMode.
+ */
+ interface WithResourceDiscoveryMode {
+ /**
+ * Specifies resourceDiscoveryMode.
+ * @param resourceDiscoveryMode The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified. Possible values include: 'ExistingNonCompliant', 'ReEvaluateCompliance'
+ * @return the next update stage
+ */
+ Update withResourceDiscoveryMode(ResourceDiscoveryMode resourceDiscoveryMode);
+ }
+
+ }
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationDeployment.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationDeployment.java
new file mode 100644
index 000000000000..6ec19ce15b6a
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationDeployment.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.RemediationDeploymentInner;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing RemediationDeployment.
+ */
+public interface RemediationDeployment extends HasInner, HasManager {
+ /**
+ * @return the createdOn value.
+ */
+ DateTime createdOn();
+
+ /**
+ * @return the deploymentId value.
+ */
+ String deploymentId();
+
+ /**
+ * @return the error value.
+ */
+ ErrorDefinition error();
+
+ /**
+ * @return the lastUpdatedOn value.
+ */
+ DateTime lastUpdatedOn();
+
+ /**
+ * @return the remediatedResourceId value.
+ */
+ String remediatedResourceId();
+
+ /**
+ * @return the resourceLocation value.
+ */
+ String resourceLocation();
+
+ /**
+ * @return the status value.
+ */
+ String status();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationDeploymentSummary.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationDeploymentSummary.java
new file mode 100644
index 000000000000..b6f90db518d2
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationDeploymentSummary.java
@@ -0,0 +1,64 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The deployment status summary for all deployments created by the
+ * remediation.
+ */
+public class RemediationDeploymentSummary {
+ /**
+ * The number of deployments required by the remediation.
+ */
+ @JsonProperty(value = "totalDeployments", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer totalDeployments;
+
+ /**
+ * The number of deployments required by the remediation that have
+ * succeeded.
+ */
+ @JsonProperty(value = "successfulDeployments", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer successfulDeployments;
+
+ /**
+ * The number of deployments required by the remediation that have failed.
+ */
+ @JsonProperty(value = "failedDeployments", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer failedDeployments;
+
+ /**
+ * Get the number of deployments required by the remediation.
+ *
+ * @return the totalDeployments value
+ */
+ public Integer totalDeployments() {
+ return this.totalDeployments;
+ }
+
+ /**
+ * Get the number of deployments required by the remediation that have succeeded.
+ *
+ * @return the successfulDeployments value
+ */
+ public Integer successfulDeployments() {
+ return this.successfulDeployments;
+ }
+
+ /**
+ * Get the number of deployments required by the remediation that have failed.
+ *
+ * @return the failedDeployments value
+ */
+ public Integer failedDeployments() {
+ return this.failedDeployments;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationFilters.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationFilters.java
new file mode 100644
index 000000000000..0bf6d81b4433
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/RemediationFilters.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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The filters that will be applied to determine which resources to remediate.
+ */
+public class RemediationFilters {
+ /**
+ * The resource locations that will be remediated.
+ */
+ @JsonProperty(value = "locations")
+ private List locations;
+
+ /**
+ * Get the resource locations that will be remediated.
+ *
+ * @return the locations value
+ */
+ public List locations() {
+ return this.locations;
+ }
+
+ /**
+ * Set the resource locations that will be remediated.
+ *
+ * @param locations the locations value to set
+ * @return the RemediationFilters object itself.
+ */
+ public RemediationFilters withLocations(List locations) {
+ this.locations = locations;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Remediations.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Remediations.java
new file mode 100644
index 000000000000..aa07e3e15c1d
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Remediations.java
@@ -0,0 +1,257 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.RemediationInner;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.RemediationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Remediations.
+ */
+public interface Remediations extends SupportsCreating, HasInner {
+ /**
+ * Gets all deployments for a remediation at management group scope.
+ *
+ * @param managementGroupId Management group ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listDeploymentsAtManagementGroupAsync(final String managementGroupId, final String remediationName);
+
+ /**
+ * Cancels a remediation at management group scope.
+ *
+ * @param managementGroupId Management group ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable cancelAtManagementGroupAsync(String managementGroupId, String remediationName);
+
+ /**
+ * Gets all remediations for the management group.
+ *
+ * @param managementGroupId Management group ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listForManagementGroupAsync(final String managementGroupId);
+
+ /**
+ * Gets an existing remediation at management group scope.
+ *
+ * @param managementGroupId Management group ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAtManagementGroupAsync(String managementGroupId, String remediationName);
+
+ /**
+ * Deletes an existing remediation at management group scope.
+ *
+ * @param managementGroupId Management group ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable deleteAtManagementGroupAsync(String managementGroupId, String remediationName);
+
+ /**
+ * Gets all deployments for a remediation at subscription scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listDeploymentsAtSubscriptionAsync(final String subscriptionId, final String remediationName);
+
+ /**
+ * Cancels a remediation at subscription scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable cancelAtSubscriptionAsync(String subscriptionId, String remediationName);
+
+ /**
+ * Creates or updates a remediation at subscription scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param remediationName The name of the remediation.
+ * @param parameters The remediation parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createOrUpdateAtSubscriptionAsync(String subscriptionId, String remediationName, RemediationInner parameters);
+
+ /**
+ * Gets an existing remediation at subscription scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAtSubscriptionAsync(String subscriptionId, String remediationName);
+
+ /**
+ * Deletes an existing remediation at subscription scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable deleteAtSubscriptionAsync(String subscriptionId, String remediationName);
+
+ /**
+ * Gets all deployments for a remediation at resource group scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listDeploymentsAtResourceGroupAsync(final String subscriptionId, final String resourceGroupName, final String remediationName);
+
+ /**
+ * Cancels a remediation at resource group scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable cancelAtResourceGroupAsync(String subscriptionId, String resourceGroupName, String remediationName);
+
+ /**
+ * Creates or updates a remediation at resource group scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param remediationName The name of the remediation.
+ * @param parameters The remediation parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createOrUpdateAtResourceGroupAsync(String subscriptionId, String resourceGroupName, String remediationName, RemediationInner parameters);
+
+ /**
+ * Gets an existing remediation at resource group scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceGroupAsync(String subscriptionId, String resourceGroupName, String remediationName);
+
+ /**
+ * Deletes an existing remediation at resource group scope.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable deleteAtResourceGroupAsync(String subscriptionId, String resourceGroupName, String remediationName);
+
+ /**
+ * Gets all deployments for a remediation at resource scope.
+ *
+ * @param resourceId Resource ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listDeploymentsAtResourceAsync(final String resourceId, final String remediationName);
+
+ /**
+ * Cancel a remediation at resource scope.
+ *
+ * @param resourceId Resource ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable cancelAtResourceAsync(String resourceId, String remediationName);
+
+ /**
+ * Creates or updates a remediation at resource scope.
+ *
+ * @param resourceId Resource ID.
+ * @param remediationName The name of the remediation.
+ * @param parameters The remediation parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createOrUpdateAtResourceAsync(String resourceId, String remediationName, RemediationInner parameters);
+
+ /**
+ * Gets an existing remediation at resource scope.
+ *
+ * @param resourceId Resource ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAtResourceAsync(String resourceId, String remediationName);
+
+ /**
+ * Deletes an existing remediation at individual resource scope.
+ *
+ * @param resourceId Resource ID.
+ * @param remediationName The name of the remediation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable deleteAtResourceAsync(String resourceId, String remediationName);
+
+ /**
+ * Gets all remediations for the subscription.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync(final String subscriptionId);
+
+ /**
+ * Gets all remediations for the subscription.
+ *
+ * @param subscriptionId Microsoft Azure subscription ID.
+ * @param resourceGroupName Resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupAsync(final String subscriptionId, final String resourceGroupName);
+
+ /**
+ * Gets all remediations for a resource.
+ *
+ * @param resourceId Resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listForResourceAsync(final String resourceId);
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ResourceDiscoveryMode.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ResourceDiscoveryMode.java
new file mode 100644
index 000000000000..a9a43aa82e5e
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/ResourceDiscoveryMode.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ResourceDiscoveryMode.
+ */
+public final class ResourceDiscoveryMode extends ExpandableStringEnum {
+ /** Static value ExistingNonCompliant for ResourceDiscoveryMode. */
+ public static final ResourceDiscoveryMode EXISTING_NON_COMPLIANT = fromString("ExistingNonCompliant");
+
+ /** Static value ReEvaluateCompliance for ResourceDiscoveryMode. */
+ public static final ResourceDiscoveryMode RE_EVALUATE_COMPLIANCE = fromString("ReEvaluateCompliance");
+
+ /**
+ * Creates or finds a ResourceDiscoveryMode from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ResourceDiscoveryMode
+ */
+ @JsonCreator
+ public static ResourceDiscoveryMode fromString(String name) {
+ return fromString(name, ResourceDiscoveryMode.class);
+ }
+
+ /**
+ * @return known ResourceDiscoveryMode values
+ */
+ public static Collection values() {
+ return values(ResourceDiscoveryMode.class);
+ }
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SlimPolicyMetadata.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SlimPolicyMetadata.java
new file mode 100644
index 000000000000..8d1d472c6566
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SlimPolicyMetadata.java
@@ -0,0 +1,65 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.SlimPolicyMetadataInner;
+
+/**
+ * Type representing SlimPolicyMetadata.
+ */
+public interface SlimPolicyMetadata extends HasInner, HasManager {
+ /**
+ * @return the additionalContentUrl value.
+ */
+ String additionalContentUrl();
+
+ /**
+ * @return the category value.
+ */
+ String category();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the metadata value.
+ */
+ Object metadata();
+
+ /**
+ * @return the metadataId value.
+ */
+ String metadataId();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the owner value.
+ */
+ String owner();
+
+ /**
+ * @return the title value.
+ */
+ String title();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SummarizeResults.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SummarizeResults.java
new file mode 100644
index 000000000000..f67f63a1cf3f
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SummarizeResults.java
@@ -0,0 +1,36 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.PolicyInsightsManager;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.implementation.SummarizeResultsInner;
+import java.util.List;
+
+/**
+ * Type representing SummarizeResults.
+ */
+public interface SummarizeResults extends HasInner, HasManager {
+ /**
+ * @return the odatacontext value.
+ */
+ String odatacontext();
+
+ /**
+ * @return the odatacount value.
+ */
+ Integer odatacount();
+
+ /**
+ * @return the value value.
+ */
+ List value();
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Summary.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Summary.java
new file mode 100644
index 000000000000..9eb1b99395af
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/Summary.java
@@ -0,0 +1,124 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Summary results.
+ */
+public class Summary {
+ /**
+ * OData entity ID; always set to null since summaries do not have an
+ * entity ID.
+ */
+ @JsonProperty(value = "@odata\\.id")
+ private String odataid;
+
+ /**
+ * OData context string; used by OData clients to resolve type information
+ * based on metadata.
+ */
+ @JsonProperty(value = "@odata\\.context")
+ private String odatacontext;
+
+ /**
+ * Compliance summary for all policy assignments.
+ */
+ @JsonProperty(value = "results")
+ private SummaryResults results;
+
+ /**
+ * Policy assignments summary.
+ */
+ @JsonProperty(value = "policyAssignments")
+ private List policyAssignments;
+
+ /**
+ * Get oData entity ID; always set to null since summaries do not have an entity ID.
+ *
+ * @return the odataid value
+ */
+ public String odataid() {
+ return this.odataid;
+ }
+
+ /**
+ * Set oData entity ID; always set to null since summaries do not have an entity ID.
+ *
+ * @param odataid the odataid value to set
+ * @return the Summary object itself.
+ */
+ public Summary withOdataid(String odataid) {
+ this.odataid = odataid;
+ return this;
+ }
+
+ /**
+ * Get oData context string; used by OData clients to resolve type information based on metadata.
+ *
+ * @return the odatacontext value
+ */
+ public String odatacontext() {
+ return this.odatacontext;
+ }
+
+ /**
+ * Set oData context string; used by OData clients to resolve type information based on metadata.
+ *
+ * @param odatacontext the odatacontext value to set
+ * @return the Summary object itself.
+ */
+ public Summary withOdatacontext(String odatacontext) {
+ this.odatacontext = odatacontext;
+ return this;
+ }
+
+ /**
+ * Get compliance summary for all policy assignments.
+ *
+ * @return the results value
+ */
+ public SummaryResults results() {
+ return this.results;
+ }
+
+ /**
+ * Set compliance summary for all policy assignments.
+ *
+ * @param results the results value to set
+ * @return the Summary object itself.
+ */
+ public Summary withResults(SummaryResults results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Get policy assignments summary.
+ *
+ * @return the policyAssignments value
+ */
+ public List policyAssignments() {
+ return this.policyAssignments;
+ }
+
+ /**
+ * Set policy assignments summary.
+ *
+ * @param policyAssignments the policyAssignments value to set
+ * @return the Summary object itself.
+ */
+ public Summary withPolicyAssignments(List policyAssignments) {
+ this.policyAssignments = policyAssignments;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SummaryResults.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SummaryResults.java
new file mode 100644
index 000000000000..b526b4a1501c
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/SummaryResults.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.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Compliance summary on a particular summary level.
+ */
+public class SummaryResults {
+ /**
+ * HTTP POST URI for queryResults action on Microsoft.PolicyInsights to
+ * retrieve raw results for the compliance summary. This property will not
+ * be available by default in future API versions, but could be queried
+ * explicitly.
+ */
+ @JsonProperty(value = "queryResultsUri")
+ private String queryResultsUri;
+
+ /**
+ * Number of non-compliant resources.
+ */
+ @JsonProperty(value = "nonCompliantResources")
+ private Integer nonCompliantResources;
+
+ /**
+ * Number of non-compliant policies.
+ */
+ @JsonProperty(value = "nonCompliantPolicies")
+ private Integer nonCompliantPolicies;
+
+ /**
+ * The resources summary at this level.
+ */
+ @JsonProperty(value = "resourceDetails")
+ private List resourceDetails;
+
+ /**
+ * The policy artifact summary at this level. For query scope level, it
+ * represents policy assignment summary. For policy assignment level, it
+ * represents policy definitions summary.
+ */
+ @JsonProperty(value = "policyDetails")
+ private List policyDetails;
+
+ /**
+ * The policy definition group summary at this level.
+ */
+ @JsonProperty(value = "policyGroupDetails")
+ private List policyGroupDetails;
+
+ /**
+ * Get hTTP POST URI for queryResults action on Microsoft.PolicyInsights to retrieve raw results for the compliance summary. This property will not be available by default in future API versions, but could be queried explicitly.
+ *
+ * @return the queryResultsUri value
+ */
+ public String queryResultsUri() {
+ return this.queryResultsUri;
+ }
+
+ /**
+ * Set hTTP POST URI for queryResults action on Microsoft.PolicyInsights to retrieve raw results for the compliance summary. This property will not be available by default in future API versions, but could be queried explicitly.
+ *
+ * @param queryResultsUri the queryResultsUri value to set
+ * @return the SummaryResults object itself.
+ */
+ public SummaryResults withQueryResultsUri(String queryResultsUri) {
+ this.queryResultsUri = queryResultsUri;
+ return this;
+ }
+
+ /**
+ * Get number of non-compliant resources.
+ *
+ * @return the nonCompliantResources value
+ */
+ public Integer nonCompliantResources() {
+ return this.nonCompliantResources;
+ }
+
+ /**
+ * Set number of non-compliant resources.
+ *
+ * @param nonCompliantResources the nonCompliantResources value to set
+ * @return the SummaryResults object itself.
+ */
+ public SummaryResults withNonCompliantResources(Integer nonCompliantResources) {
+ this.nonCompliantResources = nonCompliantResources;
+ return this;
+ }
+
+ /**
+ * Get number of non-compliant policies.
+ *
+ * @return the nonCompliantPolicies value
+ */
+ public Integer nonCompliantPolicies() {
+ return this.nonCompliantPolicies;
+ }
+
+ /**
+ * Set number of non-compliant policies.
+ *
+ * @param nonCompliantPolicies the nonCompliantPolicies value to set
+ * @return the SummaryResults object itself.
+ */
+ public SummaryResults withNonCompliantPolicies(Integer nonCompliantPolicies) {
+ this.nonCompliantPolicies = nonCompliantPolicies;
+ return this;
+ }
+
+ /**
+ * Get the resources summary at this level.
+ *
+ * @return the resourceDetails value
+ */
+ public List resourceDetails() {
+ return this.resourceDetails;
+ }
+
+ /**
+ * Set the resources summary at this level.
+ *
+ * @param resourceDetails the resourceDetails value to set
+ * @return the SummaryResults object itself.
+ */
+ public SummaryResults withResourceDetails(List resourceDetails) {
+ this.resourceDetails = resourceDetails;
+ return this;
+ }
+
+ /**
+ * Get the policy artifact summary at this level. For query scope level, it represents policy assignment summary. For policy assignment level, it represents policy definitions summary.
+ *
+ * @return the policyDetails value
+ */
+ public List policyDetails() {
+ return this.policyDetails;
+ }
+
+ /**
+ * Set the policy artifact summary at this level. For query scope level, it represents policy assignment summary. For policy assignment level, it represents policy definitions summary.
+ *
+ * @param policyDetails the policyDetails value to set
+ * @return the SummaryResults object itself.
+ */
+ public SummaryResults withPolicyDetails(List policyDetails) {
+ this.policyDetails = policyDetails;
+ return this;
+ }
+
+ /**
+ * Get the policy definition group summary at this level.
+ *
+ * @return the policyGroupDetails value
+ */
+ public List policyGroupDetails() {
+ return this.policyGroupDetails;
+ }
+
+ /**
+ * Set the policy definition group summary at this level.
+ *
+ * @param policyGroupDetails the policyGroupDetails value to set
+ * @return the SummaryResults object itself.
+ */
+ public SummaryResults withPolicyGroupDetails(List policyGroupDetails) {
+ this.policyGroupDetails = policyGroupDetails;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/TrackedResourceModificationDetails.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/TrackedResourceModificationDetails.java
new file mode 100644
index 000000000000..2c5f9a8ee253
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/TrackedResourceModificationDetails.java
@@ -0,0 +1,65 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The details of the policy triggered deployment that created or modified the
+ * tracked resource.
+ */
+public class TrackedResourceModificationDetails {
+ /**
+ * The details of the policy that created or modified the tracked resource.
+ */
+ @JsonProperty(value = "policyDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private PolicyDetails policyDetails;
+
+ /**
+ * The ID of the deployment that created or modified the tracked resource.
+ */
+ @JsonProperty(value = "deploymentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String deploymentId;
+
+ /**
+ * Timestamp of the deployment that created or modified the tracked
+ * resource.
+ */
+ @JsonProperty(value = "deploymentTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime deploymentTime;
+
+ /**
+ * Get the details of the policy that created or modified the tracked resource.
+ *
+ * @return the policyDetails value
+ */
+ public PolicyDetails policyDetails() {
+ return this.policyDetails;
+ }
+
+ /**
+ * Get the ID of the deployment that created or modified the tracked resource.
+ *
+ * @return the deploymentId value
+ */
+ public String deploymentId() {
+ return this.deploymentId;
+ }
+
+ /**
+ * Get timestamp of the deployment that created or modified the tracked resource.
+ *
+ * @return the deploymentTime value
+ */
+ public DateTime deploymentTime() {
+ return this.deploymentTime;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/TypedErrorInfo.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/TypedErrorInfo.java
new file mode 100644
index 000000000000..fa8d8f44e246
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/TypedErrorInfo.java
@@ -0,0 +1,47 @@
+/**
+ * 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.policyinsights.v2020_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Scenario specific error details.
+ */
+public class TypedErrorInfo {
+ /**
+ * The type of included error details.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /**
+ * The scenario specific error details.
+ */
+ @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY)
+ private Object info;
+
+ /**
+ * Get the type of included error details.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the scenario specific error details.
+ *
+ * @return the info value
+ */
+ public Object info() {
+ return this.info;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/CheckRestrictionsResultImpl.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/CheckRestrictionsResultImpl.java
new file mode 100644
index 000000000000..19761488ce09
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/CheckRestrictionsResultImpl.java
@@ -0,0 +1,39 @@
+/**
+ * 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.policyinsights.v2020_07_01.implementation;
+
+import com.microsoft.azure.management.policyinsights.v2020_07_01.CheckRestrictionsResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.CheckRestrictionsResultContentEvaluationResult;
+import java.util.List;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.FieldRestrictions;
+
+class CheckRestrictionsResultImpl extends WrapperImpl implements CheckRestrictionsResult {
+ private final PolicyInsightsManager manager;
+ CheckRestrictionsResultImpl(CheckRestrictionsResultInner inner, PolicyInsightsManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public PolicyInsightsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public CheckRestrictionsResultContentEvaluationResult contentEvaluationResult() {
+ return this.inner().contentEvaluationResult();
+ }
+
+ @Override
+ public List fieldRestrictions() {
+ return this.inner().fieldRestrictions();
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/CheckRestrictionsResultInner.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/CheckRestrictionsResultInner.java
new file mode 100644
index 000000000000..d83a335640c9
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/CheckRestrictionsResultInner.java
@@ -0,0 +1,51 @@
+/**
+ * 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.policyinsights.v2020_07_01.implementation;
+
+import java.util.List;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.FieldRestrictions;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.CheckRestrictionsResultContentEvaluationResult;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The result of a check policy restrictions evaluation on a resource.
+ */
+public class CheckRestrictionsResultInner {
+ /**
+ * The restrictions that will be placed on various fields in the resource
+ * by policy.
+ */
+ @JsonProperty(value = "fieldRestrictions", access = JsonProperty.Access.WRITE_ONLY)
+ private List fieldRestrictions;
+
+ /**
+ * Evaluation results for the provided partial resource content.
+ */
+ @JsonProperty(value = "contentEvaluationResult", access = JsonProperty.Access.WRITE_ONLY)
+ private CheckRestrictionsResultContentEvaluationResult contentEvaluationResult;
+
+ /**
+ * Get the restrictions that will be placed on various fields in the resource by policy.
+ *
+ * @return the fieldRestrictions value
+ */
+ public List fieldRestrictions() {
+ return this.fieldRestrictions;
+ }
+
+ /**
+ * Get evaluation results for the provided partial resource content.
+ *
+ * @return the contentEvaluationResult value
+ */
+ public CheckRestrictionsResultContentEvaluationResult contentEvaluationResult() {
+ return this.contentEvaluationResult;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/IdParsingUtils.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/IdParsingUtils.java
new file mode 100644
index 000000000000..a6a521778fad
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_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.policyinsights.v2020_07_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/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationInner.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationInner.java
new file mode 100644
index 000000000000..50ada4d68fd3
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_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.policyinsights.v2020_07_01.implementation;
+
+import com.microsoft.azure.management.policyinsights.v2020_07_01.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Operation definition.
+ */
+public class OperationInner {
+ /**
+ * Operation name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Display metadata associated with the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /**
+ * Get operation name.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set operation name.
+ *
+ * @param name the name value to set
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get display metadata associated with the operation.
+ *
+ * @return the display value
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set display metadata associated with 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/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsImpl.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..537868a79e3b
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsImpl.java
@@ -0,0 +1,42 @@
+/**
+ * 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.policyinsights.v2020_07_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.Operations;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.OperationsListResults;
+
+class OperationsImpl extends WrapperImpl implements Operations {
+ private final PolicyInsightsManager manager;
+
+ OperationsImpl(PolicyInsightsManager manager) {
+ super(manager.inner().operations());
+ this.manager = manager;
+ }
+
+ public PolicyInsightsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listAsync() {
+ OperationsInner client = this.inner();
+ return client.listAsync()
+ .map(new Func1() {
+ @Override
+ public OperationsListResults call(OperationsListResultsInner inner) {
+ return new OperationsListResultsImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsInner.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsInner.java
new file mode 100644
index 000000000000..5f4ae3df9541
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsInner.java
@@ -0,0 +1,126 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.policyinsights.v2020_07_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.QueryFailureException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Operations.
+ */
+public class OperationsInner {
+ /** The Retrofit service to perform REST calls. */
+ private OperationsService service;
+ /** The service client containing this operation class. */
+ private PolicyInsightsClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public OperationsInner(Retrofit retrofit, PolicyInsightsClientImpl client) {
+ this.service = retrofit.create(OperationsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Operations to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface OperationsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.policyinsights.v2020_07_01.Operations list" })
+ @GET("providers/Microsoft.PolicyInsights/operations")
+ Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists available operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws QueryFailureException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the OperationsListResultsInner object if successful.
+ */
+ public OperationsListResultsInner list() {
+ return listWithServiceResponseAsync().toBlocking().single().body();
+ }
+
+ /**
+ * Lists available 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 ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
+ }
+
+ /**
+ * Lists available operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the OperationsListResultsInner object
+ */
+ public Observable listAsync() {
+ return listWithServiceResponseAsync().map(new Func1, OperationsListResultsInner>() {
+ @Override
+ public OperationsListResultsInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists available operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the OperationsListResultsInner object
+ */
+ public Observable> listWithServiceResponseAsync() {
+ final String apiVersion = "2019-10-01";
+ return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = listDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse listDelegate(Response response) throws QueryFailureException, IOException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(QueryFailureException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsListResultsImpl.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsListResultsImpl.java
new file mode 100644
index 000000000000..cb97319a5f11
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsListResultsImpl.java
@@ -0,0 +1,37 @@
+/**
+ * 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.policyinsights.v2020_07_01.implementation;
+
+import com.microsoft.azure.management.policyinsights.v2020_07_01.OperationsListResults;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.List;
+
+class OperationsListResultsImpl extends WrapperImpl implements OperationsListResults {
+ private final PolicyInsightsManager manager;
+ OperationsListResultsImpl(OperationsListResultsInner inner, PolicyInsightsManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public PolicyInsightsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Integer odatacount() {
+ return this.inner().odatacount();
+ }
+
+ @Override
+ public List value() {
+ return this.inner().value();
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsListResultsInner.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsListResultsInner.java
new file mode 100644
index 000000000000..9f0371739689
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/OperationsListResultsInner.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.policyinsights.v2020_07_01.implementation;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * List of available operations.
+ */
+public class OperationsListResultsInner {
+ /**
+ * OData entity count; represents the number of operations returned.
+ */
+ @JsonProperty(value = "@odata\\.count")
+ private Integer odatacount;
+
+ /**
+ * List of available operations.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get oData entity count; represents the number of operations returned.
+ *
+ * @return the odatacount value
+ */
+ public Integer odatacount() {
+ return this.odatacount;
+ }
+
+ /**
+ * Set oData entity count; represents the number of operations returned.
+ *
+ * @param odatacount the odatacount value to set
+ * @return the OperationsListResultsInner object itself.
+ */
+ public OperationsListResultsInner withOdatacount(Integer odatacount) {
+ this.odatacount = odatacount;
+ return this;
+ }
+
+ /**
+ * Get list of available operations.
+ *
+ * @return the value value
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set list of available operations.
+ *
+ * @param value the value value to set
+ * @return the OperationsListResultsInner object itself.
+ */
+ public OperationsListResultsInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PageImpl.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PageImpl.java
new file mode 100644
index 000000000000..e533198fa80d
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_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.policyinsights.v2020_07_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/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PageImpl1.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PageImpl1.java
new file mode 100644
index 000000000000..37b0a947d3c7
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PageImpl1.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.policyinsights.v2020_07_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 PageImpl1 implements Page {
+ /**
+ * The link to the next page.
+ */
+ @JsonProperty("@odata.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 PageImpl1 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 PageImpl1 setItems(List items) {
+ this.items = items;
+ return this;
+ }
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventImpl.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventImpl.java
new file mode 100644
index 000000000000..19a3078012c1
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventImpl.java
@@ -0,0 +1,190 @@
+/**
+ * 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.policyinsights.v2020_07_01.implementation;
+
+import com.microsoft.azure.management.policyinsights.v2020_07_01.PolicyEvent;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.Map;
+import java.util.List;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.ComponentEventDetails;
+import org.joda.time.DateTime;
+
+class PolicyEventImpl extends WrapperImpl implements PolicyEvent {
+ private final PolicyInsightsManager manager;
+ PolicyEventImpl(PolicyEventInner inner, PolicyInsightsManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public PolicyInsightsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Map additionalProperties() {
+ return this.inner().additionalProperties();
+ }
+
+ @Override
+ public String complianceState() {
+ return this.inner().complianceState();
+ }
+
+ @Override
+ public List components() {
+ return this.inner().components();
+ }
+
+ @Override
+ public String effectiveParameters() {
+ return this.inner().effectiveParameters();
+ }
+
+ @Override
+ public Boolean isCompliant() {
+ return this.inner().isCompliant();
+ }
+
+ @Override
+ public String managementGroupIds() {
+ return this.inner().managementGroupIds();
+ }
+
+ @Override
+ public String odatacontext() {
+ return this.inner().odatacontext();
+ }
+
+ @Override
+ public String odataid() {
+ return this.inner().odataid();
+ }
+
+ @Override
+ public String policyAssignmentId() {
+ return this.inner().policyAssignmentId();
+ }
+
+ @Override
+ public String policyAssignmentName() {
+ return this.inner().policyAssignmentName();
+ }
+
+ @Override
+ public String policyAssignmentOwner() {
+ return this.inner().policyAssignmentOwner();
+ }
+
+ @Override
+ public String policyAssignmentParameters() {
+ return this.inner().policyAssignmentParameters();
+ }
+
+ @Override
+ public String policyAssignmentScope() {
+ return this.inner().policyAssignmentScope();
+ }
+
+ @Override
+ public String policyDefinitionAction() {
+ return this.inner().policyDefinitionAction();
+ }
+
+ @Override
+ public String policyDefinitionCategory() {
+ return this.inner().policyDefinitionCategory();
+ }
+
+ @Override
+ public String policyDefinitionId() {
+ return this.inner().policyDefinitionId();
+ }
+
+ @Override
+ public String policyDefinitionName() {
+ return this.inner().policyDefinitionName();
+ }
+
+ @Override
+ public String policyDefinitionReferenceId() {
+ return this.inner().policyDefinitionReferenceId();
+ }
+
+ @Override
+ public String policySetDefinitionCategory() {
+ return this.inner().policySetDefinitionCategory();
+ }
+
+ @Override
+ public String policySetDefinitionId() {
+ return this.inner().policySetDefinitionId();
+ }
+
+ @Override
+ public String policySetDefinitionName() {
+ return this.inner().policySetDefinitionName();
+ }
+
+ @Override
+ public String policySetDefinitionOwner() {
+ return this.inner().policySetDefinitionOwner();
+ }
+
+ @Override
+ public String policySetDefinitionParameters() {
+ return this.inner().policySetDefinitionParameters();
+ }
+
+ @Override
+ public String principalOid() {
+ return this.inner().principalOid();
+ }
+
+ @Override
+ public String resourceGroup() {
+ return this.inner().resourceGroup();
+ }
+
+ @Override
+ public String resourceId() {
+ return this.inner().resourceId();
+ }
+
+ @Override
+ public String resourceLocation() {
+ return this.inner().resourceLocation();
+ }
+
+ @Override
+ public String resourceTags() {
+ return this.inner().resourceTags();
+ }
+
+ @Override
+ public String resourceType() {
+ return this.inner().resourceType();
+ }
+
+ @Override
+ public String subscriptionId() {
+ return this.inner().subscriptionId();
+ }
+
+ @Override
+ public String tenantId() {
+ return this.inner().tenantId();
+ }
+
+ @Override
+ public DateTime timestamp() {
+ return this.inner().timestamp();
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventInner.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventInner.java
new file mode 100644
index 000000000000..4eab1258d05a
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventInner.java
@@ -0,0 +1,864 @@
+/**
+ * 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.policyinsights.v2020_07_01.implementation;
+
+import java.util.Map;
+import org.joda.time.DateTime;
+import java.util.List;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.ComponentEventDetails;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Policy event record.
+ */
+public class PolicyEventInner {
+ /**
+ * Unmatched properties from the message are deserialized this collection.
+ */
+ @JsonProperty(value = "")
+ private Map additionalProperties;
+
+ /**
+ * OData entity ID; always set to null since policy event records do not
+ * have an entity ID.
+ */
+ @JsonProperty(value = "@odata\\.id")
+ private String odataid;
+
+ /**
+ * OData context string; used by OData clients to resolve type information
+ * based on metadata.
+ */
+ @JsonProperty(value = "@odata\\.context")
+ private String odatacontext;
+
+ /**
+ * Timestamp for the policy event record.
+ */
+ @JsonProperty(value = "timestamp")
+ private DateTime timestamp;
+
+ /**
+ * Resource ID.
+ */
+ @JsonProperty(value = "resourceId")
+ private String resourceId;
+
+ /**
+ * Policy assignment ID.
+ */
+ @JsonProperty(value = "policyAssignmentId")
+ private String policyAssignmentId;
+
+ /**
+ * Policy definition ID.
+ */
+ @JsonProperty(value = "policyDefinitionId")
+ private String policyDefinitionId;
+
+ /**
+ * Effective parameters for the policy assignment.
+ */
+ @JsonProperty(value = "effectiveParameters")
+ private String effectiveParameters;
+
+ /**
+ * Flag which states whether the resource is compliant against the policy
+ * assignment it was evaluated against.
+ */
+ @JsonProperty(value = "isCompliant")
+ private Boolean isCompliant;
+
+ /**
+ * Subscription ID.
+ */
+ @JsonProperty(value = "subscriptionId")
+ private String subscriptionId;
+
+ /**
+ * Resource type.
+ */
+ @JsonProperty(value = "resourceType")
+ private String resourceType;
+
+ /**
+ * Resource location.
+ */
+ @JsonProperty(value = "resourceLocation")
+ private String resourceLocation;
+
+ /**
+ * Resource group name.
+ */
+ @JsonProperty(value = "resourceGroup")
+ private String resourceGroup;
+
+ /**
+ * List of resource tags.
+ */
+ @JsonProperty(value = "resourceTags")
+ private String resourceTags;
+
+ /**
+ * Policy assignment name.
+ */
+ @JsonProperty(value = "policyAssignmentName")
+ private String policyAssignmentName;
+
+ /**
+ * Policy assignment owner.
+ */
+ @JsonProperty(value = "policyAssignmentOwner")
+ private String policyAssignmentOwner;
+
+ /**
+ * Policy assignment parameters.
+ */
+ @JsonProperty(value = "policyAssignmentParameters")
+ private String policyAssignmentParameters;
+
+ /**
+ * Policy assignment scope.
+ */
+ @JsonProperty(value = "policyAssignmentScope")
+ private String policyAssignmentScope;
+
+ /**
+ * Policy definition name.
+ */
+ @JsonProperty(value = "policyDefinitionName")
+ private String policyDefinitionName;
+
+ /**
+ * Policy definition action, i.e. effect.
+ */
+ @JsonProperty(value = "policyDefinitionAction")
+ private String policyDefinitionAction;
+
+ /**
+ * Policy definition category.
+ */
+ @JsonProperty(value = "policyDefinitionCategory")
+ private String policyDefinitionCategory;
+
+ /**
+ * Policy set definition ID, if the policy assignment is for a policy set.
+ */
+ @JsonProperty(value = "policySetDefinitionId")
+ private String policySetDefinitionId;
+
+ /**
+ * Policy set definition name, if the policy assignment is for a policy
+ * set.
+ */
+ @JsonProperty(value = "policySetDefinitionName")
+ private String policySetDefinitionName;
+
+ /**
+ * Policy set definition owner, if the policy assignment is for a policy
+ * set.
+ */
+ @JsonProperty(value = "policySetDefinitionOwner")
+ private String policySetDefinitionOwner;
+
+ /**
+ * Policy set definition category, if the policy assignment is for a policy
+ * set.
+ */
+ @JsonProperty(value = "policySetDefinitionCategory")
+ private String policySetDefinitionCategory;
+
+ /**
+ * Policy set definition parameters, if the policy assignment is for a
+ * policy set.
+ */
+ @JsonProperty(value = "policySetDefinitionParameters")
+ private String policySetDefinitionParameters;
+
+ /**
+ * Comma separated list of management group IDs, which represent the
+ * hierarchy of the management groups the resource is under.
+ */
+ @JsonProperty(value = "managementGroupIds")
+ private String managementGroupIds;
+
+ /**
+ * Reference ID for the policy definition inside the policy set, if the
+ * policy assignment is for a policy set.
+ */
+ @JsonProperty(value = "policyDefinitionReferenceId")
+ private String policyDefinitionReferenceId;
+
+ /**
+ * Compliance state of the resource.
+ */
+ @JsonProperty(value = "complianceState")
+ private String complianceState;
+
+ /**
+ * Tenant ID for the policy event record.
+ */
+ @JsonProperty(value = "tenantId")
+ private String tenantId;
+
+ /**
+ * Principal object ID for the user who initiated the resource operation
+ * that triggered the policy event.
+ */
+ @JsonProperty(value = "principalOid")
+ private String principalOid;
+
+ /**
+ * Components events records populated only when URL contains
+ * $expand=components clause.
+ */
+ @JsonProperty(value = "components")
+ private List components;
+
+ /**
+ * Get unmatched properties from the message are deserialized this collection.
+ *
+ * @return the additionalProperties value
+ */
+ public Map additionalProperties() {
+ return this.additionalProperties;
+ }
+
+ /**
+ * Set unmatched properties from the message are deserialized this collection.
+ *
+ * @param additionalProperties the additionalProperties value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withAdditionalProperties(Map additionalProperties) {
+ this.additionalProperties = additionalProperties;
+ return this;
+ }
+
+ /**
+ * Get oData entity ID; always set to null since policy event records do not have an entity ID.
+ *
+ * @return the odataid value
+ */
+ public String odataid() {
+ return this.odataid;
+ }
+
+ /**
+ * Set oData entity ID; always set to null since policy event records do not have an entity ID.
+ *
+ * @param odataid the odataid value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withOdataid(String odataid) {
+ this.odataid = odataid;
+ return this;
+ }
+
+ /**
+ * Get oData context string; used by OData clients to resolve type information based on metadata.
+ *
+ * @return the odatacontext value
+ */
+ public String odatacontext() {
+ return this.odatacontext;
+ }
+
+ /**
+ * Set oData context string; used by OData clients to resolve type information based on metadata.
+ *
+ * @param odatacontext the odatacontext value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withOdatacontext(String odatacontext) {
+ this.odatacontext = odatacontext;
+ return this;
+ }
+
+ /**
+ * Get timestamp for the policy event record.
+ *
+ * @return the timestamp value
+ */
+ public DateTime timestamp() {
+ return this.timestamp;
+ }
+
+ /**
+ * Set timestamp for the policy event record.
+ *
+ * @param timestamp the timestamp value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withTimestamp(DateTime timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ /**
+ * Get resource ID.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set resource ID.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get policy assignment ID.
+ *
+ * @return the policyAssignmentId value
+ */
+ public String policyAssignmentId() {
+ return this.policyAssignmentId;
+ }
+
+ /**
+ * Set policy assignment ID.
+ *
+ * @param policyAssignmentId the policyAssignmentId value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyAssignmentId(String policyAssignmentId) {
+ this.policyAssignmentId = policyAssignmentId;
+ return this;
+ }
+
+ /**
+ * Get policy definition ID.
+ *
+ * @return the policyDefinitionId value
+ */
+ public String policyDefinitionId() {
+ return this.policyDefinitionId;
+ }
+
+ /**
+ * Set policy definition ID.
+ *
+ * @param policyDefinitionId the policyDefinitionId value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyDefinitionId(String policyDefinitionId) {
+ this.policyDefinitionId = policyDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get effective parameters for the policy assignment.
+ *
+ * @return the effectiveParameters value
+ */
+ public String effectiveParameters() {
+ return this.effectiveParameters;
+ }
+
+ /**
+ * Set effective parameters for the policy assignment.
+ *
+ * @param effectiveParameters the effectiveParameters value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withEffectiveParameters(String effectiveParameters) {
+ this.effectiveParameters = effectiveParameters;
+ return this;
+ }
+
+ /**
+ * Get flag which states whether the resource is compliant against the policy assignment it was evaluated against.
+ *
+ * @return the isCompliant value
+ */
+ public Boolean isCompliant() {
+ return this.isCompliant;
+ }
+
+ /**
+ * Set flag which states whether the resource is compliant against the policy assignment it was evaluated against.
+ *
+ * @param isCompliant the isCompliant value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withIsCompliant(Boolean isCompliant) {
+ this.isCompliant = isCompliant;
+ return this;
+ }
+
+ /**
+ * Get subscription ID.
+ *
+ * @return the subscriptionId value
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Set subscription ID.
+ *
+ * @param subscriptionId the subscriptionId value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /**
+ * Get resource type.
+ *
+ * @return the resourceType value
+ */
+ public String resourceType() {
+ return this.resourceType;
+ }
+
+ /**
+ * Set resource type.
+ *
+ * @param resourceType the resourceType value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withResourceType(String resourceType) {
+ this.resourceType = resourceType;
+ return this;
+ }
+
+ /**
+ * Get resource location.
+ *
+ * @return the resourceLocation value
+ */
+ public String resourceLocation() {
+ return this.resourceLocation;
+ }
+
+ /**
+ * Set resource location.
+ *
+ * @param resourceLocation the resourceLocation value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withResourceLocation(String resourceLocation) {
+ this.resourceLocation = resourceLocation;
+ return this;
+ }
+
+ /**
+ * Get resource group name.
+ *
+ * @return the resourceGroup value
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Set resource group name.
+ *
+ * @param resourceGroup the resourceGroup value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withResourceGroup(String resourceGroup) {
+ this.resourceGroup = resourceGroup;
+ return this;
+ }
+
+ /**
+ * Get list of resource tags.
+ *
+ * @return the resourceTags value
+ */
+ public String resourceTags() {
+ return this.resourceTags;
+ }
+
+ /**
+ * Set list of resource tags.
+ *
+ * @param resourceTags the resourceTags value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withResourceTags(String resourceTags) {
+ this.resourceTags = resourceTags;
+ return this;
+ }
+
+ /**
+ * Get policy assignment name.
+ *
+ * @return the policyAssignmentName value
+ */
+ public String policyAssignmentName() {
+ return this.policyAssignmentName;
+ }
+
+ /**
+ * Set policy assignment name.
+ *
+ * @param policyAssignmentName the policyAssignmentName value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyAssignmentName(String policyAssignmentName) {
+ this.policyAssignmentName = policyAssignmentName;
+ return this;
+ }
+
+ /**
+ * Get policy assignment owner.
+ *
+ * @return the policyAssignmentOwner value
+ */
+ public String policyAssignmentOwner() {
+ return this.policyAssignmentOwner;
+ }
+
+ /**
+ * Set policy assignment owner.
+ *
+ * @param policyAssignmentOwner the policyAssignmentOwner value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyAssignmentOwner(String policyAssignmentOwner) {
+ this.policyAssignmentOwner = policyAssignmentOwner;
+ return this;
+ }
+
+ /**
+ * Get policy assignment parameters.
+ *
+ * @return the policyAssignmentParameters value
+ */
+ public String policyAssignmentParameters() {
+ return this.policyAssignmentParameters;
+ }
+
+ /**
+ * Set policy assignment parameters.
+ *
+ * @param policyAssignmentParameters the policyAssignmentParameters value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyAssignmentParameters(String policyAssignmentParameters) {
+ this.policyAssignmentParameters = policyAssignmentParameters;
+ return this;
+ }
+
+ /**
+ * Get policy assignment scope.
+ *
+ * @return the policyAssignmentScope value
+ */
+ public String policyAssignmentScope() {
+ return this.policyAssignmentScope;
+ }
+
+ /**
+ * Set policy assignment scope.
+ *
+ * @param policyAssignmentScope the policyAssignmentScope value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyAssignmentScope(String policyAssignmentScope) {
+ this.policyAssignmentScope = policyAssignmentScope;
+ return this;
+ }
+
+ /**
+ * Get policy definition name.
+ *
+ * @return the policyDefinitionName value
+ */
+ public String policyDefinitionName() {
+ return this.policyDefinitionName;
+ }
+
+ /**
+ * Set policy definition name.
+ *
+ * @param policyDefinitionName the policyDefinitionName value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyDefinitionName(String policyDefinitionName) {
+ this.policyDefinitionName = policyDefinitionName;
+ return this;
+ }
+
+ /**
+ * Get policy definition action, i.e. effect.
+ *
+ * @return the policyDefinitionAction value
+ */
+ public String policyDefinitionAction() {
+ return this.policyDefinitionAction;
+ }
+
+ /**
+ * Set policy definition action, i.e. effect.
+ *
+ * @param policyDefinitionAction the policyDefinitionAction value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyDefinitionAction(String policyDefinitionAction) {
+ this.policyDefinitionAction = policyDefinitionAction;
+ return this;
+ }
+
+ /**
+ * Get policy definition category.
+ *
+ * @return the policyDefinitionCategory value
+ */
+ public String policyDefinitionCategory() {
+ return this.policyDefinitionCategory;
+ }
+
+ /**
+ * Set policy definition category.
+ *
+ * @param policyDefinitionCategory the policyDefinitionCategory value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyDefinitionCategory(String policyDefinitionCategory) {
+ this.policyDefinitionCategory = policyDefinitionCategory;
+ return this;
+ }
+
+ /**
+ * Get policy set definition ID, if the policy assignment is for a policy set.
+ *
+ * @return the policySetDefinitionId value
+ */
+ public String policySetDefinitionId() {
+ return this.policySetDefinitionId;
+ }
+
+ /**
+ * Set policy set definition ID, if the policy assignment is for a policy set.
+ *
+ * @param policySetDefinitionId the policySetDefinitionId value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicySetDefinitionId(String policySetDefinitionId) {
+ this.policySetDefinitionId = policySetDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get policy set definition name, if the policy assignment is for a policy set.
+ *
+ * @return the policySetDefinitionName value
+ */
+ public String policySetDefinitionName() {
+ return this.policySetDefinitionName;
+ }
+
+ /**
+ * Set policy set definition name, if the policy assignment is for a policy set.
+ *
+ * @param policySetDefinitionName the policySetDefinitionName value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicySetDefinitionName(String policySetDefinitionName) {
+ this.policySetDefinitionName = policySetDefinitionName;
+ return this;
+ }
+
+ /**
+ * Get policy set definition owner, if the policy assignment is for a policy set.
+ *
+ * @return the policySetDefinitionOwner value
+ */
+ public String policySetDefinitionOwner() {
+ return this.policySetDefinitionOwner;
+ }
+
+ /**
+ * Set policy set definition owner, if the policy assignment is for a policy set.
+ *
+ * @param policySetDefinitionOwner the policySetDefinitionOwner value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicySetDefinitionOwner(String policySetDefinitionOwner) {
+ this.policySetDefinitionOwner = policySetDefinitionOwner;
+ return this;
+ }
+
+ /**
+ * Get policy set definition category, if the policy assignment is for a policy set.
+ *
+ * @return the policySetDefinitionCategory value
+ */
+ public String policySetDefinitionCategory() {
+ return this.policySetDefinitionCategory;
+ }
+
+ /**
+ * Set policy set definition category, if the policy assignment is for a policy set.
+ *
+ * @param policySetDefinitionCategory the policySetDefinitionCategory value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicySetDefinitionCategory(String policySetDefinitionCategory) {
+ this.policySetDefinitionCategory = policySetDefinitionCategory;
+ return this;
+ }
+
+ /**
+ * Get policy set definition parameters, if the policy assignment is for a policy set.
+ *
+ * @return the policySetDefinitionParameters value
+ */
+ public String policySetDefinitionParameters() {
+ return this.policySetDefinitionParameters;
+ }
+
+ /**
+ * Set policy set definition parameters, if the policy assignment is for a policy set.
+ *
+ * @param policySetDefinitionParameters the policySetDefinitionParameters value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicySetDefinitionParameters(String policySetDefinitionParameters) {
+ this.policySetDefinitionParameters = policySetDefinitionParameters;
+ return this;
+ }
+
+ /**
+ * Get comma separated list of management group IDs, which represent the hierarchy of the management groups the resource is under.
+ *
+ * @return the managementGroupIds value
+ */
+ public String managementGroupIds() {
+ return this.managementGroupIds;
+ }
+
+ /**
+ * Set comma separated list of management group IDs, which represent the hierarchy of the management groups the resource is under.
+ *
+ * @param managementGroupIds the managementGroupIds value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withManagementGroupIds(String managementGroupIds) {
+ this.managementGroupIds = managementGroupIds;
+ return this;
+ }
+
+ /**
+ * Get reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.
+ *
+ * @return the policyDefinitionReferenceId value
+ */
+ public String policyDefinitionReferenceId() {
+ return this.policyDefinitionReferenceId;
+ }
+
+ /**
+ * Set reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.
+ *
+ * @param policyDefinitionReferenceId the policyDefinitionReferenceId value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPolicyDefinitionReferenceId(String policyDefinitionReferenceId) {
+ this.policyDefinitionReferenceId = policyDefinitionReferenceId;
+ return this;
+ }
+
+ /**
+ * Get compliance state of the resource.
+ *
+ * @return the complianceState value
+ */
+ public String complianceState() {
+ return this.complianceState;
+ }
+
+ /**
+ * Set compliance state of the resource.
+ *
+ * @param complianceState the complianceState value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withComplianceState(String complianceState) {
+ this.complianceState = complianceState;
+ return this;
+ }
+
+ /**
+ * Get tenant ID for the policy event record.
+ *
+ * @return the tenantId value
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set tenant ID for the policy event record.
+ *
+ * @param tenantId the tenantId value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Get principal object ID for the user who initiated the resource operation that triggered the policy event.
+ *
+ * @return the principalOid value
+ */
+ public String principalOid() {
+ return this.principalOid;
+ }
+
+ /**
+ * Set principal object ID for the user who initiated the resource operation that triggered the policy event.
+ *
+ * @param principalOid the principalOid value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withPrincipalOid(String principalOid) {
+ this.principalOid = principalOid;
+ return this;
+ }
+
+ /**
+ * Get components events records populated only when URL contains $expand=components clause.
+ *
+ * @return the components value
+ */
+ public List components() {
+ return this.components;
+ }
+
+ /**
+ * Set components events records populated only when URL contains $expand=components clause.
+ *
+ * @param components the components value to set
+ * @return the PolicyEventInner object itself.
+ */
+ public PolicyEventInner withComponents(List components) {
+ this.components = components;
+ return this;
+ }
+
+}
diff --git a/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventsImpl.java b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventsImpl.java
new file mode 100644
index 000000000000..e5f456108a6c
--- /dev/null
+++ b/sdk/policyinsights/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/policyinsights/v2020_07_01/implementation/PolicyEventsImpl.java
@@ -0,0 +1,175 @@
+/**
+ * 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.policyinsights.v2020_07_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.PolicyEvents;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.policyinsights.v2020_07_01.PolicyEvent;
+
+class PolicyEventsImpl extends WrapperImpl implements PolicyEvents {
+ private final PolicyInsightsManager manager;
+
+ PolicyEventsImpl(PolicyInsightsManager manager) {
+ super(manager.inner().policyEvents());
+ this.manager = manager;
+ }
+
+ public PolicyInsightsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listQueryResultsForManagementGroupAsync(final String managementGroupName) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForManagementGroupAsync(managementGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public PolicyEvent call(PolicyEventInner inner) {
+ return new PolicyEventImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listQueryResultsForSubscriptionAsync(final String subscriptionId) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForSubscriptionAsync(subscriptionId)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public PolicyEvent call(PolicyEventInner inner) {
+ return new PolicyEventImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listQueryResultsForResourceGroupAsync(final String subscriptionId, final String resourceGroupName) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForResourceGroupAsync(subscriptionId, resourceGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public PolicyEvent call(PolicyEventInner inner) {
+ return new PolicyEventImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listQueryResultsForResourceAsync(final String resourceId) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForResourceAsync(resourceId)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public PolicyEvent call(PolicyEventInner inner) {
+ return new PolicyEventImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listQueryResultsForPolicySetDefinitionAsync(final String subscriptionId, final String policySetDefinitionName) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForPolicySetDefinitionAsync(subscriptionId, policySetDefinitionName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public PolicyEvent call(PolicyEventInner inner) {
+ return new PolicyEventImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listQueryResultsForPolicyDefinitionAsync(final String subscriptionId, final String policyDefinitionName) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForPolicyDefinitionAsync(subscriptionId, policyDefinitionName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public PolicyEvent call(PolicyEventInner inner) {
+ return new PolicyEventImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listQueryResultsForSubscriptionLevelPolicyAssignmentAsync(final String subscriptionId, final String policyAssignmentName) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForSubscriptionLevelPolicyAssignmentAsync(subscriptionId, policyAssignmentName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public PolicyEvent call(PolicyEventInner inner) {
+ return new PolicyEventImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listQueryResultsForResourceGroupLevelPolicyAssignmentAsync(final String subscriptionId, final String resourceGroupName, final String policyAssignmentName) {
+ PolicyEventsInner client = this.inner();
+ return client.listQueryResultsForResourceGroupLevelPolicyAssignmentAsync(subscriptionId, resourceGroupName, policyAssignmentName)
+ .flatMapIterable(new Func1