diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/README.rst b/sdk/policyinsights/azure-mgmt-policyinsights/README.rst index 9fe035c874df..bf7ac7946645 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/README.rst +++ b/sdk/policyinsights/azure-mgmt-policyinsights/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Policy Insights Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/__init__.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/__init__.py index 3587c19cedfc..7a66b4bfda5f 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/__init__.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .policy_insights_client import PolicyInsightsClient -from .version import VERSION +from ._configuration import PolicyInsightsClientConfiguration +from ._policy_insights_client import PolicyInsightsClient +__all__ = ['PolicyInsightsClient', 'PolicyInsightsClientConfiguration'] -__all__ = ['PolicyInsightsClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_configuration.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_configuration.py new file mode 100644 index 000000000000..487fb38b8695 --- /dev/null +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_configuration.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class PolicyInsightsClientConfiguration(AzureConfiguration): + """Configuration for PolicyInsightsClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(PolicyInsightsClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-policyinsights/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/policy_insights_client.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_policy_insights_client.py similarity index 67% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/policy_insights_client.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_policy_insights_client.py index ba9234ef5f6f..b2b9c41b73a0 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/policy_insights_client.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_policy_insights_client.py @@ -11,41 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.policy_tracked_resources_operations import PolicyTrackedResourcesOperations -from .operations.remediations_operations import RemediationsOperations -from .operations.policy_events_operations import PolicyEventsOperations -from .operations.policy_states_operations import PolicyStatesOperations -from .operations.operations import Operations -from . import models - - -class PolicyInsightsClientConfiguration(AzureConfiguration): - """Configuration for PolicyInsightsClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(PolicyInsightsClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-policyinsights/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials +from ._configuration import PolicyInsightsClientConfiguration +from .operations import PolicyTrackedResourcesOperations +from .operations import RemediationsOperations +from .operations import PolicyEventsOperations +from .operations import PolicyStatesOperations +from .operations import Operations +from . import models class PolicyInsightsClient(SDKClient): diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py index d1d760d127db..1a8a63b2f811 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py @@ -10,99 +10,105 @@ # -------------------------------------------------------------------------- try: - from .policy_details_py3 import PolicyDetails - from .tracked_resource_modification_details_py3 import TrackedResourceModificationDetails - from .policy_tracked_resource_py3 import PolicyTrackedResource - from .query_failure_error_py3 import QueryFailureError - from .query_failure_py3 import QueryFailure, QueryFailureException - from .remediation_filters_py3 import RemediationFilters - from .remediation_deployment_summary_py3 import RemediationDeploymentSummary - from .remediation_py3 import Remediation - from .typed_error_info_py3 import TypedErrorInfo - from .error_definition_py3 import ErrorDefinition - from .remediation_deployment_py3 import RemediationDeployment - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .policy_event_py3 import PolicyEvent - from .policy_events_query_results_py3 import PolicyEventsQueryResults - from .expression_evaluation_details_py3 import ExpressionEvaluationDetails - from .if_not_exists_evaluation_details_py3 import IfNotExistsEvaluationDetails - from .policy_evaluation_details_py3 import PolicyEvaluationDetails - from .policy_state_py3 import PolicyState - from .policy_states_query_results_py3 import PolicyStatesQueryResults - from .summary_results_py3 import SummaryResults - from .policy_definition_summary_py3 import PolicyDefinitionSummary - from .policy_assignment_summary_py3 import PolicyAssignmentSummary - from .summary_py3 import Summary - from .summarize_results_py3 import SummarizeResults - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operations_list_results_py3 import OperationsListResults - from .query_options_py3 import QueryOptions + from ._models_py3 import ComplianceDetail + from ._models_py3 import ErrorDefinition + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ExpressionEvaluationDetails + from ._models_py3 import IfNotExistsEvaluationDetails + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationsListResults + from ._models_py3 import PolicyAssignmentSummary + from ._models_py3 import PolicyDefinitionSummary + from ._models_py3 import PolicyDetails + from ._models_py3 import PolicyEvaluationDetails + from ._models_py3 import PolicyEvent + from ._models_py3 import PolicyEventsQueryResults + from ._models_py3 import PolicyGroupSummary + from ._models_py3 import PolicyState + from ._models_py3 import PolicyStatesQueryResults + from ._models_py3 import PolicyTrackedResource + from ._models_py3 import QueryFailure, QueryFailureException + from ._models_py3 import QueryFailureError + from ._models_py3 import QueryOptions + from ._models_py3 import Remediation + from ._models_py3 import RemediationDeployment + from ._models_py3 import RemediationDeploymentSummary + from ._models_py3 import RemediationFilters + from ._models_py3 import SummarizeResults + from ._models_py3 import Summary + from ._models_py3 import SummaryResults + from ._models_py3 import TrackedResourceModificationDetails + from ._models_py3 import TypedErrorInfo except (SyntaxError, ImportError): - from .policy_details import PolicyDetails - from .tracked_resource_modification_details import TrackedResourceModificationDetails - from .policy_tracked_resource import PolicyTrackedResource - from .query_failure_error import QueryFailureError - from .query_failure import QueryFailure, QueryFailureException - from .remediation_filters import RemediationFilters - from .remediation_deployment_summary import RemediationDeploymentSummary - from .remediation import Remediation - from .typed_error_info import TypedErrorInfo - from .error_definition import ErrorDefinition - from .remediation_deployment import RemediationDeployment - from .error_response import ErrorResponse, ErrorResponseException - from .policy_event import PolicyEvent - from .policy_events_query_results import PolicyEventsQueryResults - from .expression_evaluation_details import ExpressionEvaluationDetails - from .if_not_exists_evaluation_details import IfNotExistsEvaluationDetails - from .policy_evaluation_details import PolicyEvaluationDetails - from .policy_state import PolicyState - from .policy_states_query_results import PolicyStatesQueryResults - from .summary_results import SummaryResults - from .policy_definition_summary import PolicyDefinitionSummary - from .policy_assignment_summary import PolicyAssignmentSummary - from .summary import Summary - from .summarize_results import SummarizeResults - from .operation_display import OperationDisplay - from .operation import Operation - from .operations_list_results import OperationsListResults - from .query_options import QueryOptions -from .policy_tracked_resource_paged import PolicyTrackedResourcePaged -from .remediation_deployment_paged import RemediationDeploymentPaged -from .remediation_paged import RemediationPaged -from .policy_insights_client_enums import ( + from ._models import ComplianceDetail + from ._models import ErrorDefinition + from ._models import ErrorResponse, ErrorResponseException + from ._models import ExpressionEvaluationDetails + from ._models import IfNotExistsEvaluationDetails + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationsListResults + from ._models import PolicyAssignmentSummary + from ._models import PolicyDefinitionSummary + from ._models import PolicyDetails + from ._models import PolicyEvaluationDetails + from ._models import PolicyEvent + from ._models import PolicyEventsQueryResults + from ._models import PolicyGroupSummary + from ._models import PolicyState + from ._models import PolicyStatesQueryResults + from ._models import PolicyTrackedResource + from ._models import QueryFailure, QueryFailureException + from ._models import QueryFailureError + from ._models import QueryOptions + from ._models import Remediation + from ._models import RemediationDeployment + from ._models import RemediationDeploymentSummary + from ._models import RemediationFilters + from ._models import SummarizeResults + from ._models import Summary + from ._models import SummaryResults + from ._models import TrackedResourceModificationDetails + from ._models import TypedErrorInfo +from ._paged_models import PolicyTrackedResourcePaged +from ._paged_models import RemediationDeploymentPaged +from ._paged_models import RemediationPaged +from ._policy_insights_client_enums import ( PolicyStatesResource, ) __all__ = [ - 'PolicyDetails', - 'TrackedResourceModificationDetails', - 'PolicyTrackedResource', - 'QueryFailureError', - 'QueryFailure', 'QueryFailureException', - 'RemediationFilters', - 'RemediationDeploymentSummary', - 'Remediation', - 'TypedErrorInfo', + 'ComplianceDetail', 'ErrorDefinition', - 'RemediationDeployment', 'ErrorResponse', 'ErrorResponseException', - 'PolicyEvent', - 'PolicyEventsQueryResults', 'ExpressionEvaluationDetails', 'IfNotExistsEvaluationDetails', + 'Operation', + 'OperationDisplay', + 'OperationsListResults', + 'PolicyAssignmentSummary', + 'PolicyDefinitionSummary', + 'PolicyDetails', 'PolicyEvaluationDetails', + 'PolicyEvent', + 'PolicyEventsQueryResults', + 'PolicyGroupSummary', 'PolicyState', 'PolicyStatesQueryResults', - 'SummaryResults', - 'PolicyDefinitionSummary', - 'PolicyAssignmentSummary', - 'Summary', - 'SummarizeResults', - 'OperationDisplay', - 'Operation', - 'OperationsListResults', + 'PolicyTrackedResource', + 'QueryFailure', 'QueryFailureException', + 'QueryFailureError', 'QueryOptions', + 'Remediation', + 'RemediationDeployment', + 'RemediationDeploymentSummary', + 'RemediationFilters', + 'SummarizeResults', + 'Summary', + 'SummaryResults', + 'TrackedResourceModificationDetails', + 'TypedErrorInfo', 'PolicyTrackedResourcePaged', 'RemediationDeploymentPaged', 'RemediationPaged', diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models.py new file mode 100644 index 000000000000..f278bd2f3bc1 --- /dev/null +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models.py @@ -0,0 +1,1270 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComplianceDetail(Model): + """The compliance state rollup. + + :param compliance_state: The compliance state. + :type compliance_state: str + :param count: Summarized count value for this compliance state. + :type count: int + """ + + _attribute_map = { + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComplianceDetail, self).__init__(**kwargs) + self.compliance_state = kwargs.get('compliance_state', None) + self.count = kwargs.get('count', None) + + +class ErrorDefinition(Model): + """Error definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Service specific error code which serves as the substatus for + the HTTP error code. + :vartype code: str + :ivar message: Description of the error. + :vartype message: str + :ivar target: The target of the error. + :vartype target: str + :ivar details: Internal error details. + :vartype details: list[~azure.mgmt.policyinsights.models.ErrorDefinition] + :ivar additional_info: Additional scenario specific error details. + :vartype additional_info: + list[~azure.mgmt.policyinsights.models.TypedErrorInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[TypedErrorInfo]'}, + } + + def __init__(self, **kwargs): + super(ErrorDefinition, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(Model): + """Error response. + + :param error: The error details. + :type error: ~azure.mgmt.policyinsights.models.ErrorDefinition + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ExpressionEvaluationDetails(Model): + """Evaluation details of policy language expressions. + + :param result: Evaluation result. + :type result: str + :param expression: Expression evaluated. + :type expression: str + :param path: Property path if the expression is a field or an alias. + :type path: str + :param expression_value: Value of the expression. + :type expression_value: object + :param target_value: Target value to be compared with the expression + value. + :type target_value: object + :param operator: Operator to compare the expression value and the target + value. + :type operator: str + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'expression': {'key': 'expression', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'expression_value': {'key': 'expressionValue', 'type': 'object'}, + 'target_value': {'key': 'targetValue', 'type': 'object'}, + 'operator': {'key': 'operator', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressionEvaluationDetails, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + self.expression = kwargs.get('expression', None) + self.path = kwargs.get('path', None) + self.expression_value = kwargs.get('expression_value', None) + self.target_value = kwargs.get('target_value', None) + self.operator = kwargs.get('operator', None) + + +class IfNotExistsEvaluationDetails(Model): + """Evaluation details of IfNotExists effect. + + :param resource_id: ID of the last evaluated resource for IfNotExists + effect. + :type resource_id: str + :param total_resources: Total number of resources to which the existence + condition is applicable. + :type total_resources: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'total_resources': {'key': 'totalResources', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IfNotExistsEvaluationDetails, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.total_resources = kwargs.get('total_resources', None) + + +class Operation(Model): + """Operation definition. + + :param name: Operation name. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.policyinsights.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Resource provider name. + :type provider: str + :param resource: Resource name on which the operation is performed. + :type resource: str + :param operation: Operation name. + :type operation: str + :param description: Operation description. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationsListResults(Model): + """List of available operations. + + :param odatacount: OData entity count; represents the number of operations + returned. + :type odatacount: int + :param value: List of available operations. + :type value: list[~azure.mgmt.policyinsights.models.Operation] + """ + + _validation = { + 'odatacount': {'minimum': 1}, + } + + _attribute_map = { + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs): + super(OperationsListResults, self).__init__(**kwargs) + self.odatacount = kwargs.get('odatacount', None) + self.value = kwargs.get('value', None) + + +class PolicyAssignmentSummary(Model): + """Policy assignment summary. + + :param policy_assignment_id: Policy assignment ID. + :type policy_assignment_id: str + :param policy_set_definition_id: Policy set definition ID, if the policy + assignment is for a policy set. + :type policy_set_definition_id: str + :param results: Compliance summary for the policy assignment. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + :param policy_definitions: Policy definitions summary. + :type policy_definitions: + list[~azure.mgmt.policyinsights.models.PolicyDefinitionSummary] + :param policy_groups: Policy definition group summary. + :type policy_groups: + list[~azure.mgmt.policyinsights.models.PolicyGroupSummary] + """ + + _attribute_map = { + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + 'policy_definitions': {'key': 'policyDefinitions', 'type': '[PolicyDefinitionSummary]'}, + 'policy_groups': {'key': 'policyGroups', 'type': '[PolicyGroupSummary]'}, + } + + def __init__(self, **kwargs): + super(PolicyAssignmentSummary, self).__init__(**kwargs) + self.policy_assignment_id = kwargs.get('policy_assignment_id', None) + self.policy_set_definition_id = kwargs.get('policy_set_definition_id', None) + self.results = kwargs.get('results', None) + self.policy_definitions = kwargs.get('policy_definitions', None) + self.policy_groups = kwargs.get('policy_groups', None) + + +class PolicyDefinitionSummary(Model): + """Policy definition summary. + + :param policy_definition_id: Policy definition ID. + :type policy_definition_id: str + :param policy_definition_reference_id: Policy definition reference ID. + :type policy_definition_reference_id: str + :param policy_definition_group_names: Policy definition group names. + :type policy_definition_group_names: list[str] + :param effect: Policy effect, i.e. policy definition action. + :type effect: str + :param results: Compliance summary for the policy definition. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + """ + + _attribute_map = { + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'policy_definition_group_names': {'key': 'policyDefinitionGroupNames', 'type': '[str]'}, + 'effect': {'key': 'effect', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + } + + def __init__(self, **kwargs): + super(PolicyDefinitionSummary, self).__init__(**kwargs) + self.policy_definition_id = kwargs.get('policy_definition_id', None) + self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) + self.policy_definition_group_names = kwargs.get('policy_definition_group_names', None) + self.effect = kwargs.get('effect', None) + self.results = kwargs.get('results', None) + + +class PolicyDetails(Model): + """The policy details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar policy_definition_id: The ID of the policy definition. + :vartype policy_definition_id: str + :ivar policy_assignment_id: The ID of the policy assignment. + :vartype policy_assignment_id: str + :ivar policy_assignment_display_name: The display name of the policy + assignment. + :vartype policy_assignment_display_name: str + :ivar policy_assignment_scope: The scope of the policy assignment. + :vartype policy_assignment_scope: str + :ivar policy_set_definition_id: The ID of the policy set definition. + :vartype policy_set_definition_id: str + :ivar policy_definition_reference_id: The policy definition reference ID + within the policy set definition. + :vartype policy_definition_reference_id: str + """ + + _validation = { + 'policy_definition_id': {'readonly': True}, + 'policy_assignment_id': {'readonly': True}, + 'policy_assignment_display_name': {'readonly': True}, + 'policy_assignment_scope': {'readonly': True}, + 'policy_set_definition_id': {'readonly': True}, + 'policy_definition_reference_id': {'readonly': True}, + } + + _attribute_map = { + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_assignment_display_name': {'key': 'policyAssignmentDisplayName', 'type': 'str'}, + 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyDetails, self).__init__(**kwargs) + self.policy_definition_id = None + self.policy_assignment_id = None + self.policy_assignment_display_name = None + self.policy_assignment_scope = None + self.policy_set_definition_id = None + self.policy_definition_reference_id = None + + +class PolicyEvaluationDetails(Model): + """Policy evaluation details. + + :param evaluated_expressions: Details of the evaluated expressions. + :type evaluated_expressions: + list[~azure.mgmt.policyinsights.models.ExpressionEvaluationDetails] + :param if_not_exists_details: Evaluation details of IfNotExists effect. + :type if_not_exists_details: + ~azure.mgmt.policyinsights.models.IfNotExistsEvaluationDetails + """ + + _attribute_map = { + 'evaluated_expressions': {'key': 'evaluatedExpressions', 'type': '[ExpressionEvaluationDetails]'}, + 'if_not_exists_details': {'key': 'ifNotExistsDetails', 'type': 'IfNotExistsEvaluationDetails'}, + } + + def __init__(self, **kwargs): + super(PolicyEvaluationDetails, self).__init__(**kwargs) + self.evaluated_expressions = kwargs.get('evaluated_expressions', None) + self.if_not_exists_details = kwargs.get('if_not_exists_details', None) + + +class PolicyEvent(Model): + """Policy event record. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odataid: OData entity ID; always set to null since policy event + records do not have an entity ID. + :type odataid: str + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param timestamp: Timestamp for the policy event record. + :type timestamp: datetime + :param resource_id: Resource ID. + :type resource_id: str + :param policy_assignment_id: Policy assignment ID. + :type policy_assignment_id: str + :param policy_definition_id: Policy definition ID. + :type policy_definition_id: str + :param effective_parameters: Effective parameters for the policy + assignment. + :type effective_parameters: str + :param is_compliant: Flag which states whether the resource is compliant + against the policy assignment it was evaluated against. + :type is_compliant: bool + :param subscription_id: Subscription ID. + :type subscription_id: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_location: Resource location. + :type resource_location: str + :param resource_group: Resource group name. + :type resource_group: str + :param resource_tags: List of resource tags. + :type resource_tags: str + :param policy_assignment_name: Policy assignment name. + :type policy_assignment_name: str + :param policy_assignment_owner: Policy assignment owner. + :type policy_assignment_owner: str + :param policy_assignment_parameters: Policy assignment parameters. + :type policy_assignment_parameters: str + :param policy_assignment_scope: Policy assignment scope. + :type policy_assignment_scope: str + :param policy_definition_name: Policy definition name. + :type policy_definition_name: str + :param policy_definition_action: Policy definition action, i.e. effect. + :type policy_definition_action: str + :param policy_definition_category: Policy definition category. + :type policy_definition_category: str + :param policy_set_definition_id: Policy set definition ID, if the policy + assignment is for a policy set. + :type policy_set_definition_id: str + :param policy_set_definition_name: Policy set definition name, if the + policy assignment is for a policy set. + :type policy_set_definition_name: str + :param policy_set_definition_owner: Policy set definition owner, if the + policy assignment is for a policy set. + :type policy_set_definition_owner: str + :param policy_set_definition_category: Policy set definition category, if + the policy assignment is for a policy set. + :type policy_set_definition_category: str + :param policy_set_definition_parameters: Policy set definition parameters, + if the policy assignment is for a policy set. + :type policy_set_definition_parameters: str + :param management_group_ids: Comma separated list of management group IDs, + which represent the hierarchy of the management groups the resource is + under. + :type management_group_ids: str + :param policy_definition_reference_id: Reference ID for the policy + definition inside the policy set, if the policy assignment is for a policy + set. + :type policy_definition_reference_id: str + :param tenant_id: Tenant ID for the policy event record. + :type tenant_id: str + :param principal_oid: Principal object ID for the user who initiated the + resource operation that triggered the policy event. + :type principal_oid: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odataid': {'key': '@odata\\.id', 'type': 'str'}, + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, + 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, + 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, + 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, + 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, + 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, + 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, + 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, + 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, + 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, + 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, + 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_oid': {'key': 'principalOid', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyEvent, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.odataid = kwargs.get('odataid', None) + self.odatacontext = kwargs.get('odatacontext', None) + self.timestamp = kwargs.get('timestamp', None) + self.resource_id = kwargs.get('resource_id', None) + self.policy_assignment_id = kwargs.get('policy_assignment_id', None) + self.policy_definition_id = kwargs.get('policy_definition_id', None) + self.effective_parameters = kwargs.get('effective_parameters', None) + self.is_compliant = kwargs.get('is_compliant', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_location = kwargs.get('resource_location', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_tags = kwargs.get('resource_tags', None) + self.policy_assignment_name = kwargs.get('policy_assignment_name', None) + self.policy_assignment_owner = kwargs.get('policy_assignment_owner', None) + self.policy_assignment_parameters = kwargs.get('policy_assignment_parameters', None) + self.policy_assignment_scope = kwargs.get('policy_assignment_scope', None) + self.policy_definition_name = kwargs.get('policy_definition_name', None) + self.policy_definition_action = kwargs.get('policy_definition_action', None) + self.policy_definition_category = kwargs.get('policy_definition_category', None) + self.policy_set_definition_id = kwargs.get('policy_set_definition_id', None) + self.policy_set_definition_name = kwargs.get('policy_set_definition_name', None) + self.policy_set_definition_owner = kwargs.get('policy_set_definition_owner', None) + self.policy_set_definition_category = kwargs.get('policy_set_definition_category', None) + self.policy_set_definition_parameters = kwargs.get('policy_set_definition_parameters', None) + self.management_group_ids = kwargs.get('management_group_ids', None) + self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.principal_oid = kwargs.get('principal_oid', None) + + +class PolicyEventsQueryResults(Model): + """Query results. + + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param odatacount: OData entity count; represents the number of policy + event records returned. + :type odatacount: int + :param value: Query results. + :type value: list[~azure.mgmt.policyinsights.models.PolicyEvent] + """ + + _validation = { + 'odatacount': {'minimum': 0}, + } + + _attribute_map = { + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[PolicyEvent]'}, + } + + def __init__(self, **kwargs): + super(PolicyEventsQueryResults, self).__init__(**kwargs) + self.odatacontext = kwargs.get('odatacontext', None) + self.odatacount = kwargs.get('odatacount', None) + self.value = kwargs.get('value', None) + + +class PolicyGroupSummary(Model): + """Policy definition group summary. + + :param policy_group_name: Policy group name. + :type policy_group_name: str + :param results: Compliance summary for the policy definition group. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + """ + + _attribute_map = { + 'policy_group_name': {'key': 'policyGroupName', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + } + + def __init__(self, **kwargs): + super(PolicyGroupSummary, self).__init__(**kwargs) + self.policy_group_name = kwargs.get('policy_group_name', None) + self.results = kwargs.get('results', None) + + +class PolicyState(Model): + """Policy state record. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odataid: OData entity ID; always set to null since policy state + records do not have an entity ID. + :type odataid: str + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param timestamp: Timestamp for the policy state record. + :type timestamp: datetime + :param resource_id: Resource ID. + :type resource_id: str + :param policy_assignment_id: Policy assignment ID. + :type policy_assignment_id: str + :param policy_definition_id: Policy definition ID. + :type policy_definition_id: str + :param effective_parameters: Effective parameters for the policy + assignment. + :type effective_parameters: str + :param is_compliant: Flag which states whether the resource is compliant + against the policy assignment it was evaluated against. This property is + deprecated; please use ComplianceState instead. + :type is_compliant: bool + :param subscription_id: Subscription ID. + :type subscription_id: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_location: Resource location. + :type resource_location: str + :param resource_group: Resource group name. + :type resource_group: str + :param resource_tags: List of resource tags. + :type resource_tags: str + :param policy_assignment_name: Policy assignment name. + :type policy_assignment_name: str + :param policy_assignment_owner: Policy assignment owner. + :type policy_assignment_owner: str + :param policy_assignment_parameters: Policy assignment parameters. + :type policy_assignment_parameters: str + :param policy_assignment_scope: Policy assignment scope. + :type policy_assignment_scope: str + :param policy_definition_name: Policy definition name. + :type policy_definition_name: str + :param policy_definition_action: Policy definition action, i.e. effect. + :type policy_definition_action: str + :param policy_definition_category: Policy definition category. + :type policy_definition_category: str + :param policy_set_definition_id: Policy set definition ID, if the policy + assignment is for a policy set. + :type policy_set_definition_id: str + :param policy_set_definition_name: Policy set definition name, if the + policy assignment is for a policy set. + :type policy_set_definition_name: str + :param policy_set_definition_owner: Policy set definition owner, if the + policy assignment is for a policy set. + :type policy_set_definition_owner: str + :param policy_set_definition_category: Policy set definition category, if + the policy assignment is for a policy set. + :type policy_set_definition_category: str + :param policy_set_definition_parameters: Policy set definition parameters, + if the policy assignment is for a policy set. + :type policy_set_definition_parameters: str + :param management_group_ids: Comma separated list of management group IDs, + which represent the hierarchy of the management groups the resource is + under. + :type management_group_ids: str + :param policy_definition_reference_id: Reference ID for the policy + definition inside the policy set, if the policy assignment is for a policy + set. + :type policy_definition_reference_id: str + :param compliance_state: Compliance state of the resource. + :type compliance_state: str + :param policy_evaluation_details: Policy evaluation details. + :type policy_evaluation_details: + ~azure.mgmt.policyinsights.models.PolicyEvaluationDetails + :param policy_definition_group_names: Policy definition group names. + :type policy_definition_group_names: list[str] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odataid': {'key': '@odata\\.id', 'type': 'str'}, + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, + 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, + 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, + 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, + 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, + 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, + 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, + 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, + 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, + 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, + 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, + 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'policy_evaluation_details': {'key': 'policyEvaluationDetails', 'type': 'PolicyEvaluationDetails'}, + 'policy_definition_group_names': {'key': 'policyDefinitionGroupNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PolicyState, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.odataid = kwargs.get('odataid', None) + self.odatacontext = kwargs.get('odatacontext', None) + self.timestamp = kwargs.get('timestamp', None) + self.resource_id = kwargs.get('resource_id', None) + self.policy_assignment_id = kwargs.get('policy_assignment_id', None) + self.policy_definition_id = kwargs.get('policy_definition_id', None) + self.effective_parameters = kwargs.get('effective_parameters', None) + self.is_compliant = kwargs.get('is_compliant', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_location = kwargs.get('resource_location', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_tags = kwargs.get('resource_tags', None) + self.policy_assignment_name = kwargs.get('policy_assignment_name', None) + self.policy_assignment_owner = kwargs.get('policy_assignment_owner', None) + self.policy_assignment_parameters = kwargs.get('policy_assignment_parameters', None) + self.policy_assignment_scope = kwargs.get('policy_assignment_scope', None) + self.policy_definition_name = kwargs.get('policy_definition_name', None) + self.policy_definition_action = kwargs.get('policy_definition_action', None) + self.policy_definition_category = kwargs.get('policy_definition_category', None) + self.policy_set_definition_id = kwargs.get('policy_set_definition_id', None) + self.policy_set_definition_name = kwargs.get('policy_set_definition_name', None) + self.policy_set_definition_owner = kwargs.get('policy_set_definition_owner', None) + self.policy_set_definition_category = kwargs.get('policy_set_definition_category', None) + self.policy_set_definition_parameters = kwargs.get('policy_set_definition_parameters', None) + self.management_group_ids = kwargs.get('management_group_ids', None) + self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) + self.compliance_state = kwargs.get('compliance_state', None) + self.policy_evaluation_details = kwargs.get('policy_evaluation_details', None) + self.policy_definition_group_names = kwargs.get('policy_definition_group_names', None) + + +class PolicyStatesQueryResults(Model): + """Query results. + + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param odatacount: OData entity count; represents the number of policy + state records returned. + :type odatacount: int + :param value: Query results. + :type value: list[~azure.mgmt.policyinsights.models.PolicyState] + """ + + _validation = { + 'odatacount': {'minimum': 0}, + } + + _attribute_map = { + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[PolicyState]'}, + } + + def __init__(self, **kwargs): + super(PolicyStatesQueryResults, self).__init__(**kwargs) + self.odatacontext = kwargs.get('odatacontext', None) + self.odatacount = kwargs.get('odatacount', None) + self.value = kwargs.get('value', None) + + +class PolicyTrackedResource(Model): + """Policy tracked resource record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tracked_resource_id: The ID of the policy tracked resource. + :vartype tracked_resource_id: str + :ivar policy_details: The details of the policy that require the tracked + resource. + :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails + :ivar created_by: The details of the policy triggered deployment that + created the tracked resource. + :vartype created_by: + ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails + :ivar last_modified_by: The details of the policy triggered deployment + that modified the tracked resource. + :vartype last_modified_by: + ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails + :ivar last_update_utc: Timestamp of the last update to the tracked + resource. + :vartype last_update_utc: datetime + """ + + _validation = { + 'tracked_resource_id': {'readonly': True}, + 'policy_details': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_update_utc': {'readonly': True}, + } + + _attribute_map = { + 'tracked_resource_id': {'key': 'trackedResourceId', 'type': 'str'}, + 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, + 'created_by': {'key': 'createdBy', 'type': 'TrackedResourceModificationDetails'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'TrackedResourceModificationDetails'}, + 'last_update_utc': {'key': 'lastUpdateUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(PolicyTrackedResource, self).__init__(**kwargs) + self.tracked_resource_id = None + self.policy_details = None + self.created_by = None + self.last_modified_by = None + self.last_update_utc = None + + +class QueryFailure(Model): + """Error response. + + :param error: Error definition. + :type error: ~azure.mgmt.policyinsights.models.QueryFailureError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'QueryFailureError'}, + } + + def __init__(self, **kwargs): + super(QueryFailure, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class QueryFailureException(HttpOperationError): + """Server responsed with exception of type: 'QueryFailure'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(QueryFailureException, self).__init__(deserialize, response, 'QueryFailure', *args) + + +class QueryFailureError(Model): + """Error definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Service specific error code which serves as the substatus for + the HTTP error code. + :vartype code: str + :ivar message: Description of the error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryFailureError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class QueryOptions(Model): + """Additional parameters for a set of operations. + + :param top: Maximum number of records to return. + :type top: int + :param filter: OData filter expression. + :type filter: str + :param order_by: 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". + :type order_by: str + :param select: Select expression using OData notation. Limits the columns + on each record to just those requested, e.g. "$select=PolicyAssignmentId, + ResourceId". + :type select: str + :param from_property: ISO 8601 formatted timestamp specifying the start + time of the interval to query. When not specified, the service uses ($to - + 1-day). + :type from_property: datetime + :param to: ISO 8601 formatted timestamp specifying the end time of the + interval to query. When not specified, the service uses request time. + :type to: datetime + :param apply: OData apply expression for aggregations. + :type apply: str + :param expand: The $expand query parameter. For example, to expand + policyEvaluationDetails, use $expand=policyEvaluationDetails + :type expand: str + """ + + _attribute_map = { + 'top': {'key': '', 'type': 'int'}, + 'filter': {'key': '', 'type': 'str'}, + 'order_by': {'key': '', 'type': 'str'}, + 'select': {'key': '', 'type': 'str'}, + 'from_property': {'key': '', 'type': 'iso-8601'}, + 'to': {'key': '', 'type': 'iso-8601'}, + 'apply': {'key': '', 'type': 'str'}, + 'expand': {'key': '', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryOptions, self).__init__(**kwargs) + self.top = kwargs.get('top', None) + self.filter = kwargs.get('filter', None) + self.order_by = kwargs.get('order_by', None) + self.select = kwargs.get('select', None) + self.from_property = kwargs.get('from_property', None) + self.to = kwargs.get('to', None) + self.apply = kwargs.get('apply', None) + self.expand = kwargs.get('expand', None) + + +class Remediation(Model): + """The remediation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param policy_assignment_id: The resource ID of the policy assignment that + should be remediated. + :type policy_assignment_id: str + :param policy_definition_reference_id: 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. + :type policy_definition_reference_id: str + :ivar provisioning_state: The status of the remediation. + :vartype provisioning_state: str + :ivar created_on: The time at which the remediation was created. + :vartype created_on: datetime + :ivar last_updated_on: The time at which the remediation was last updated. + :vartype last_updated_on: datetime + :param filters: The filters that will be applied to determine which + resources to remediate. + :type filters: ~azure.mgmt.policyinsights.models.RemediationFilters + :param deployment_status: The deployment status summary for all + deployments created by the remediation. + :type deployment_status: + ~azure.mgmt.policyinsights.models.RemediationDeploymentSummary + :ivar id: The ID of the remediation. + :vartype id: str + :ivar type: The type of the remediation. + :vartype type: str + :ivar name: The name of the remediation. + :vartype name: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'last_updated_on': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'policy_assignment_id': {'key': 'properties.policyAssignmentId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'properties.policyDefinitionReferenceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, + 'filters': {'key': 'properties.filters', 'type': 'RemediationFilters'}, + 'deployment_status': {'key': 'properties.deploymentStatus', 'type': 'RemediationDeploymentSummary'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Remediation, self).__init__(**kwargs) + self.policy_assignment_id = kwargs.get('policy_assignment_id', None) + self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) + self.provisioning_state = None + self.created_on = None + self.last_updated_on = None + self.filters = kwargs.get('filters', None) + self.deployment_status = kwargs.get('deployment_status', None) + self.id = None + self.type = None + self.name = None + + +class RemediationDeployment(Model): + """Details of a single deployment created by the remediation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar remediated_resource_id: Resource ID of the resource that is being + remediated by the deployment. + :vartype remediated_resource_id: str + :ivar deployment_id: Resource ID of the template deployment that will + remediate the resource. + :vartype deployment_id: str + :ivar status: Status of the remediation deployment. + :vartype status: str + :ivar resource_location: Location of the resource that is being + remediated. + :vartype resource_location: str + :ivar error: Error encountered while remediated the resource. + :vartype error: ~azure.mgmt.policyinsights.models.ErrorDefinition + :ivar created_on: The time at which the remediation was created. + :vartype created_on: datetime + :ivar last_updated_on: The time at which the remediation deployment was + last updated. + :vartype last_updated_on: datetime + """ + + _validation = { + 'remediated_resource_id': {'readonly': True}, + 'deployment_id': {'readonly': True}, + 'status': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'error': {'readonly': True}, + 'created_on': {'readonly': True}, + 'last_updated_on': {'readonly': True}, + } + + _attribute_map = { + 'remediated_resource_id': {'key': 'remediatedResourceId', 'type': 'str'}, + 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'lastUpdatedOn', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RemediationDeployment, self).__init__(**kwargs) + self.remediated_resource_id = None + self.deployment_id = None + self.status = None + self.resource_location = None + self.error = None + self.created_on = None + self.last_updated_on = None + + +class RemediationDeploymentSummary(Model): + """The deployment status summary for all deployments created by the + remediation. + + :param total_deployments: The number of deployments required by the + remediation. + :type total_deployments: int + :param successful_deployments: The number of deployments required by the + remediation that have succeeded. + :type successful_deployments: int + :param failed_deployments: The number of deployments required by the + remediation that have failed. + :type failed_deployments: int + """ + + _attribute_map = { + 'total_deployments': {'key': 'totalDeployments', 'type': 'int'}, + 'successful_deployments': {'key': 'successfulDeployments', 'type': 'int'}, + 'failed_deployments': {'key': 'failedDeployments', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RemediationDeploymentSummary, self).__init__(**kwargs) + self.total_deployments = kwargs.get('total_deployments', None) + self.successful_deployments = kwargs.get('successful_deployments', None) + self.failed_deployments = kwargs.get('failed_deployments', None) + + +class RemediationFilters(Model): + """The filters that will be applied to determine which resources to remediate. + + :param locations: The resource locations that will be remediated. + :type locations: list[str] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RemediationFilters, self).__init__(**kwargs) + self.locations = kwargs.get('locations', None) + + +class SummarizeResults(Model): + """Summarize action results. + + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param odatacount: OData entity count; represents the number of summaries + returned; always set to 1. + :type odatacount: int + :param value: Summarize action results. + :type value: list[~azure.mgmt.policyinsights.models.Summary] + """ + + _validation = { + 'odatacount': {'maximum': 1, 'minimum': 1}, + } + + _attribute_map = { + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[Summary]'}, + } + + def __init__(self, **kwargs): + super(SummarizeResults, self).__init__(**kwargs) + self.odatacontext = kwargs.get('odatacontext', None) + self.odatacount = kwargs.get('odatacount', None) + self.value = kwargs.get('value', None) + + +class Summary(Model): + """Summary results. + + :param odataid: OData entity ID; always set to null since summaries do not + have an entity ID. + :type odataid: str + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param results: Compliance summary for all policy assignments. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + :param policy_assignments: Policy assignments summary. + :type policy_assignments: + list[~azure.mgmt.policyinsights.models.PolicyAssignmentSummary] + """ + + _attribute_map = { + 'odataid': {'key': '@odata\\.id', 'type': 'str'}, + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + 'policy_assignments': {'key': 'policyAssignments', 'type': '[PolicyAssignmentSummary]'}, + } + + def __init__(self, **kwargs): + super(Summary, self).__init__(**kwargs) + self.odataid = kwargs.get('odataid', None) + self.odatacontext = kwargs.get('odatacontext', None) + self.results = kwargs.get('results', None) + self.policy_assignments = kwargs.get('policy_assignments', None) + + +class SummaryResults(Model): + """Compliance summary on a particular summary level. + + :param query_results_uri: 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. + :type query_results_uri: str + :param non_compliant_resources: Number of non-compliant resources. + :type non_compliant_resources: int + :param non_compliant_policies: Number of non-compliant policies. + :type non_compliant_policies: int + :param resource_details: The resources summary at this level. + :type resource_details: + list[~azure.mgmt.policyinsights.models.ComplianceDetail] + :param policy_details: 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. + :type policy_details: + list[~azure.mgmt.policyinsights.models.ComplianceDetail] + :param policy_group_details: The policy definition group summary at this + level. + :type policy_group_details: + list[~azure.mgmt.policyinsights.models.ComplianceDetail] + """ + + _validation = { + 'non_compliant_resources': {'minimum': 0}, + 'non_compliant_policies': {'minimum': 0}, + } + + _attribute_map = { + 'query_results_uri': {'key': 'queryResultsUri', 'type': 'str'}, + 'non_compliant_resources': {'key': 'nonCompliantResources', 'type': 'int'}, + 'non_compliant_policies': {'key': 'nonCompliantPolicies', 'type': 'int'}, + 'resource_details': {'key': 'resourceDetails', 'type': '[ComplianceDetail]'}, + 'policy_details': {'key': 'policyDetails', 'type': '[ComplianceDetail]'}, + 'policy_group_details': {'key': 'policyGroupDetails', 'type': '[ComplianceDetail]'}, + } + + def __init__(self, **kwargs): + super(SummaryResults, self).__init__(**kwargs) + self.query_results_uri = kwargs.get('query_results_uri', None) + self.non_compliant_resources = kwargs.get('non_compliant_resources', None) + self.non_compliant_policies = kwargs.get('non_compliant_policies', None) + self.resource_details = kwargs.get('resource_details', None) + self.policy_details = kwargs.get('policy_details', None) + self.policy_group_details = kwargs.get('policy_group_details', None) + + +class TrackedResourceModificationDetails(Model): + """The details of the policy triggered deployment that created or modified the + tracked resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar policy_details: The details of the policy that created or modified + the tracked resource. + :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails + :ivar deployment_id: The ID of the deployment that created or modified the + tracked resource. + :vartype deployment_id: str + :ivar deployment_time: Timestamp of the deployment that created or + modified the tracked resource. + :vartype deployment_time: datetime + """ + + _validation = { + 'policy_details': {'readonly': True}, + 'deployment_id': {'readonly': True}, + 'deployment_time': {'readonly': True}, + } + + _attribute_map = { + 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, + 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, + 'deployment_time': {'key': 'deploymentTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(TrackedResourceModificationDetails, self).__init__(**kwargs) + self.policy_details = None + self.deployment_id = None + self.deployment_time = None + + +class TypedErrorInfo(Model): + """Scenario specific error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of included error details. + :vartype type: str + :ivar info: The scenario specific error details. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(TypedErrorInfo, self).__init__(**kwargs) + self.type = None + self.info = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models_py3.py new file mode 100644 index 000000000000..b52f60f09600 --- /dev/null +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models_py3.py @@ -0,0 +1,1270 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComplianceDetail(Model): + """The compliance state rollup. + + :param compliance_state: The compliance state. + :type compliance_state: str + :param count: Summarized count value for this compliance state. + :type count: int + """ + + _attribute_map = { + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, compliance_state: str=None, count: int=None, **kwargs) -> None: + super(ComplianceDetail, self).__init__(**kwargs) + self.compliance_state = compliance_state + self.count = count + + +class ErrorDefinition(Model): + """Error definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Service specific error code which serves as the substatus for + the HTTP error code. + :vartype code: str + :ivar message: Description of the error. + :vartype message: str + :ivar target: The target of the error. + :vartype target: str + :ivar details: Internal error details. + :vartype details: list[~azure.mgmt.policyinsights.models.ErrorDefinition] + :ivar additional_info: Additional scenario specific error details. + :vartype additional_info: + list[~azure.mgmt.policyinsights.models.TypedErrorInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[TypedErrorInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDefinition, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(Model): + """Error response. + + :param error: The error details. + :type error: ~azure.mgmt.policyinsights.models.ErrorDefinition + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ExpressionEvaluationDetails(Model): + """Evaluation details of policy language expressions. + + :param result: Evaluation result. + :type result: str + :param expression: Expression evaluated. + :type expression: str + :param path: Property path if the expression is a field or an alias. + :type path: str + :param expression_value: Value of the expression. + :type expression_value: object + :param target_value: Target value to be compared with the expression + value. + :type target_value: object + :param operator: Operator to compare the expression value and the target + value. + :type operator: str + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'expression': {'key': 'expression', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'expression_value': {'key': 'expressionValue', 'type': 'object'}, + 'target_value': {'key': 'targetValue', 'type': 'object'}, + 'operator': {'key': 'operator', 'type': 'str'}, + } + + def __init__(self, *, result: str=None, expression: str=None, path: str=None, expression_value=None, target_value=None, operator: str=None, **kwargs) -> None: + super(ExpressionEvaluationDetails, self).__init__(**kwargs) + self.result = result + self.expression = expression + self.path = path + self.expression_value = expression_value + self.target_value = target_value + self.operator = operator + + +class IfNotExistsEvaluationDetails(Model): + """Evaluation details of IfNotExists effect. + + :param resource_id: ID of the last evaluated resource for IfNotExists + effect. + :type resource_id: str + :param total_resources: Total number of resources to which the existence + condition is applicable. + :type total_resources: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'total_resources': {'key': 'totalResources', 'type': 'int'}, + } + + def __init__(self, *, resource_id: str=None, total_resources: int=None, **kwargs) -> None: + super(IfNotExistsEvaluationDetails, self).__init__(**kwargs) + self.resource_id = resource_id + self.total_resources = total_resources + + +class Operation(Model): + """Operation definition. + + :param name: Operation name. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.policyinsights.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Resource provider name. + :type provider: str + :param resource: Resource name on which the operation is performed. + :type resource: str + :param operation: Operation name. + :type operation: str + :param description: Operation description. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationsListResults(Model): + """List of available operations. + + :param odatacount: OData entity count; represents the number of operations + returned. + :type odatacount: int + :param value: List of available operations. + :type value: list[~azure.mgmt.policyinsights.models.Operation] + """ + + _validation = { + 'odatacount': {'minimum': 1}, + } + + _attribute_map = { + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, *, odatacount: int=None, value=None, **kwargs) -> None: + super(OperationsListResults, self).__init__(**kwargs) + self.odatacount = odatacount + self.value = value + + +class PolicyAssignmentSummary(Model): + """Policy assignment summary. + + :param policy_assignment_id: Policy assignment ID. + :type policy_assignment_id: str + :param policy_set_definition_id: Policy set definition ID, if the policy + assignment is for a policy set. + :type policy_set_definition_id: str + :param results: Compliance summary for the policy assignment. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + :param policy_definitions: Policy definitions summary. + :type policy_definitions: + list[~azure.mgmt.policyinsights.models.PolicyDefinitionSummary] + :param policy_groups: Policy definition group summary. + :type policy_groups: + list[~azure.mgmt.policyinsights.models.PolicyGroupSummary] + """ + + _attribute_map = { + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + 'policy_definitions': {'key': 'policyDefinitions', 'type': '[PolicyDefinitionSummary]'}, + 'policy_groups': {'key': 'policyGroups', 'type': '[PolicyGroupSummary]'}, + } + + def __init__(self, *, policy_assignment_id: str=None, policy_set_definition_id: str=None, results=None, policy_definitions=None, policy_groups=None, **kwargs) -> None: + super(PolicyAssignmentSummary, self).__init__(**kwargs) + self.policy_assignment_id = policy_assignment_id + self.policy_set_definition_id = policy_set_definition_id + self.results = results + self.policy_definitions = policy_definitions + self.policy_groups = policy_groups + + +class PolicyDefinitionSummary(Model): + """Policy definition summary. + + :param policy_definition_id: Policy definition ID. + :type policy_definition_id: str + :param policy_definition_reference_id: Policy definition reference ID. + :type policy_definition_reference_id: str + :param policy_definition_group_names: Policy definition group names. + :type policy_definition_group_names: list[str] + :param effect: Policy effect, i.e. policy definition action. + :type effect: str + :param results: Compliance summary for the policy definition. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + """ + + _attribute_map = { + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'policy_definition_group_names': {'key': 'policyDefinitionGroupNames', 'type': '[str]'}, + 'effect': {'key': 'effect', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + } + + def __init__(self, *, policy_definition_id: str=None, policy_definition_reference_id: str=None, policy_definition_group_names=None, effect: str=None, results=None, **kwargs) -> None: + super(PolicyDefinitionSummary, self).__init__(**kwargs) + self.policy_definition_id = policy_definition_id + self.policy_definition_reference_id = policy_definition_reference_id + self.policy_definition_group_names = policy_definition_group_names + self.effect = effect + self.results = results + + +class PolicyDetails(Model): + """The policy details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar policy_definition_id: The ID of the policy definition. + :vartype policy_definition_id: str + :ivar policy_assignment_id: The ID of the policy assignment. + :vartype policy_assignment_id: str + :ivar policy_assignment_display_name: The display name of the policy + assignment. + :vartype policy_assignment_display_name: str + :ivar policy_assignment_scope: The scope of the policy assignment. + :vartype policy_assignment_scope: str + :ivar policy_set_definition_id: The ID of the policy set definition. + :vartype policy_set_definition_id: str + :ivar policy_definition_reference_id: The policy definition reference ID + within the policy set definition. + :vartype policy_definition_reference_id: str + """ + + _validation = { + 'policy_definition_id': {'readonly': True}, + 'policy_assignment_id': {'readonly': True}, + 'policy_assignment_display_name': {'readonly': True}, + 'policy_assignment_scope': {'readonly': True}, + 'policy_set_definition_id': {'readonly': True}, + 'policy_definition_reference_id': {'readonly': True}, + } + + _attribute_map = { + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_assignment_display_name': {'key': 'policyAssignmentDisplayName', 'type': 'str'}, + 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PolicyDetails, self).__init__(**kwargs) + self.policy_definition_id = None + self.policy_assignment_id = None + self.policy_assignment_display_name = None + self.policy_assignment_scope = None + self.policy_set_definition_id = None + self.policy_definition_reference_id = None + + +class PolicyEvaluationDetails(Model): + """Policy evaluation details. + + :param evaluated_expressions: Details of the evaluated expressions. + :type evaluated_expressions: + list[~azure.mgmt.policyinsights.models.ExpressionEvaluationDetails] + :param if_not_exists_details: Evaluation details of IfNotExists effect. + :type if_not_exists_details: + ~azure.mgmt.policyinsights.models.IfNotExistsEvaluationDetails + """ + + _attribute_map = { + 'evaluated_expressions': {'key': 'evaluatedExpressions', 'type': '[ExpressionEvaluationDetails]'}, + 'if_not_exists_details': {'key': 'ifNotExistsDetails', 'type': 'IfNotExistsEvaluationDetails'}, + } + + def __init__(self, *, evaluated_expressions=None, if_not_exists_details=None, **kwargs) -> None: + super(PolicyEvaluationDetails, self).__init__(**kwargs) + self.evaluated_expressions = evaluated_expressions + self.if_not_exists_details = if_not_exists_details + + +class PolicyEvent(Model): + """Policy event record. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odataid: OData entity ID; always set to null since policy event + records do not have an entity ID. + :type odataid: str + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param timestamp: Timestamp for the policy event record. + :type timestamp: datetime + :param resource_id: Resource ID. + :type resource_id: str + :param policy_assignment_id: Policy assignment ID. + :type policy_assignment_id: str + :param policy_definition_id: Policy definition ID. + :type policy_definition_id: str + :param effective_parameters: Effective parameters for the policy + assignment. + :type effective_parameters: str + :param is_compliant: Flag which states whether the resource is compliant + against the policy assignment it was evaluated against. + :type is_compliant: bool + :param subscription_id: Subscription ID. + :type subscription_id: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_location: Resource location. + :type resource_location: str + :param resource_group: Resource group name. + :type resource_group: str + :param resource_tags: List of resource tags. + :type resource_tags: str + :param policy_assignment_name: Policy assignment name. + :type policy_assignment_name: str + :param policy_assignment_owner: Policy assignment owner. + :type policy_assignment_owner: str + :param policy_assignment_parameters: Policy assignment parameters. + :type policy_assignment_parameters: str + :param policy_assignment_scope: Policy assignment scope. + :type policy_assignment_scope: str + :param policy_definition_name: Policy definition name. + :type policy_definition_name: str + :param policy_definition_action: Policy definition action, i.e. effect. + :type policy_definition_action: str + :param policy_definition_category: Policy definition category. + :type policy_definition_category: str + :param policy_set_definition_id: Policy set definition ID, if the policy + assignment is for a policy set. + :type policy_set_definition_id: str + :param policy_set_definition_name: Policy set definition name, if the + policy assignment is for a policy set. + :type policy_set_definition_name: str + :param policy_set_definition_owner: Policy set definition owner, if the + policy assignment is for a policy set. + :type policy_set_definition_owner: str + :param policy_set_definition_category: Policy set definition category, if + the policy assignment is for a policy set. + :type policy_set_definition_category: str + :param policy_set_definition_parameters: Policy set definition parameters, + if the policy assignment is for a policy set. + :type policy_set_definition_parameters: str + :param management_group_ids: Comma separated list of management group IDs, + which represent the hierarchy of the management groups the resource is + under. + :type management_group_ids: str + :param policy_definition_reference_id: Reference ID for the policy + definition inside the policy set, if the policy assignment is for a policy + set. + :type policy_definition_reference_id: str + :param tenant_id: Tenant ID for the policy event record. + :type tenant_id: str + :param principal_oid: Principal object ID for the user who initiated the + resource operation that triggered the policy event. + :type principal_oid: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odataid': {'key': '@odata\\.id', 'type': 'str'}, + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, + 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, + 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, + 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, + 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, + 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, + 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, + 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, + 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, + 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, + 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, + 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_oid': {'key': 'principalOid', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, odataid: str=None, odatacontext: str=None, timestamp=None, resource_id: str=None, policy_assignment_id: str=None, policy_definition_id: str=None, effective_parameters: str=None, is_compliant: bool=None, subscription_id: str=None, resource_type: str=None, resource_location: str=None, resource_group: str=None, resource_tags: str=None, policy_assignment_name: str=None, policy_assignment_owner: str=None, policy_assignment_parameters: str=None, policy_assignment_scope: str=None, policy_definition_name: str=None, policy_definition_action: str=None, policy_definition_category: str=None, policy_set_definition_id: str=None, policy_set_definition_name: str=None, policy_set_definition_owner: str=None, policy_set_definition_category: str=None, policy_set_definition_parameters: str=None, management_group_ids: str=None, policy_definition_reference_id: str=None, tenant_id: str=None, principal_oid: str=None, **kwargs) -> None: + super(PolicyEvent, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.odataid = odataid + self.odatacontext = odatacontext + self.timestamp = timestamp + self.resource_id = resource_id + self.policy_assignment_id = policy_assignment_id + self.policy_definition_id = policy_definition_id + self.effective_parameters = effective_parameters + self.is_compliant = is_compliant + self.subscription_id = subscription_id + self.resource_type = resource_type + self.resource_location = resource_location + self.resource_group = resource_group + self.resource_tags = resource_tags + self.policy_assignment_name = policy_assignment_name + self.policy_assignment_owner = policy_assignment_owner + self.policy_assignment_parameters = policy_assignment_parameters + self.policy_assignment_scope = policy_assignment_scope + self.policy_definition_name = policy_definition_name + self.policy_definition_action = policy_definition_action + self.policy_definition_category = policy_definition_category + self.policy_set_definition_id = policy_set_definition_id + self.policy_set_definition_name = policy_set_definition_name + self.policy_set_definition_owner = policy_set_definition_owner + self.policy_set_definition_category = policy_set_definition_category + self.policy_set_definition_parameters = policy_set_definition_parameters + self.management_group_ids = management_group_ids + self.policy_definition_reference_id = policy_definition_reference_id + self.tenant_id = tenant_id + self.principal_oid = principal_oid + + +class PolicyEventsQueryResults(Model): + """Query results. + + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param odatacount: OData entity count; represents the number of policy + event records returned. + :type odatacount: int + :param value: Query results. + :type value: list[~azure.mgmt.policyinsights.models.PolicyEvent] + """ + + _validation = { + 'odatacount': {'minimum': 0}, + } + + _attribute_map = { + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[PolicyEvent]'}, + } + + def __init__(self, *, odatacontext: str=None, odatacount: int=None, value=None, **kwargs) -> None: + super(PolicyEventsQueryResults, self).__init__(**kwargs) + self.odatacontext = odatacontext + self.odatacount = odatacount + self.value = value + + +class PolicyGroupSummary(Model): + """Policy definition group summary. + + :param policy_group_name: Policy group name. + :type policy_group_name: str + :param results: Compliance summary for the policy definition group. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + """ + + _attribute_map = { + 'policy_group_name': {'key': 'policyGroupName', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + } + + def __init__(self, *, policy_group_name: str=None, results=None, **kwargs) -> None: + super(PolicyGroupSummary, self).__init__(**kwargs) + self.policy_group_name = policy_group_name + self.results = results + + +class PolicyState(Model): + """Policy state record. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odataid: OData entity ID; always set to null since policy state + records do not have an entity ID. + :type odataid: str + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param timestamp: Timestamp for the policy state record. + :type timestamp: datetime + :param resource_id: Resource ID. + :type resource_id: str + :param policy_assignment_id: Policy assignment ID. + :type policy_assignment_id: str + :param policy_definition_id: Policy definition ID. + :type policy_definition_id: str + :param effective_parameters: Effective parameters for the policy + assignment. + :type effective_parameters: str + :param is_compliant: Flag which states whether the resource is compliant + against the policy assignment it was evaluated against. This property is + deprecated; please use ComplianceState instead. + :type is_compliant: bool + :param subscription_id: Subscription ID. + :type subscription_id: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_location: Resource location. + :type resource_location: str + :param resource_group: Resource group name. + :type resource_group: str + :param resource_tags: List of resource tags. + :type resource_tags: str + :param policy_assignment_name: Policy assignment name. + :type policy_assignment_name: str + :param policy_assignment_owner: Policy assignment owner. + :type policy_assignment_owner: str + :param policy_assignment_parameters: Policy assignment parameters. + :type policy_assignment_parameters: str + :param policy_assignment_scope: Policy assignment scope. + :type policy_assignment_scope: str + :param policy_definition_name: Policy definition name. + :type policy_definition_name: str + :param policy_definition_action: Policy definition action, i.e. effect. + :type policy_definition_action: str + :param policy_definition_category: Policy definition category. + :type policy_definition_category: str + :param policy_set_definition_id: Policy set definition ID, if the policy + assignment is for a policy set. + :type policy_set_definition_id: str + :param policy_set_definition_name: Policy set definition name, if the + policy assignment is for a policy set. + :type policy_set_definition_name: str + :param policy_set_definition_owner: Policy set definition owner, if the + policy assignment is for a policy set. + :type policy_set_definition_owner: str + :param policy_set_definition_category: Policy set definition category, if + the policy assignment is for a policy set. + :type policy_set_definition_category: str + :param policy_set_definition_parameters: Policy set definition parameters, + if the policy assignment is for a policy set. + :type policy_set_definition_parameters: str + :param management_group_ids: Comma separated list of management group IDs, + which represent the hierarchy of the management groups the resource is + under. + :type management_group_ids: str + :param policy_definition_reference_id: Reference ID for the policy + definition inside the policy set, if the policy assignment is for a policy + set. + :type policy_definition_reference_id: str + :param compliance_state: Compliance state of the resource. + :type compliance_state: str + :param policy_evaluation_details: Policy evaluation details. + :type policy_evaluation_details: + ~azure.mgmt.policyinsights.models.PolicyEvaluationDetails + :param policy_definition_group_names: Policy definition group names. + :type policy_definition_group_names: list[str] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odataid': {'key': '@odata\\.id', 'type': 'str'}, + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, + 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, + 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, + 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, + 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, + 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, + 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, + 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, + 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, + 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, + 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, + 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, + 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, + 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'policy_evaluation_details': {'key': 'policyEvaluationDetails', 'type': 'PolicyEvaluationDetails'}, + 'policy_definition_group_names': {'key': 'policyDefinitionGroupNames', 'type': '[str]'}, + } + + def __init__(self, *, additional_properties=None, odataid: str=None, odatacontext: str=None, timestamp=None, resource_id: str=None, policy_assignment_id: str=None, policy_definition_id: str=None, effective_parameters: str=None, is_compliant: bool=None, subscription_id: str=None, resource_type: str=None, resource_location: str=None, resource_group: str=None, resource_tags: str=None, policy_assignment_name: str=None, policy_assignment_owner: str=None, policy_assignment_parameters: str=None, policy_assignment_scope: str=None, policy_definition_name: str=None, policy_definition_action: str=None, policy_definition_category: str=None, policy_set_definition_id: str=None, policy_set_definition_name: str=None, policy_set_definition_owner: str=None, policy_set_definition_category: str=None, policy_set_definition_parameters: str=None, management_group_ids: str=None, policy_definition_reference_id: str=None, compliance_state: str=None, policy_evaluation_details=None, policy_definition_group_names=None, **kwargs) -> None: + super(PolicyState, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.odataid = odataid + self.odatacontext = odatacontext + self.timestamp = timestamp + self.resource_id = resource_id + self.policy_assignment_id = policy_assignment_id + self.policy_definition_id = policy_definition_id + self.effective_parameters = effective_parameters + self.is_compliant = is_compliant + self.subscription_id = subscription_id + self.resource_type = resource_type + self.resource_location = resource_location + self.resource_group = resource_group + self.resource_tags = resource_tags + self.policy_assignment_name = policy_assignment_name + self.policy_assignment_owner = policy_assignment_owner + self.policy_assignment_parameters = policy_assignment_parameters + self.policy_assignment_scope = policy_assignment_scope + self.policy_definition_name = policy_definition_name + self.policy_definition_action = policy_definition_action + self.policy_definition_category = policy_definition_category + self.policy_set_definition_id = policy_set_definition_id + self.policy_set_definition_name = policy_set_definition_name + self.policy_set_definition_owner = policy_set_definition_owner + self.policy_set_definition_category = policy_set_definition_category + self.policy_set_definition_parameters = policy_set_definition_parameters + self.management_group_ids = management_group_ids + self.policy_definition_reference_id = policy_definition_reference_id + self.compliance_state = compliance_state + self.policy_evaluation_details = policy_evaluation_details + self.policy_definition_group_names = policy_definition_group_names + + +class PolicyStatesQueryResults(Model): + """Query results. + + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param odatacount: OData entity count; represents the number of policy + state records returned. + :type odatacount: int + :param value: Query results. + :type value: list[~azure.mgmt.policyinsights.models.PolicyState] + """ + + _validation = { + 'odatacount': {'minimum': 0}, + } + + _attribute_map = { + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[PolicyState]'}, + } + + def __init__(self, *, odatacontext: str=None, odatacount: int=None, value=None, **kwargs) -> None: + super(PolicyStatesQueryResults, self).__init__(**kwargs) + self.odatacontext = odatacontext + self.odatacount = odatacount + self.value = value + + +class PolicyTrackedResource(Model): + """Policy tracked resource record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tracked_resource_id: The ID of the policy tracked resource. + :vartype tracked_resource_id: str + :ivar policy_details: The details of the policy that require the tracked + resource. + :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails + :ivar created_by: The details of the policy triggered deployment that + created the tracked resource. + :vartype created_by: + ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails + :ivar last_modified_by: The details of the policy triggered deployment + that modified the tracked resource. + :vartype last_modified_by: + ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails + :ivar last_update_utc: Timestamp of the last update to the tracked + resource. + :vartype last_update_utc: datetime + """ + + _validation = { + 'tracked_resource_id': {'readonly': True}, + 'policy_details': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_update_utc': {'readonly': True}, + } + + _attribute_map = { + 'tracked_resource_id': {'key': 'trackedResourceId', 'type': 'str'}, + 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, + 'created_by': {'key': 'createdBy', 'type': 'TrackedResourceModificationDetails'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'TrackedResourceModificationDetails'}, + 'last_update_utc': {'key': 'lastUpdateUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(PolicyTrackedResource, self).__init__(**kwargs) + self.tracked_resource_id = None + self.policy_details = None + self.created_by = None + self.last_modified_by = None + self.last_update_utc = None + + +class QueryFailure(Model): + """Error response. + + :param error: Error definition. + :type error: ~azure.mgmt.policyinsights.models.QueryFailureError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'QueryFailureError'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(QueryFailure, self).__init__(**kwargs) + self.error = error + + +class QueryFailureException(HttpOperationError): + """Server responsed with exception of type: 'QueryFailure'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(QueryFailureException, self).__init__(deserialize, response, 'QueryFailure', *args) + + +class QueryFailureError(Model): + """Error definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Service specific error code which serves as the substatus for + the HTTP error code. + :vartype code: str + :ivar message: Description of the error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(QueryFailureError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class QueryOptions(Model): + """Additional parameters for a set of operations. + + :param top: Maximum number of records to return. + :type top: int + :param filter: OData filter expression. + :type filter: str + :param order_by: 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". + :type order_by: str + :param select: Select expression using OData notation. Limits the columns + on each record to just those requested, e.g. "$select=PolicyAssignmentId, + ResourceId". + :type select: str + :param from_property: ISO 8601 formatted timestamp specifying the start + time of the interval to query. When not specified, the service uses ($to - + 1-day). + :type from_property: datetime + :param to: ISO 8601 formatted timestamp specifying the end time of the + interval to query. When not specified, the service uses request time. + :type to: datetime + :param apply: OData apply expression for aggregations. + :type apply: str + :param expand: The $expand query parameter. For example, to expand + policyEvaluationDetails, use $expand=policyEvaluationDetails + :type expand: str + """ + + _attribute_map = { + 'top': {'key': '', 'type': 'int'}, + 'filter': {'key': '', 'type': 'str'}, + 'order_by': {'key': '', 'type': 'str'}, + 'select': {'key': '', 'type': 'str'}, + 'from_property': {'key': '', 'type': 'iso-8601'}, + 'to': {'key': '', 'type': 'iso-8601'}, + 'apply': {'key': '', 'type': 'str'}, + 'expand': {'key': '', 'type': 'str'}, + } + + def __init__(self, *, top: int=None, filter: str=None, order_by: str=None, select: str=None, from_property=None, to=None, apply: str=None, expand: str=None, **kwargs) -> None: + super(QueryOptions, self).__init__(**kwargs) + self.top = top + self.filter = filter + self.order_by = order_by + self.select = select + self.from_property = from_property + self.to = to + self.apply = apply + self.expand = expand + + +class Remediation(Model): + """The remediation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param policy_assignment_id: The resource ID of the policy assignment that + should be remediated. + :type policy_assignment_id: str + :param policy_definition_reference_id: 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. + :type policy_definition_reference_id: str + :ivar provisioning_state: The status of the remediation. + :vartype provisioning_state: str + :ivar created_on: The time at which the remediation was created. + :vartype created_on: datetime + :ivar last_updated_on: The time at which the remediation was last updated. + :vartype last_updated_on: datetime + :param filters: The filters that will be applied to determine which + resources to remediate. + :type filters: ~azure.mgmt.policyinsights.models.RemediationFilters + :param deployment_status: The deployment status summary for all + deployments created by the remediation. + :type deployment_status: + ~azure.mgmt.policyinsights.models.RemediationDeploymentSummary + :ivar id: The ID of the remediation. + :vartype id: str + :ivar type: The type of the remediation. + :vartype type: str + :ivar name: The name of the remediation. + :vartype name: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'last_updated_on': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'policy_assignment_id': {'key': 'properties.policyAssignmentId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'properties.policyDefinitionReferenceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, + 'filters': {'key': 'properties.filters', 'type': 'RemediationFilters'}, + 'deployment_status': {'key': 'properties.deploymentStatus', 'type': 'RemediationDeploymentSummary'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, policy_assignment_id: str=None, policy_definition_reference_id: str=None, filters=None, deployment_status=None, **kwargs) -> None: + super(Remediation, self).__init__(**kwargs) + self.policy_assignment_id = policy_assignment_id + self.policy_definition_reference_id = policy_definition_reference_id + self.provisioning_state = None + self.created_on = None + self.last_updated_on = None + self.filters = filters + self.deployment_status = deployment_status + self.id = None + self.type = None + self.name = None + + +class RemediationDeployment(Model): + """Details of a single deployment created by the remediation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar remediated_resource_id: Resource ID of the resource that is being + remediated by the deployment. + :vartype remediated_resource_id: str + :ivar deployment_id: Resource ID of the template deployment that will + remediate the resource. + :vartype deployment_id: str + :ivar status: Status of the remediation deployment. + :vartype status: str + :ivar resource_location: Location of the resource that is being + remediated. + :vartype resource_location: str + :ivar error: Error encountered while remediated the resource. + :vartype error: ~azure.mgmt.policyinsights.models.ErrorDefinition + :ivar created_on: The time at which the remediation was created. + :vartype created_on: datetime + :ivar last_updated_on: The time at which the remediation deployment was + last updated. + :vartype last_updated_on: datetime + """ + + _validation = { + 'remediated_resource_id': {'readonly': True}, + 'deployment_id': {'readonly': True}, + 'status': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'error': {'readonly': True}, + 'created_on': {'readonly': True}, + 'last_updated_on': {'readonly': True}, + } + + _attribute_map = { + 'remediated_resource_id': {'key': 'remediatedResourceId', 'type': 'str'}, + 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'lastUpdatedOn', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RemediationDeployment, self).__init__(**kwargs) + self.remediated_resource_id = None + self.deployment_id = None + self.status = None + self.resource_location = None + self.error = None + self.created_on = None + self.last_updated_on = None + + +class RemediationDeploymentSummary(Model): + """The deployment status summary for all deployments created by the + remediation. + + :param total_deployments: The number of deployments required by the + remediation. + :type total_deployments: int + :param successful_deployments: The number of deployments required by the + remediation that have succeeded. + :type successful_deployments: int + :param failed_deployments: The number of deployments required by the + remediation that have failed. + :type failed_deployments: int + """ + + _attribute_map = { + 'total_deployments': {'key': 'totalDeployments', 'type': 'int'}, + 'successful_deployments': {'key': 'successfulDeployments', 'type': 'int'}, + 'failed_deployments': {'key': 'failedDeployments', 'type': 'int'}, + } + + def __init__(self, *, total_deployments: int=None, successful_deployments: int=None, failed_deployments: int=None, **kwargs) -> None: + super(RemediationDeploymentSummary, self).__init__(**kwargs) + self.total_deployments = total_deployments + self.successful_deployments = successful_deployments + self.failed_deployments = failed_deployments + + +class RemediationFilters(Model): + """The filters that will be applied to determine which resources to remediate. + + :param locations: The resource locations that will be remediated. + :type locations: list[str] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + } + + def __init__(self, *, locations=None, **kwargs) -> None: + super(RemediationFilters, self).__init__(**kwargs) + self.locations = locations + + +class SummarizeResults(Model): + """Summarize action results. + + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param odatacount: OData entity count; represents the number of summaries + returned; always set to 1. + :type odatacount: int + :param value: Summarize action results. + :type value: list[~azure.mgmt.policyinsights.models.Summary] + """ + + _validation = { + 'odatacount': {'maximum': 1, 'minimum': 1}, + } + + _attribute_map = { + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[Summary]'}, + } + + def __init__(self, *, odatacontext: str=None, odatacount: int=None, value=None, **kwargs) -> None: + super(SummarizeResults, self).__init__(**kwargs) + self.odatacontext = odatacontext + self.odatacount = odatacount + self.value = value + + +class Summary(Model): + """Summary results. + + :param odataid: OData entity ID; always set to null since summaries do not + have an entity ID. + :type odataid: str + :param odatacontext: OData context string; used by OData clients to + resolve type information based on metadata. + :type odatacontext: str + :param results: Compliance summary for all policy assignments. + :type results: ~azure.mgmt.policyinsights.models.SummaryResults + :param policy_assignments: Policy assignments summary. + :type policy_assignments: + list[~azure.mgmt.policyinsights.models.PolicyAssignmentSummary] + """ + + _attribute_map = { + 'odataid': {'key': '@odata\\.id', 'type': 'str'}, + 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, + 'results': {'key': 'results', 'type': 'SummaryResults'}, + 'policy_assignments': {'key': 'policyAssignments', 'type': '[PolicyAssignmentSummary]'}, + } + + def __init__(self, *, odataid: str=None, odatacontext: str=None, results=None, policy_assignments=None, **kwargs) -> None: + super(Summary, self).__init__(**kwargs) + self.odataid = odataid + self.odatacontext = odatacontext + self.results = results + self.policy_assignments = policy_assignments + + +class SummaryResults(Model): + """Compliance summary on a particular summary level. + + :param query_results_uri: 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. + :type query_results_uri: str + :param non_compliant_resources: Number of non-compliant resources. + :type non_compliant_resources: int + :param non_compliant_policies: Number of non-compliant policies. + :type non_compliant_policies: int + :param resource_details: The resources summary at this level. + :type resource_details: + list[~azure.mgmt.policyinsights.models.ComplianceDetail] + :param policy_details: 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. + :type policy_details: + list[~azure.mgmt.policyinsights.models.ComplianceDetail] + :param policy_group_details: The policy definition group summary at this + level. + :type policy_group_details: + list[~azure.mgmt.policyinsights.models.ComplianceDetail] + """ + + _validation = { + 'non_compliant_resources': {'minimum': 0}, + 'non_compliant_policies': {'minimum': 0}, + } + + _attribute_map = { + 'query_results_uri': {'key': 'queryResultsUri', 'type': 'str'}, + 'non_compliant_resources': {'key': 'nonCompliantResources', 'type': 'int'}, + 'non_compliant_policies': {'key': 'nonCompliantPolicies', 'type': 'int'}, + 'resource_details': {'key': 'resourceDetails', 'type': '[ComplianceDetail]'}, + 'policy_details': {'key': 'policyDetails', 'type': '[ComplianceDetail]'}, + 'policy_group_details': {'key': 'policyGroupDetails', 'type': '[ComplianceDetail]'}, + } + + def __init__(self, *, query_results_uri: str=None, non_compliant_resources: int=None, non_compliant_policies: int=None, resource_details=None, policy_details=None, policy_group_details=None, **kwargs) -> None: + super(SummaryResults, self).__init__(**kwargs) + self.query_results_uri = query_results_uri + self.non_compliant_resources = non_compliant_resources + self.non_compliant_policies = non_compliant_policies + self.resource_details = resource_details + self.policy_details = policy_details + self.policy_group_details = policy_group_details + + +class TrackedResourceModificationDetails(Model): + """The details of the policy triggered deployment that created or modified the + tracked resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar policy_details: The details of the policy that created or modified + the tracked resource. + :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails + :ivar deployment_id: The ID of the deployment that created or modified the + tracked resource. + :vartype deployment_id: str + :ivar deployment_time: Timestamp of the deployment that created or + modified the tracked resource. + :vartype deployment_time: datetime + """ + + _validation = { + 'policy_details': {'readonly': True}, + 'deployment_id': {'readonly': True}, + 'deployment_time': {'readonly': True}, + } + + _attribute_map = { + 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, + 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, + 'deployment_time': {'key': 'deploymentTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(TrackedResourceModificationDetails, self).__init__(**kwargs) + self.policy_details = None + self.deployment_id = None + self.deployment_time = None + + +class TypedErrorInfo(Model): + """Scenario specific error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of included error details. + :vartype type: str + :ivar info: The scenario specific error details. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + super(TypedErrorInfo, self).__init__(**kwargs) + self.type = None + self.info = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource_paged.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_paged_models.py similarity index 51% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource_paged.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_paged_models.py index f249fd9fbaec..dff90efc6033 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource_paged.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_paged_models.py @@ -25,3 +25,29 @@ class PolicyTrackedResourcePaged(Paged): def __init__(self, *args, **kwargs): super(PolicyTrackedResourcePaged, self).__init__(*args, **kwargs) +class RemediationDeploymentPaged(Paged): + """ + A paging container for iterating over a list of :class:`RemediationDeployment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RemediationDeployment]'} + } + + def __init__(self, *args, **kwargs): + + super(RemediationDeploymentPaged, self).__init__(*args, **kwargs) +class RemediationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Remediation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Remediation]'} + } + + def __init__(self, *args, **kwargs): + + super(RemediationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_insights_client_enums.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_policy_insights_client_enums.py similarity index 100% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_insights_client_enums.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_policy_insights_client_enums.py diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_definition.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_definition.py deleted file mode 100644 index 5db16d77dfd0..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_definition.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDefinition(Model): - """Error definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar target: The target of the error. - :vartype target: str - :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.policyinsights.models.ErrorDefinition] - :ivar additional_info: Additional scenario specific error details. - :vartype additional_info: - list[~azure.mgmt.policyinsights.models.TypedErrorInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[TypedErrorInfo]'}, - } - - def __init__(self, **kwargs): - super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_definition_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_definition_py3.py deleted file mode 100644 index 1f738968b1b5..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_definition_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDefinition(Model): - """Error definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar target: The target of the error. - :vartype target: str - :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.policyinsights.models.ErrorDefinition] - :ivar additional_info: Additional scenario specific error details. - :vartype additional_info: - list[~azure.mgmt.policyinsights.models.TypedErrorInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[TypedErrorInfo]'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_response.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_response.py deleted file mode 100644 index 452e5656cf24..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. - - :param error: The error details. - :type error: ~azure.mgmt.policyinsights.models.ErrorDefinition - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDefinition'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_response_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_response_py3.py deleted file mode 100644 index 01f79dd5417f..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/error_response_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. - - :param error: The error details. - :type error: ~azure.mgmt.policyinsights.models.ErrorDefinition - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDefinition'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/expression_evaluation_details.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/expression_evaluation_details.py deleted file mode 100644 index 6f1cffe56072..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/expression_evaluation_details.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExpressionEvaluationDetails(Model): - """Evaluation details of policy language expressions. - - :param result: Evaluation result. - :type result: str - :param expression: Expression evaluated. - :type expression: str - :param path: Property path if the expression is a field or an alias. - :type path: str - :param expression_value: Value of the expression. - :type expression_value: object - :param target_value: Target value to be compared with the expression - value. - :type target_value: object - :param operator: Operator to compare the expression value and the target - value. - :type operator: str - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'str'}, - 'expression': {'key': 'expression', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'expression_value': {'key': 'expressionValue', 'type': 'object'}, - 'target_value': {'key': 'targetValue', 'type': 'object'}, - 'operator': {'key': 'operator', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExpressionEvaluationDetails, self).__init__(**kwargs) - self.result = kwargs.get('result', None) - self.expression = kwargs.get('expression', None) - self.path = kwargs.get('path', None) - self.expression_value = kwargs.get('expression_value', None) - self.target_value = kwargs.get('target_value', None) - self.operator = kwargs.get('operator', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/expression_evaluation_details_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/expression_evaluation_details_py3.py deleted file mode 100644 index bf873d0c9289..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/expression_evaluation_details_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExpressionEvaluationDetails(Model): - """Evaluation details of policy language expressions. - - :param result: Evaluation result. - :type result: str - :param expression: Expression evaluated. - :type expression: str - :param path: Property path if the expression is a field or an alias. - :type path: str - :param expression_value: Value of the expression. - :type expression_value: object - :param target_value: Target value to be compared with the expression - value. - :type target_value: object - :param operator: Operator to compare the expression value and the target - value. - :type operator: str - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'str'}, - 'expression': {'key': 'expression', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'expression_value': {'key': 'expressionValue', 'type': 'object'}, - 'target_value': {'key': 'targetValue', 'type': 'object'}, - 'operator': {'key': 'operator', 'type': 'str'}, - } - - def __init__(self, *, result: str=None, expression: str=None, path: str=None, expression_value=None, target_value=None, operator: str=None, **kwargs) -> None: - super(ExpressionEvaluationDetails, self).__init__(**kwargs) - self.result = result - self.expression = expression - self.path = path - self.expression_value = expression_value - self.target_value = target_value - self.operator = operator diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/if_not_exists_evaluation_details.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/if_not_exists_evaluation_details.py deleted file mode 100644 index 566bf7fbe379..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/if_not_exists_evaluation_details.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IfNotExistsEvaluationDetails(Model): - """Evaluation details of IfNotExists effect. - - :param resource_id: ID of the last evaluated resource for IfNotExists - effect. - :type resource_id: str - :param total_resources: Total number of resources to which the existence - condition is applicable. - :type total_resources: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'total_resources': {'key': 'totalResources', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(IfNotExistsEvaluationDetails, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.total_resources = kwargs.get('total_resources', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/if_not_exists_evaluation_details_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/if_not_exists_evaluation_details_py3.py deleted file mode 100644 index a6f96de944ad..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/if_not_exists_evaluation_details_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IfNotExistsEvaluationDetails(Model): - """Evaluation details of IfNotExists effect. - - :param resource_id: ID of the last evaluated resource for IfNotExists - effect. - :type resource_id: str - :param total_resources: Total number of resources to which the existence - condition is applicable. - :type total_resources: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'total_resources': {'key': 'totalResources', 'type': 'int'}, - } - - def __init__(self, *, resource_id: str=None, total_resources: int=None, **kwargs) -> None: - super(IfNotExistsEvaluationDetails, self).__init__(**kwargs) - self.resource_id = resource_id - self.total_resources = total_resources diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation.py deleted file mode 100644 index b1de7ee85c7e..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation definition. - - :param name: Operation name. - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.policyinsights.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_display.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_display.py deleted file mode 100644 index 49e584de324d..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Resource provider name. - :type provider: str - :param resource: Resource name on which the operation is performed. - :type resource: str - :param operation: Operation name. - :type operation: str - :param description: Operation description. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_display_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_display_py3.py deleted file mode 100644 index 3ed545a5f6d2..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Resource provider name. - :type provider: str - :param resource: Resource name on which the operation is performed. - :type resource: str - :param operation: Operation name. - :type operation: str - :param description: Operation description. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_py3.py deleted file mode 100644 index d20a3bced084..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation definition. - - :param name: Operation name. - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.policyinsights.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results.py deleted file mode 100644 index 69e4222179da..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationsListResults(Model): - """List of available operations. - - :param odatacount: OData entity count; represents the number of operations - returned. - :type odatacount: int - :param value: List of available operations. - :type value: list[~azure.mgmt.policyinsights.models.Operation] - """ - - _validation = { - 'odatacount': {'minimum': 1}, - } - - _attribute_map = { - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationsListResults, self).__init__(**kwargs) - self.odatacount = kwargs.get('odatacount', None) - self.value = kwargs.get('value', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results_py3.py deleted file mode 100644 index 794009aa62e4..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationsListResults(Model): - """List of available operations. - - :param odatacount: OData entity count; represents the number of operations - returned. - :type odatacount: int - :param value: List of available operations. - :type value: list[~azure.mgmt.policyinsights.models.Operation] - """ - - _validation = { - 'odatacount': {'minimum': 1}, - } - - _attribute_map = { - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, *, odatacount: int=None, value=None, **kwargs) -> None: - super(OperationsListResults, self).__init__(**kwargs) - self.odatacount = odatacount - self.value = value diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_assignment_summary.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_assignment_summary.py deleted file mode 100644 index 33988b36213c..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_assignment_summary.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyAssignmentSummary(Model): - """Policy assignment summary. - - :param policy_assignment_id: Policy assignment ID. - :type policy_assignment_id: str - :param policy_set_definition_id: Policy set definition ID, if the policy - assignment is for a policy set. - :type policy_set_definition_id: str - :param results: Non-compliance summary for the policy assignment. - :type results: ~azure.mgmt.policyinsights.models.SummaryResults - :param policy_definitions: Policy definitions summary. - :type policy_definitions: - list[~azure.mgmt.policyinsights.models.PolicyDefinitionSummary] - """ - - _attribute_map = { - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'results': {'key': 'results', 'type': 'SummaryResults'}, - 'policy_definitions': {'key': 'policyDefinitions', 'type': '[PolicyDefinitionSummary]'}, - } - - def __init__(self, **kwargs): - super(PolicyAssignmentSummary, self).__init__(**kwargs) - self.policy_assignment_id = kwargs.get('policy_assignment_id', None) - self.policy_set_definition_id = kwargs.get('policy_set_definition_id', None) - self.results = kwargs.get('results', None) - self.policy_definitions = kwargs.get('policy_definitions', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_assignment_summary_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_assignment_summary_py3.py deleted file mode 100644 index 7a1eec689ae3..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_assignment_summary_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyAssignmentSummary(Model): - """Policy assignment summary. - - :param policy_assignment_id: Policy assignment ID. - :type policy_assignment_id: str - :param policy_set_definition_id: Policy set definition ID, if the policy - assignment is for a policy set. - :type policy_set_definition_id: str - :param results: Non-compliance summary for the policy assignment. - :type results: ~azure.mgmt.policyinsights.models.SummaryResults - :param policy_definitions: Policy definitions summary. - :type policy_definitions: - list[~azure.mgmt.policyinsights.models.PolicyDefinitionSummary] - """ - - _attribute_map = { - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'results': {'key': 'results', 'type': 'SummaryResults'}, - 'policy_definitions': {'key': 'policyDefinitions', 'type': '[PolicyDefinitionSummary]'}, - } - - def __init__(self, *, policy_assignment_id: str=None, policy_set_definition_id: str=None, results=None, policy_definitions=None, **kwargs) -> None: - super(PolicyAssignmentSummary, self).__init__(**kwargs) - self.policy_assignment_id = policy_assignment_id - self.policy_set_definition_id = policy_set_definition_id - self.results = results - self.policy_definitions = policy_definitions diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_definition_summary.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_definition_summary.py deleted file mode 100644 index db73df83fd6a..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_definition_summary.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyDefinitionSummary(Model): - """Policy definition summary. - - :param policy_definition_id: Policy definition ID. - :type policy_definition_id: str - :param policy_definition_reference_id: Policy definition reference ID. - :type policy_definition_reference_id: str - :param effect: Policy effect, i.e. policy definition action. - :type effect: str - :param results: Non-compliance summary for the policy definition. - :type results: ~azure.mgmt.policyinsights.models.SummaryResults - """ - - _attribute_map = { - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - 'effect': {'key': 'effect', 'type': 'str'}, - 'results': {'key': 'results', 'type': 'SummaryResults'}, - } - - def __init__(self, **kwargs): - super(PolicyDefinitionSummary, self).__init__(**kwargs) - self.policy_definition_id = kwargs.get('policy_definition_id', None) - self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) - self.effect = kwargs.get('effect', None) - self.results = kwargs.get('results', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_definition_summary_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_definition_summary_py3.py deleted file mode 100644 index 6ed5afbba2da..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_definition_summary_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyDefinitionSummary(Model): - """Policy definition summary. - - :param policy_definition_id: Policy definition ID. - :type policy_definition_id: str - :param policy_definition_reference_id: Policy definition reference ID. - :type policy_definition_reference_id: str - :param effect: Policy effect, i.e. policy definition action. - :type effect: str - :param results: Non-compliance summary for the policy definition. - :type results: ~azure.mgmt.policyinsights.models.SummaryResults - """ - - _attribute_map = { - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - 'effect': {'key': 'effect', 'type': 'str'}, - 'results': {'key': 'results', 'type': 'SummaryResults'}, - } - - def __init__(self, *, policy_definition_id: str=None, policy_definition_reference_id: str=None, effect: str=None, results=None, **kwargs) -> None: - super(PolicyDefinitionSummary, self).__init__(**kwargs) - self.policy_definition_id = policy_definition_id - self.policy_definition_reference_id = policy_definition_reference_id - self.effect = effect - self.results = results diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_details.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_details.py deleted file mode 100644 index d9c9e495a002..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_details.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyDetails(Model): - """The policy details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar policy_definition_id: The ID of the policy definition. - :vartype policy_definition_id: str - :ivar policy_assignment_id: The ID of the policy assignment. - :vartype policy_assignment_id: str - :ivar policy_assignment_display_name: The display name of the policy - assignment. - :vartype policy_assignment_display_name: str - :ivar policy_assignment_scope: The scope of the policy assignment. - :vartype policy_assignment_scope: str - :ivar policy_set_definition_id: The ID of the policy set definition. - :vartype policy_set_definition_id: str - :ivar policy_definition_reference_id: The policy definition reference ID - within the policy set definition. - :vartype policy_definition_reference_id: str - """ - - _validation = { - 'policy_definition_id': {'readonly': True}, - 'policy_assignment_id': {'readonly': True}, - 'policy_assignment_display_name': {'readonly': True}, - 'policy_assignment_scope': {'readonly': True}, - 'policy_set_definition_id': {'readonly': True}, - 'policy_definition_reference_id': {'readonly': True}, - } - - _attribute_map = { - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_assignment_display_name': {'key': 'policyAssignmentDisplayName', 'type': 'str'}, - 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyDetails, self).__init__(**kwargs) - self.policy_definition_id = None - self.policy_assignment_id = None - self.policy_assignment_display_name = None - self.policy_assignment_scope = None - self.policy_set_definition_id = None - self.policy_definition_reference_id = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_details_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_details_py3.py deleted file mode 100644 index 887d3739dc8c..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_details_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyDetails(Model): - """The policy details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar policy_definition_id: The ID of the policy definition. - :vartype policy_definition_id: str - :ivar policy_assignment_id: The ID of the policy assignment. - :vartype policy_assignment_id: str - :ivar policy_assignment_display_name: The display name of the policy - assignment. - :vartype policy_assignment_display_name: str - :ivar policy_assignment_scope: The scope of the policy assignment. - :vartype policy_assignment_scope: str - :ivar policy_set_definition_id: The ID of the policy set definition. - :vartype policy_set_definition_id: str - :ivar policy_definition_reference_id: The policy definition reference ID - within the policy set definition. - :vartype policy_definition_reference_id: str - """ - - _validation = { - 'policy_definition_id': {'readonly': True}, - 'policy_assignment_id': {'readonly': True}, - 'policy_assignment_display_name': {'readonly': True}, - 'policy_assignment_scope': {'readonly': True}, - 'policy_set_definition_id': {'readonly': True}, - 'policy_definition_reference_id': {'readonly': True}, - } - - _attribute_map = { - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_assignment_display_name': {'key': 'policyAssignmentDisplayName', 'type': 'str'}, - 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PolicyDetails, self).__init__(**kwargs) - self.policy_definition_id = None - self.policy_assignment_id = None - self.policy_assignment_display_name = None - self.policy_assignment_scope = None - self.policy_set_definition_id = None - self.policy_definition_reference_id = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_evaluation_details.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_evaluation_details.py deleted file mode 100644 index e56af91399b0..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_evaluation_details.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyEvaluationDetails(Model): - """Policy evaluation details. - - :param evaluated_expressions: Details of the evaluated expressions. - :type evaluated_expressions: - list[~azure.mgmt.policyinsights.models.ExpressionEvaluationDetails] - :param if_not_exists_details: Evaluation details of IfNotExists effect. - :type if_not_exists_details: - ~azure.mgmt.policyinsights.models.IfNotExistsEvaluationDetails - """ - - _attribute_map = { - 'evaluated_expressions': {'key': 'evaluatedExpressions', 'type': '[ExpressionEvaluationDetails]'}, - 'if_not_exists_details': {'key': 'ifNotExistsDetails', 'type': 'IfNotExistsEvaluationDetails'}, - } - - def __init__(self, **kwargs): - super(PolicyEvaluationDetails, self).__init__(**kwargs) - self.evaluated_expressions = kwargs.get('evaluated_expressions', None) - self.if_not_exists_details = kwargs.get('if_not_exists_details', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_evaluation_details_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_evaluation_details_py3.py deleted file mode 100644 index a5a3e30870d4..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_evaluation_details_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyEvaluationDetails(Model): - """Policy evaluation details. - - :param evaluated_expressions: Details of the evaluated expressions. - :type evaluated_expressions: - list[~azure.mgmt.policyinsights.models.ExpressionEvaluationDetails] - :param if_not_exists_details: Evaluation details of IfNotExists effect. - :type if_not_exists_details: - ~azure.mgmt.policyinsights.models.IfNotExistsEvaluationDetails - """ - - _attribute_map = { - 'evaluated_expressions': {'key': 'evaluatedExpressions', 'type': '[ExpressionEvaluationDetails]'}, - 'if_not_exists_details': {'key': 'ifNotExistsDetails', 'type': 'IfNotExistsEvaluationDetails'}, - } - - def __init__(self, *, evaluated_expressions=None, if_not_exists_details=None, **kwargs) -> None: - super(PolicyEvaluationDetails, self).__init__(**kwargs) - self.evaluated_expressions = evaluated_expressions - self.if_not_exists_details = if_not_exists_details diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_event.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_event.py deleted file mode 100644 index 75e0d837dfc3..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_event.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyEvent(Model): - """Policy event record. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param odataid: OData entity ID; always set to null since policy event - records do not have an entity ID. - :type odataid: str - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param timestamp: Timestamp for the policy event record. - :type timestamp: datetime - :param resource_id: Resource ID. - :type resource_id: str - :param policy_assignment_id: Policy assignment ID. - :type policy_assignment_id: str - :param policy_definition_id: Policy definition ID. - :type policy_definition_id: str - :param effective_parameters: Effective parameters for the policy - assignment. - :type effective_parameters: str - :param is_compliant: Flag which states whether the resource is compliant - against the policy assignment it was evaluated against. - :type is_compliant: bool - :param subscription_id: Subscription ID. - :type subscription_id: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_location: Resource location. - :type resource_location: str - :param resource_group: Resource group name. - :type resource_group: str - :param resource_tags: List of resource tags. - :type resource_tags: str - :param policy_assignment_name: Policy assignment name. - :type policy_assignment_name: str - :param policy_assignment_owner: Policy assignment owner. - :type policy_assignment_owner: str - :param policy_assignment_parameters: Policy assignment parameters. - :type policy_assignment_parameters: str - :param policy_assignment_scope: Policy assignment scope. - :type policy_assignment_scope: str - :param policy_definition_name: Policy definition name. - :type policy_definition_name: str - :param policy_definition_action: Policy definition action, i.e. effect. - :type policy_definition_action: str - :param policy_definition_category: Policy definition category. - :type policy_definition_category: str - :param policy_set_definition_id: Policy set definition ID, if the policy - assignment is for a policy set. - :type policy_set_definition_id: str - :param policy_set_definition_name: Policy set definition name, if the - policy assignment is for a policy set. - :type policy_set_definition_name: str - :param policy_set_definition_owner: Policy set definition owner, if the - policy assignment is for a policy set. - :type policy_set_definition_owner: str - :param policy_set_definition_category: Policy set definition category, if - the policy assignment is for a policy set. - :type policy_set_definition_category: str - :param policy_set_definition_parameters: Policy set definition parameters, - if the policy assignment is for a policy set. - :type policy_set_definition_parameters: str - :param management_group_ids: Comma separated list of management group IDs, - which represent the hierarchy of the management groups the resource is - under. - :type management_group_ids: str - :param policy_definition_reference_id: Reference ID for the policy - definition inside the policy set, if the policy assignment is for a policy - set. - :type policy_definition_reference_id: str - :param tenant_id: Tenant ID for the policy event record. - :type tenant_id: str - :param principal_oid: Principal object ID for the user who initiated the - resource operation that triggered the policy event. - :type principal_oid: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'odataid': {'key': '@odata\\.id', 'type': 'str'}, - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, - 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, - 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, - 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, - 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, - 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, - 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, - 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, - 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, - 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, - 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_oid': {'key': 'principalOid', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyEvent, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.odataid = kwargs.get('odataid', None) - self.odatacontext = kwargs.get('odatacontext', None) - self.timestamp = kwargs.get('timestamp', None) - self.resource_id = kwargs.get('resource_id', None) - self.policy_assignment_id = kwargs.get('policy_assignment_id', None) - self.policy_definition_id = kwargs.get('policy_definition_id', None) - self.effective_parameters = kwargs.get('effective_parameters', None) - self.is_compliant = kwargs.get('is_compliant', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_type = kwargs.get('resource_type', None) - self.resource_location = kwargs.get('resource_location', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_tags = kwargs.get('resource_tags', None) - self.policy_assignment_name = kwargs.get('policy_assignment_name', None) - self.policy_assignment_owner = kwargs.get('policy_assignment_owner', None) - self.policy_assignment_parameters = kwargs.get('policy_assignment_parameters', None) - self.policy_assignment_scope = kwargs.get('policy_assignment_scope', None) - self.policy_definition_name = kwargs.get('policy_definition_name', None) - self.policy_definition_action = kwargs.get('policy_definition_action', None) - self.policy_definition_category = kwargs.get('policy_definition_category', None) - self.policy_set_definition_id = kwargs.get('policy_set_definition_id', None) - self.policy_set_definition_name = kwargs.get('policy_set_definition_name', None) - self.policy_set_definition_owner = kwargs.get('policy_set_definition_owner', None) - self.policy_set_definition_category = kwargs.get('policy_set_definition_category', None) - self.policy_set_definition_parameters = kwargs.get('policy_set_definition_parameters', None) - self.management_group_ids = kwargs.get('management_group_ids', None) - self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.principal_oid = kwargs.get('principal_oid', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_event_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_event_py3.py deleted file mode 100644 index 08552484fa7b..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_event_py3.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyEvent(Model): - """Policy event record. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param odataid: OData entity ID; always set to null since policy event - records do not have an entity ID. - :type odataid: str - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param timestamp: Timestamp for the policy event record. - :type timestamp: datetime - :param resource_id: Resource ID. - :type resource_id: str - :param policy_assignment_id: Policy assignment ID. - :type policy_assignment_id: str - :param policy_definition_id: Policy definition ID. - :type policy_definition_id: str - :param effective_parameters: Effective parameters for the policy - assignment. - :type effective_parameters: str - :param is_compliant: Flag which states whether the resource is compliant - against the policy assignment it was evaluated against. - :type is_compliant: bool - :param subscription_id: Subscription ID. - :type subscription_id: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_location: Resource location. - :type resource_location: str - :param resource_group: Resource group name. - :type resource_group: str - :param resource_tags: List of resource tags. - :type resource_tags: str - :param policy_assignment_name: Policy assignment name. - :type policy_assignment_name: str - :param policy_assignment_owner: Policy assignment owner. - :type policy_assignment_owner: str - :param policy_assignment_parameters: Policy assignment parameters. - :type policy_assignment_parameters: str - :param policy_assignment_scope: Policy assignment scope. - :type policy_assignment_scope: str - :param policy_definition_name: Policy definition name. - :type policy_definition_name: str - :param policy_definition_action: Policy definition action, i.e. effect. - :type policy_definition_action: str - :param policy_definition_category: Policy definition category. - :type policy_definition_category: str - :param policy_set_definition_id: Policy set definition ID, if the policy - assignment is for a policy set. - :type policy_set_definition_id: str - :param policy_set_definition_name: Policy set definition name, if the - policy assignment is for a policy set. - :type policy_set_definition_name: str - :param policy_set_definition_owner: Policy set definition owner, if the - policy assignment is for a policy set. - :type policy_set_definition_owner: str - :param policy_set_definition_category: Policy set definition category, if - the policy assignment is for a policy set. - :type policy_set_definition_category: str - :param policy_set_definition_parameters: Policy set definition parameters, - if the policy assignment is for a policy set. - :type policy_set_definition_parameters: str - :param management_group_ids: Comma separated list of management group IDs, - which represent the hierarchy of the management groups the resource is - under. - :type management_group_ids: str - :param policy_definition_reference_id: Reference ID for the policy - definition inside the policy set, if the policy assignment is for a policy - set. - :type policy_definition_reference_id: str - :param tenant_id: Tenant ID for the policy event record. - :type tenant_id: str - :param principal_oid: Principal object ID for the user who initiated the - resource operation that triggered the policy event. - :type principal_oid: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'odataid': {'key': '@odata\\.id', 'type': 'str'}, - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, - 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, - 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, - 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, - 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, - 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, - 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, - 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, - 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, - 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, - 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_oid': {'key': 'principalOid', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, odataid: str=None, odatacontext: str=None, timestamp=None, resource_id: str=None, policy_assignment_id: str=None, policy_definition_id: str=None, effective_parameters: str=None, is_compliant: bool=None, subscription_id: str=None, resource_type: str=None, resource_location: str=None, resource_group: str=None, resource_tags: str=None, policy_assignment_name: str=None, policy_assignment_owner: str=None, policy_assignment_parameters: str=None, policy_assignment_scope: str=None, policy_definition_name: str=None, policy_definition_action: str=None, policy_definition_category: str=None, policy_set_definition_id: str=None, policy_set_definition_name: str=None, policy_set_definition_owner: str=None, policy_set_definition_category: str=None, policy_set_definition_parameters: str=None, management_group_ids: str=None, policy_definition_reference_id: str=None, tenant_id: str=None, principal_oid: str=None, **kwargs) -> None: - super(PolicyEvent, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.odataid = odataid - self.odatacontext = odatacontext - self.timestamp = timestamp - self.resource_id = resource_id - self.policy_assignment_id = policy_assignment_id - self.policy_definition_id = policy_definition_id - self.effective_parameters = effective_parameters - self.is_compliant = is_compliant - self.subscription_id = subscription_id - self.resource_type = resource_type - self.resource_location = resource_location - self.resource_group = resource_group - self.resource_tags = resource_tags - self.policy_assignment_name = policy_assignment_name - self.policy_assignment_owner = policy_assignment_owner - self.policy_assignment_parameters = policy_assignment_parameters - self.policy_assignment_scope = policy_assignment_scope - self.policy_definition_name = policy_definition_name - self.policy_definition_action = policy_definition_action - self.policy_definition_category = policy_definition_category - self.policy_set_definition_id = policy_set_definition_id - self.policy_set_definition_name = policy_set_definition_name - self.policy_set_definition_owner = policy_set_definition_owner - self.policy_set_definition_category = policy_set_definition_category - self.policy_set_definition_parameters = policy_set_definition_parameters - self.management_group_ids = management_group_ids - self.policy_definition_reference_id = policy_definition_reference_id - self.tenant_id = tenant_id - self.principal_oid = principal_oid diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_events_query_results.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_events_query_results.py deleted file mode 100644 index ef3a73ebac0f..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_events_query_results.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyEventsQueryResults(Model): - """Query results. - - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param odatacount: OData entity count; represents the number of policy - event records returned. - :type odatacount: int - :param value: Query results. - :type value: list[~azure.mgmt.policyinsights.models.PolicyEvent] - """ - - _validation = { - 'odatacount': {'minimum': 0}, - } - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[PolicyEvent]'}, - } - - def __init__(self, **kwargs): - super(PolicyEventsQueryResults, self).__init__(**kwargs) - self.odatacontext = kwargs.get('odatacontext', None) - self.odatacount = kwargs.get('odatacount', None) - self.value = kwargs.get('value', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_events_query_results_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_events_query_results_py3.py deleted file mode 100644 index e1876afab02a..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_events_query_results_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyEventsQueryResults(Model): - """Query results. - - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param odatacount: OData entity count; represents the number of policy - event records returned. - :type odatacount: int - :param value: Query results. - :type value: list[~azure.mgmt.policyinsights.models.PolicyEvent] - """ - - _validation = { - 'odatacount': {'minimum': 0}, - } - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[PolicyEvent]'}, - } - - def __init__(self, *, odatacontext: str=None, odatacount: int=None, value=None, **kwargs) -> None: - super(PolicyEventsQueryResults, self).__init__(**kwargs) - self.odatacontext = odatacontext - self.odatacount = odatacount - self.value = value diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_state.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_state.py deleted file mode 100644 index 0241a00e67af..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_state.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyState(Model): - """Policy state record. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param odataid: OData entity ID; always set to null since policy state - records do not have an entity ID. - :type odataid: str - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param timestamp: Timestamp for the policy state record. - :type timestamp: datetime - :param resource_id: Resource ID. - :type resource_id: str - :param policy_assignment_id: Policy assignment ID. - :type policy_assignment_id: str - :param policy_definition_id: Policy definition ID. - :type policy_definition_id: str - :param effective_parameters: Effective parameters for the policy - assignment. - :type effective_parameters: str - :param is_compliant: Flag which states whether the resource is compliant - against the policy assignment it was evaluated against. - :type is_compliant: bool - :param subscription_id: Subscription ID. - :type subscription_id: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_location: Resource location. - :type resource_location: str - :param resource_group: Resource group name. - :type resource_group: str - :param resource_tags: List of resource tags. - :type resource_tags: str - :param policy_assignment_name: Policy assignment name. - :type policy_assignment_name: str - :param policy_assignment_owner: Policy assignment owner. - :type policy_assignment_owner: str - :param policy_assignment_parameters: Policy assignment parameters. - :type policy_assignment_parameters: str - :param policy_assignment_scope: Policy assignment scope. - :type policy_assignment_scope: str - :param policy_definition_name: Policy definition name. - :type policy_definition_name: str - :param policy_definition_action: Policy definition action, i.e. effect. - :type policy_definition_action: str - :param policy_definition_category: Policy definition category. - :type policy_definition_category: str - :param policy_set_definition_id: Policy set definition ID, if the policy - assignment is for a policy set. - :type policy_set_definition_id: str - :param policy_set_definition_name: Policy set definition name, if the - policy assignment is for a policy set. - :type policy_set_definition_name: str - :param policy_set_definition_owner: Policy set definition owner, if the - policy assignment is for a policy set. - :type policy_set_definition_owner: str - :param policy_set_definition_category: Policy set definition category, if - the policy assignment is for a policy set. - :type policy_set_definition_category: str - :param policy_set_definition_parameters: Policy set definition parameters, - if the policy assignment is for a policy set. - :type policy_set_definition_parameters: str - :param management_group_ids: Comma separated list of management group IDs, - which represent the hierarchy of the management groups the resource is - under. - :type management_group_ids: str - :param policy_definition_reference_id: Reference ID for the policy - definition inside the policy set, if the policy assignment is for a policy - set. - :type policy_definition_reference_id: str - :param compliance_state: Compliance state of the resource. - :type compliance_state: str - :param policy_evaluation_details: Policy evaluation details. - :type policy_evaluation_details: - ~azure.mgmt.policyinsights.models.PolicyEvaluationDetails - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'odataid': {'key': '@odata\\.id', 'type': 'str'}, - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, - 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, - 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, - 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, - 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, - 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, - 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, - 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, - 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, - 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, - 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - 'compliance_state': {'key': 'complianceState', 'type': 'str'}, - 'policy_evaluation_details': {'key': 'policyEvaluationDetails', 'type': 'PolicyEvaluationDetails'}, - } - - def __init__(self, **kwargs): - super(PolicyState, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.odataid = kwargs.get('odataid', None) - self.odatacontext = kwargs.get('odatacontext', None) - self.timestamp = kwargs.get('timestamp', None) - self.resource_id = kwargs.get('resource_id', None) - self.policy_assignment_id = kwargs.get('policy_assignment_id', None) - self.policy_definition_id = kwargs.get('policy_definition_id', None) - self.effective_parameters = kwargs.get('effective_parameters', None) - self.is_compliant = kwargs.get('is_compliant', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_type = kwargs.get('resource_type', None) - self.resource_location = kwargs.get('resource_location', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_tags = kwargs.get('resource_tags', None) - self.policy_assignment_name = kwargs.get('policy_assignment_name', None) - self.policy_assignment_owner = kwargs.get('policy_assignment_owner', None) - self.policy_assignment_parameters = kwargs.get('policy_assignment_parameters', None) - self.policy_assignment_scope = kwargs.get('policy_assignment_scope', None) - self.policy_definition_name = kwargs.get('policy_definition_name', None) - self.policy_definition_action = kwargs.get('policy_definition_action', None) - self.policy_definition_category = kwargs.get('policy_definition_category', None) - self.policy_set_definition_id = kwargs.get('policy_set_definition_id', None) - self.policy_set_definition_name = kwargs.get('policy_set_definition_name', None) - self.policy_set_definition_owner = kwargs.get('policy_set_definition_owner', None) - self.policy_set_definition_category = kwargs.get('policy_set_definition_category', None) - self.policy_set_definition_parameters = kwargs.get('policy_set_definition_parameters', None) - self.management_group_ids = kwargs.get('management_group_ids', None) - self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) - self.compliance_state = kwargs.get('compliance_state', None) - self.policy_evaluation_details = kwargs.get('policy_evaluation_details', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_state_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_state_py3.py deleted file mode 100644 index cc4f9494e98f..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_state_py3.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyState(Model): - """Policy state record. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param odataid: OData entity ID; always set to null since policy state - records do not have an entity ID. - :type odataid: str - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param timestamp: Timestamp for the policy state record. - :type timestamp: datetime - :param resource_id: Resource ID. - :type resource_id: str - :param policy_assignment_id: Policy assignment ID. - :type policy_assignment_id: str - :param policy_definition_id: Policy definition ID. - :type policy_definition_id: str - :param effective_parameters: Effective parameters for the policy - assignment. - :type effective_parameters: str - :param is_compliant: Flag which states whether the resource is compliant - against the policy assignment it was evaluated against. - :type is_compliant: bool - :param subscription_id: Subscription ID. - :type subscription_id: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_location: Resource location. - :type resource_location: str - :param resource_group: Resource group name. - :type resource_group: str - :param resource_tags: List of resource tags. - :type resource_tags: str - :param policy_assignment_name: Policy assignment name. - :type policy_assignment_name: str - :param policy_assignment_owner: Policy assignment owner. - :type policy_assignment_owner: str - :param policy_assignment_parameters: Policy assignment parameters. - :type policy_assignment_parameters: str - :param policy_assignment_scope: Policy assignment scope. - :type policy_assignment_scope: str - :param policy_definition_name: Policy definition name. - :type policy_definition_name: str - :param policy_definition_action: Policy definition action, i.e. effect. - :type policy_definition_action: str - :param policy_definition_category: Policy definition category. - :type policy_definition_category: str - :param policy_set_definition_id: Policy set definition ID, if the policy - assignment is for a policy set. - :type policy_set_definition_id: str - :param policy_set_definition_name: Policy set definition name, if the - policy assignment is for a policy set. - :type policy_set_definition_name: str - :param policy_set_definition_owner: Policy set definition owner, if the - policy assignment is for a policy set. - :type policy_set_definition_owner: str - :param policy_set_definition_category: Policy set definition category, if - the policy assignment is for a policy set. - :type policy_set_definition_category: str - :param policy_set_definition_parameters: Policy set definition parameters, - if the policy assignment is for a policy set. - :type policy_set_definition_parameters: str - :param management_group_ids: Comma separated list of management group IDs, - which represent the hierarchy of the management groups the resource is - under. - :type management_group_ids: str - :param policy_definition_reference_id: Reference ID for the policy - definition inside the policy set, if the policy assignment is for a policy - set. - :type policy_definition_reference_id: str - :param compliance_state: Compliance state of the resource. - :type compliance_state: str - :param policy_evaluation_details: Policy evaluation details. - :type policy_evaluation_details: - ~azure.mgmt.policyinsights.models.PolicyEvaluationDetails - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'odataid': {'key': '@odata\\.id', 'type': 'str'}, - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, - 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, - 'effective_parameters': {'key': 'effectiveParameters', 'type': 'str'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_tags': {'key': 'resourceTags', 'type': 'str'}, - 'policy_assignment_name': {'key': 'policyAssignmentName', 'type': 'str'}, - 'policy_assignment_owner': {'key': 'policyAssignmentOwner', 'type': 'str'}, - 'policy_assignment_parameters': {'key': 'policyAssignmentParameters', 'type': 'str'}, - 'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'}, - 'policy_definition_name': {'key': 'policyDefinitionName', 'type': 'str'}, - 'policy_definition_action': {'key': 'policyDefinitionAction', 'type': 'str'}, - 'policy_definition_category': {'key': 'policyDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'}, - 'policy_set_definition_name': {'key': 'policySetDefinitionName', 'type': 'str'}, - 'policy_set_definition_owner': {'key': 'policySetDefinitionOwner', 'type': 'str'}, - 'policy_set_definition_category': {'key': 'policySetDefinitionCategory', 'type': 'str'}, - 'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'}, - 'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, - 'compliance_state': {'key': 'complianceState', 'type': 'str'}, - 'policy_evaluation_details': {'key': 'policyEvaluationDetails', 'type': 'PolicyEvaluationDetails'}, - } - - def __init__(self, *, additional_properties=None, odataid: str=None, odatacontext: str=None, timestamp=None, resource_id: str=None, policy_assignment_id: str=None, policy_definition_id: str=None, effective_parameters: str=None, is_compliant: bool=None, subscription_id: str=None, resource_type: str=None, resource_location: str=None, resource_group: str=None, resource_tags: str=None, policy_assignment_name: str=None, policy_assignment_owner: str=None, policy_assignment_parameters: str=None, policy_assignment_scope: str=None, policy_definition_name: str=None, policy_definition_action: str=None, policy_definition_category: str=None, policy_set_definition_id: str=None, policy_set_definition_name: str=None, policy_set_definition_owner: str=None, policy_set_definition_category: str=None, policy_set_definition_parameters: str=None, management_group_ids: str=None, policy_definition_reference_id: str=None, compliance_state: str=None, policy_evaluation_details=None, **kwargs) -> None: - super(PolicyState, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.odataid = odataid - self.odatacontext = odatacontext - self.timestamp = timestamp - self.resource_id = resource_id - self.policy_assignment_id = policy_assignment_id - self.policy_definition_id = policy_definition_id - self.effective_parameters = effective_parameters - self.is_compliant = is_compliant - self.subscription_id = subscription_id - self.resource_type = resource_type - self.resource_location = resource_location - self.resource_group = resource_group - self.resource_tags = resource_tags - self.policy_assignment_name = policy_assignment_name - self.policy_assignment_owner = policy_assignment_owner - self.policy_assignment_parameters = policy_assignment_parameters - self.policy_assignment_scope = policy_assignment_scope - self.policy_definition_name = policy_definition_name - self.policy_definition_action = policy_definition_action - self.policy_definition_category = policy_definition_category - self.policy_set_definition_id = policy_set_definition_id - self.policy_set_definition_name = policy_set_definition_name - self.policy_set_definition_owner = policy_set_definition_owner - self.policy_set_definition_category = policy_set_definition_category - self.policy_set_definition_parameters = policy_set_definition_parameters - self.management_group_ids = management_group_ids - self.policy_definition_reference_id = policy_definition_reference_id - self.compliance_state = compliance_state - self.policy_evaluation_details = policy_evaluation_details diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_states_query_results.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_states_query_results.py deleted file mode 100644 index d4e45f98a688..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_states_query_results.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyStatesQueryResults(Model): - """Query results. - - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param odatacount: OData entity count; represents the number of policy - state records returned. - :type odatacount: int - :param value: Query results. - :type value: list[~azure.mgmt.policyinsights.models.PolicyState] - """ - - _validation = { - 'odatacount': {'minimum': 0}, - } - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[PolicyState]'}, - } - - def __init__(self, **kwargs): - super(PolicyStatesQueryResults, self).__init__(**kwargs) - self.odatacontext = kwargs.get('odatacontext', None) - self.odatacount = kwargs.get('odatacount', None) - self.value = kwargs.get('value', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_states_query_results_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_states_query_results_py3.py deleted file mode 100644 index 29cd60ec18d2..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_states_query_results_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyStatesQueryResults(Model): - """Query results. - - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param odatacount: OData entity count; represents the number of policy - state records returned. - :type odatacount: int - :param value: Query results. - :type value: list[~azure.mgmt.policyinsights.models.PolicyState] - """ - - _validation = { - 'odatacount': {'minimum': 0}, - } - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[PolicyState]'}, - } - - def __init__(self, *, odatacontext: str=None, odatacount: int=None, value=None, **kwargs) -> None: - super(PolicyStatesQueryResults, self).__init__(**kwargs) - self.odatacontext = odatacontext - self.odatacount = odatacount - self.value = value diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource.py deleted file mode 100644 index f8d0c7793960..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyTrackedResource(Model): - """Policy tracked resource record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tracked_resource_id: The ID of the policy tracked resource. - :vartype tracked_resource_id: str - :ivar policy_details: The details of the policy that require the tracked - resource. - :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails - :ivar created_by: The details of the policy triggered deployment that - created the tracked resource. - :vartype created_by: - ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails - :ivar last_modified_by: The details of the policy triggered deployment - that modified the tracked resource. - :vartype last_modified_by: - ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails - :ivar last_update_utc: Timestamp of the last update to the tracked - resource. - :vartype last_update_utc: datetime - """ - - _validation = { - 'tracked_resource_id': {'readonly': True}, - 'policy_details': {'readonly': True}, - 'created_by': {'readonly': True}, - 'last_modified_by': {'readonly': True}, - 'last_update_utc': {'readonly': True}, - } - - _attribute_map = { - 'tracked_resource_id': {'key': 'trackedResourceId', 'type': 'str'}, - 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, - 'created_by': {'key': 'createdBy', 'type': 'TrackedResourceModificationDetails'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'TrackedResourceModificationDetails'}, - 'last_update_utc': {'key': 'lastUpdateUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(PolicyTrackedResource, self).__init__(**kwargs) - self.tracked_resource_id = None - self.policy_details = None - self.created_by = None - self.last_modified_by = None - self.last_update_utc = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource_py3.py deleted file mode 100644 index b1f79def491a..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/policy_tracked_resource_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyTrackedResource(Model): - """Policy tracked resource record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tracked_resource_id: The ID of the policy tracked resource. - :vartype tracked_resource_id: str - :ivar policy_details: The details of the policy that require the tracked - resource. - :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails - :ivar created_by: The details of the policy triggered deployment that - created the tracked resource. - :vartype created_by: - ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails - :ivar last_modified_by: The details of the policy triggered deployment - that modified the tracked resource. - :vartype last_modified_by: - ~azure.mgmt.policyinsights.models.TrackedResourceModificationDetails - :ivar last_update_utc: Timestamp of the last update to the tracked - resource. - :vartype last_update_utc: datetime - """ - - _validation = { - 'tracked_resource_id': {'readonly': True}, - 'policy_details': {'readonly': True}, - 'created_by': {'readonly': True}, - 'last_modified_by': {'readonly': True}, - 'last_update_utc': {'readonly': True}, - } - - _attribute_map = { - 'tracked_resource_id': {'key': 'trackedResourceId', 'type': 'str'}, - 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, - 'created_by': {'key': 'createdBy', 'type': 'TrackedResourceModificationDetails'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'TrackedResourceModificationDetails'}, - 'last_update_utc': {'key': 'lastUpdateUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(PolicyTrackedResource, self).__init__(**kwargs) - self.tracked_resource_id = None - self.policy_details = None - self.created_by = None - self.last_modified_by = None - self.last_update_utc = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure.py deleted file mode 100644 index de37462dd02e..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class QueryFailure(Model): - """Error response. - - :param error: Error definition. - :type error: ~azure.mgmt.policyinsights.models.QueryFailureError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'QueryFailureError'}, - } - - def __init__(self, **kwargs): - super(QueryFailure, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class QueryFailureException(HttpOperationError): - """Server responsed with exception of type: 'QueryFailure'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(QueryFailureException, self).__init__(deserialize, response, 'QueryFailure', *args) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_error.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_error.py deleted file mode 100644 index 7d01c5d2831f..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_error.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryFailureError(Model): - """Error definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryFailureError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_error_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_error_py3.py deleted file mode 100644 index e06ddaf31356..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_error_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryFailureError(Model): - """Error definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(QueryFailureError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_py3.py deleted file mode 100644 index 9b2d224bed03..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_failure_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class QueryFailure(Model): - """Error response. - - :param error: Error definition. - :type error: ~azure.mgmt.policyinsights.models.QueryFailureError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'QueryFailureError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(QueryFailure, self).__init__(**kwargs) - self.error = error - - -class QueryFailureException(HttpOperationError): - """Server responsed with exception of type: 'QueryFailure'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(QueryFailureException, self).__init__(deserialize, response, 'QueryFailure', *args) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_options.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_options.py deleted file mode 100644 index 6fff3f17bf60..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_options.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryOptions(Model): - """Additional parameters for a set of operations. - - :param top: Maximum number of records to return. - :type top: int - :param filter: OData filter expression. - :type filter: str - :param order_by: 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". - :type order_by: str - :param select: Select expression using OData notation. Limits the columns - on each record to just those requested, e.g. "$select=PolicyAssignmentId, - ResourceId". - :type select: str - :param from_property: ISO 8601 formatted timestamp specifying the start - time of the interval to query. When not specified, the service uses ($to - - 1-day). - :type from_property: datetime - :param to: ISO 8601 formatted timestamp specifying the end time of the - interval to query. When not specified, the service uses request time. - :type to: datetime - :param apply: OData apply expression for aggregations. - :type apply: str - :param expand: The $expand query parameter. For example, to expand - policyEvaluationDetails, use $expand=policyEvaluationDetails - :type expand: str - """ - - _attribute_map = { - 'top': {'key': '', 'type': 'int'}, - 'filter': {'key': '', 'type': 'str'}, - 'order_by': {'key': '', 'type': 'str'}, - 'select': {'key': '', 'type': 'str'}, - 'from_property': {'key': '', 'type': 'iso-8601'}, - 'to': {'key': '', 'type': 'iso-8601'}, - 'apply': {'key': '', 'type': 'str'}, - 'expand': {'key': '', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryOptions, self).__init__(**kwargs) - self.top = kwargs.get('top', None) - self.filter = kwargs.get('filter', None) - self.order_by = kwargs.get('order_by', None) - self.select = kwargs.get('select', None) - self.from_property = kwargs.get('from_property', None) - self.to = kwargs.get('to', None) - self.apply = kwargs.get('apply', None) - self.expand = kwargs.get('expand', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_options_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_options_py3.py deleted file mode 100644 index ed3bb4d1609d..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/query_options_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryOptions(Model): - """Additional parameters for a set of operations. - - :param top: Maximum number of records to return. - :type top: int - :param filter: OData filter expression. - :type filter: str - :param order_by: 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". - :type order_by: str - :param select: Select expression using OData notation. Limits the columns - on each record to just those requested, e.g. "$select=PolicyAssignmentId, - ResourceId". - :type select: str - :param from_property: ISO 8601 formatted timestamp specifying the start - time of the interval to query. When not specified, the service uses ($to - - 1-day). - :type from_property: datetime - :param to: ISO 8601 formatted timestamp specifying the end time of the - interval to query. When not specified, the service uses request time. - :type to: datetime - :param apply: OData apply expression for aggregations. - :type apply: str - :param expand: The $expand query parameter. For example, to expand - policyEvaluationDetails, use $expand=policyEvaluationDetails - :type expand: str - """ - - _attribute_map = { - 'top': {'key': '', 'type': 'int'}, - 'filter': {'key': '', 'type': 'str'}, - 'order_by': {'key': '', 'type': 'str'}, - 'select': {'key': '', 'type': 'str'}, - 'from_property': {'key': '', 'type': 'iso-8601'}, - 'to': {'key': '', 'type': 'iso-8601'}, - 'apply': {'key': '', 'type': 'str'}, - 'expand': {'key': '', 'type': 'str'}, - } - - def __init__(self, *, top: int=None, filter: str=None, order_by: str=None, select: str=None, from_property=None, to=None, apply: str=None, expand: str=None, **kwargs) -> None: - super(QueryOptions, self).__init__(**kwargs) - self.top = top - self.filter = filter - self.order_by = order_by - self.select = select - self.from_property = from_property - self.to = to - self.apply = apply - self.expand = expand diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation.py deleted file mode 100644 index b169215e01fb..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Remediation(Model): - """The remediation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param policy_assignment_id: The resource ID of the policy assignment that - should be remediated. - :type policy_assignment_id: str - :param policy_definition_reference_id: 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. - :type policy_definition_reference_id: str - :ivar provisioning_state: The status of the remediation. - :vartype provisioning_state: str - :ivar created_on: The time at which the remediation was created. - :vartype created_on: datetime - :ivar last_updated_on: The time at which the remediation was last updated. - :vartype last_updated_on: datetime - :param filters: The filters that will be applied to determine which - resources to remediate. - :type filters: ~azure.mgmt.policyinsights.models.RemediationFilters - :param deployment_status: The deployment status summary for all - deployments created by the remediation. - :type deployment_status: - ~azure.mgmt.policyinsights.models.RemediationDeploymentSummary - :ivar id: The ID of the remediation. - :vartype id: str - :ivar type: The type of the remediation. - :vartype type: str - :ivar name: The name of the remediation. - :vartype name: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'policy_assignment_id': {'key': 'properties.policyAssignmentId', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'properties.policyDefinitionReferenceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, - 'filters': {'key': 'properties.filters', 'type': 'RemediationFilters'}, - 'deployment_status': {'key': 'properties.deploymentStatus', 'type': 'RemediationDeploymentSummary'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Remediation, self).__init__(**kwargs) - self.policy_assignment_id = kwargs.get('policy_assignment_id', None) - self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) - self.provisioning_state = None - self.created_on = None - self.last_updated_on = None - self.filters = kwargs.get('filters', None) - self.deployment_status = kwargs.get('deployment_status', None) - self.id = None - self.type = None - self.name = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment.py deleted file mode 100644 index d005e810831f..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemediationDeployment(Model): - """Details of a single deployment created by the remediation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar remediated_resource_id: Resource ID of the resource that is being - remediated by the deployment. - :vartype remediated_resource_id: str - :ivar deployment_id: Resource ID of the template deployment that will - remediate the resource. - :vartype deployment_id: str - :ivar status: Status of the remediation deployment. - :vartype status: str - :ivar resource_location: Location of the resource that is being - remediated. - :vartype resource_location: str - :ivar error: Error encountered while remediated the resource. - :vartype error: ~azure.mgmt.policyinsights.models.ErrorDefinition - :ivar created_on: The time at which the remediation was created. - :vartype created_on: datetime - :ivar last_updated_on: The time at which the remediation deployment was - last updated. - :vartype last_updated_on: datetime - """ - - _validation = { - 'remediated_resource_id': {'readonly': True}, - 'deployment_id': {'readonly': True}, - 'status': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'error': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - } - - _attribute_map = { - 'remediated_resource_id': {'key': 'remediatedResourceId', 'type': 'str'}, - 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDefinition'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'lastUpdatedOn', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RemediationDeployment, self).__init__(**kwargs) - self.remediated_resource_id = None - self.deployment_id = None - self.status = None - self.resource_location = None - self.error = None - self.created_on = None - self.last_updated_on = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_paged.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_paged.py deleted file mode 100644 index 835f41f847f0..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RemediationDeploymentPaged(Paged): - """ - A paging container for iterating over a list of :class:`RemediationDeployment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RemediationDeployment]'} - } - - def __init__(self, *args, **kwargs): - - super(RemediationDeploymentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_py3.py deleted file mode 100644 index 0f12eb73f89e..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemediationDeployment(Model): - """Details of a single deployment created by the remediation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar remediated_resource_id: Resource ID of the resource that is being - remediated by the deployment. - :vartype remediated_resource_id: str - :ivar deployment_id: Resource ID of the template deployment that will - remediate the resource. - :vartype deployment_id: str - :ivar status: Status of the remediation deployment. - :vartype status: str - :ivar resource_location: Location of the resource that is being - remediated. - :vartype resource_location: str - :ivar error: Error encountered while remediated the resource. - :vartype error: ~azure.mgmt.policyinsights.models.ErrorDefinition - :ivar created_on: The time at which the remediation was created. - :vartype created_on: datetime - :ivar last_updated_on: The time at which the remediation deployment was - last updated. - :vartype last_updated_on: datetime - """ - - _validation = { - 'remediated_resource_id': {'readonly': True}, - 'deployment_id': {'readonly': True}, - 'status': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'error': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - } - - _attribute_map = { - 'remediated_resource_id': {'key': 'remediatedResourceId', 'type': 'str'}, - 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDefinition'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'lastUpdatedOn', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RemediationDeployment, self).__init__(**kwargs) - self.remediated_resource_id = None - self.deployment_id = None - self.status = None - self.resource_location = None - self.error = None - self.created_on = None - self.last_updated_on = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_summary.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_summary.py deleted file mode 100644 index c803e4970958..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_summary.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemediationDeploymentSummary(Model): - """The deployment status summary for all deployments created by the - remediation. - - :param total_deployments: The number of deployments required by the - remediation. - :type total_deployments: int - :param successful_deployments: The number of deployments required by the - remediation that have succeeded. - :type successful_deployments: int - :param failed_deployments: The number of deployments required by the - remediation that have failed. - :type failed_deployments: int - """ - - _attribute_map = { - 'total_deployments': {'key': 'totalDeployments', 'type': 'int'}, - 'successful_deployments': {'key': 'successfulDeployments', 'type': 'int'}, - 'failed_deployments': {'key': 'failedDeployments', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RemediationDeploymentSummary, self).__init__(**kwargs) - self.total_deployments = kwargs.get('total_deployments', None) - self.successful_deployments = kwargs.get('successful_deployments', None) - self.failed_deployments = kwargs.get('failed_deployments', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_summary_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_summary_py3.py deleted file mode 100644 index f345bb5bf7e2..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_deployment_summary_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemediationDeploymentSummary(Model): - """The deployment status summary for all deployments created by the - remediation. - - :param total_deployments: The number of deployments required by the - remediation. - :type total_deployments: int - :param successful_deployments: The number of deployments required by the - remediation that have succeeded. - :type successful_deployments: int - :param failed_deployments: The number of deployments required by the - remediation that have failed. - :type failed_deployments: int - """ - - _attribute_map = { - 'total_deployments': {'key': 'totalDeployments', 'type': 'int'}, - 'successful_deployments': {'key': 'successfulDeployments', 'type': 'int'}, - 'failed_deployments': {'key': 'failedDeployments', 'type': 'int'}, - } - - def __init__(self, *, total_deployments: int=None, successful_deployments: int=None, failed_deployments: int=None, **kwargs) -> None: - super(RemediationDeploymentSummary, self).__init__(**kwargs) - self.total_deployments = total_deployments - self.successful_deployments = successful_deployments - self.failed_deployments = failed_deployments diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_filters.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_filters.py deleted file mode 100644 index 3dec242259bf..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_filters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemediationFilters(Model): - """The filters that will be applied to determine which resources to remediate. - - :param locations: The resource locations that will be remediated. - :type locations: list[str] - """ - - _attribute_map = { - 'locations': {'key': 'locations', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(RemediationFilters, self).__init__(**kwargs) - self.locations = kwargs.get('locations', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_filters_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_filters_py3.py deleted file mode 100644 index ac0ee67e69c0..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_filters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemediationFilters(Model): - """The filters that will be applied to determine which resources to remediate. - - :param locations: The resource locations that will be remediated. - :type locations: list[str] - """ - - _attribute_map = { - 'locations': {'key': 'locations', 'type': '[str]'}, - } - - def __init__(self, *, locations=None, **kwargs) -> None: - super(RemediationFilters, self).__init__(**kwargs) - self.locations = locations diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_paged.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_paged.py deleted file mode 100644 index 5eb6c80b3961..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RemediationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Remediation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Remediation]'} - } - - def __init__(self, *args, **kwargs): - - super(RemediationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_py3.py deleted file mode 100644 index bd61098b730b..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/remediation_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Remediation(Model): - """The remediation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param policy_assignment_id: The resource ID of the policy assignment that - should be remediated. - :type policy_assignment_id: str - :param policy_definition_reference_id: 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. - :type policy_definition_reference_id: str - :ivar provisioning_state: The status of the remediation. - :vartype provisioning_state: str - :ivar created_on: The time at which the remediation was created. - :vartype created_on: datetime - :ivar last_updated_on: The time at which the remediation was last updated. - :vartype last_updated_on: datetime - :param filters: The filters that will be applied to determine which - resources to remediate. - :type filters: ~azure.mgmt.policyinsights.models.RemediationFilters - :param deployment_status: The deployment status summary for all - deployments created by the remediation. - :type deployment_status: - ~azure.mgmt.policyinsights.models.RemediationDeploymentSummary - :ivar id: The ID of the remediation. - :vartype id: str - :ivar type: The type of the remediation. - :vartype type: str - :ivar name: The name of the remediation. - :vartype name: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'policy_assignment_id': {'key': 'properties.policyAssignmentId', 'type': 'str'}, - 'policy_definition_reference_id': {'key': 'properties.policyDefinitionReferenceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, - 'filters': {'key': 'properties.filters', 'type': 'RemediationFilters'}, - 'deployment_status': {'key': 'properties.deploymentStatus', 'type': 'RemediationDeploymentSummary'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, policy_assignment_id: str=None, policy_definition_reference_id: str=None, filters=None, deployment_status=None, **kwargs) -> None: - super(Remediation, self).__init__(**kwargs) - self.policy_assignment_id = policy_assignment_id - self.policy_definition_reference_id = policy_definition_reference_id - self.provisioning_state = None - self.created_on = None - self.last_updated_on = None - self.filters = filters - self.deployment_status = deployment_status - self.id = None - self.type = None - self.name = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summarize_results.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summarize_results.py deleted file mode 100644 index 60c4d510c6b4..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summarize_results.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SummarizeResults(Model): - """Summarize action results. - - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param odatacount: OData entity count; represents the number of summaries - returned; always set to 1. - :type odatacount: int - :param value: Summarize action results. - :type value: list[~azure.mgmt.policyinsights.models.Summary] - """ - - _validation = { - 'odatacount': {'maximum': 1, 'minimum': 1}, - } - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[Summary]'}, - } - - def __init__(self, **kwargs): - super(SummarizeResults, self).__init__(**kwargs) - self.odatacontext = kwargs.get('odatacontext', None) - self.odatacount = kwargs.get('odatacount', None) - self.value = kwargs.get('value', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summarize_results_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summarize_results_py3.py deleted file mode 100644 index 40345a92bfb7..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summarize_results_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SummarizeResults(Model): - """Summarize action results. - - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param odatacount: OData entity count; represents the number of summaries - returned; always set to 1. - :type odatacount: int - :param value: Summarize action results. - :type value: list[~azure.mgmt.policyinsights.models.Summary] - """ - - _validation = { - 'odatacount': {'maximum': 1, 'minimum': 1}, - } - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'odatacount': {'key': '@odata\\.count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[Summary]'}, - } - - def __init__(self, *, odatacontext: str=None, odatacount: int=None, value=None, **kwargs) -> None: - super(SummarizeResults, self).__init__(**kwargs) - self.odatacontext = odatacontext - self.odatacount = odatacount - self.value = value diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary.py deleted file mode 100644 index 75aee548d8e0..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Summary(Model): - """Summary results. - - :param odataid: OData entity ID; always set to null since summaries do not - have an entity ID. - :type odataid: str - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param results: Non-compliance summary for all policy assignments. - :type results: ~azure.mgmt.policyinsights.models.SummaryResults - :param policy_assignments: Policy assignments summary. - :type policy_assignments: - list[~azure.mgmt.policyinsights.models.PolicyAssignmentSummary] - """ - - _attribute_map = { - 'odataid': {'key': '@odata\\.id', 'type': 'str'}, - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'results': {'key': 'results', 'type': 'SummaryResults'}, - 'policy_assignments': {'key': 'policyAssignments', 'type': '[PolicyAssignmentSummary]'}, - } - - def __init__(self, **kwargs): - super(Summary, self).__init__(**kwargs) - self.odataid = kwargs.get('odataid', None) - self.odatacontext = kwargs.get('odatacontext', None) - self.results = kwargs.get('results', None) - self.policy_assignments = kwargs.get('policy_assignments', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_py3.py deleted file mode 100644 index 9ede585c9116..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Summary(Model): - """Summary results. - - :param odataid: OData entity ID; always set to null since summaries do not - have an entity ID. - :type odataid: str - :param odatacontext: OData context string; used by OData clients to - resolve type information based on metadata. - :type odatacontext: str - :param results: Non-compliance summary for all policy assignments. - :type results: ~azure.mgmt.policyinsights.models.SummaryResults - :param policy_assignments: Policy assignments summary. - :type policy_assignments: - list[~azure.mgmt.policyinsights.models.PolicyAssignmentSummary] - """ - - _attribute_map = { - 'odataid': {'key': '@odata\\.id', 'type': 'str'}, - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'results': {'key': 'results', 'type': 'SummaryResults'}, - 'policy_assignments': {'key': 'policyAssignments', 'type': '[PolicyAssignmentSummary]'}, - } - - def __init__(self, *, odataid: str=None, odatacontext: str=None, results=None, policy_assignments=None, **kwargs) -> None: - super(Summary, self).__init__(**kwargs) - self.odataid = odataid - self.odatacontext = odatacontext - self.results = results - self.policy_assignments = policy_assignments diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_results.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_results.py deleted file mode 100644 index eedc207cfe04..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_results.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SummaryResults(Model): - """Non-compliance summary on a particular summary level. - - :param query_results_uri: HTTP POST URI for queryResults action on - Microsoft.PolicyInsights to retrieve raw results for the non-compliance - summary. - :type query_results_uri: str - :param non_compliant_resources: Number of non-compliant resources. - :type non_compliant_resources: int - :param non_compliant_policies: Number of non-compliant policies. - :type non_compliant_policies: int - """ - - _validation = { - 'non_compliant_resources': {'minimum': 0}, - 'non_compliant_policies': {'minimum': 0}, - } - - _attribute_map = { - 'query_results_uri': {'key': 'queryResultsUri', 'type': 'str'}, - 'non_compliant_resources': {'key': 'nonCompliantResources', 'type': 'int'}, - 'non_compliant_policies': {'key': 'nonCompliantPolicies', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SummaryResults, self).__init__(**kwargs) - self.query_results_uri = kwargs.get('query_results_uri', None) - self.non_compliant_resources = kwargs.get('non_compliant_resources', None) - self.non_compliant_policies = kwargs.get('non_compliant_policies', None) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_results_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_results_py3.py deleted file mode 100644 index a5bf422386e6..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/summary_results_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SummaryResults(Model): - """Non-compliance summary on a particular summary level. - - :param query_results_uri: HTTP POST URI for queryResults action on - Microsoft.PolicyInsights to retrieve raw results for the non-compliance - summary. - :type query_results_uri: str - :param non_compliant_resources: Number of non-compliant resources. - :type non_compliant_resources: int - :param non_compliant_policies: Number of non-compliant policies. - :type non_compliant_policies: int - """ - - _validation = { - 'non_compliant_resources': {'minimum': 0}, - 'non_compliant_policies': {'minimum': 0}, - } - - _attribute_map = { - 'query_results_uri': {'key': 'queryResultsUri', 'type': 'str'}, - 'non_compliant_resources': {'key': 'nonCompliantResources', 'type': 'int'}, - 'non_compliant_policies': {'key': 'nonCompliantPolicies', 'type': 'int'}, - } - - def __init__(self, *, query_results_uri: str=None, non_compliant_resources: int=None, non_compliant_policies: int=None, **kwargs) -> None: - super(SummaryResults, self).__init__(**kwargs) - self.query_results_uri = query_results_uri - self.non_compliant_resources = non_compliant_resources - self.non_compliant_policies = non_compliant_policies diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/tracked_resource_modification_details.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/tracked_resource_modification_details.py deleted file mode 100644 index 471f19393d20..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/tracked_resource_modification_details.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackedResourceModificationDetails(Model): - """The details of the policy triggered deployment that created or modified the - tracked resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar policy_details: The details of the policy that created or modified - the tracked resource. - :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails - :ivar deployment_id: The ID of the deployment that created or modified the - tracked resource. - :vartype deployment_id: str - :ivar deployment_time: Timestamp of the deployment that created or - modified the tracked resource. - :vartype deployment_time: datetime - """ - - _validation = { - 'policy_details': {'readonly': True}, - 'deployment_id': {'readonly': True}, - 'deployment_time': {'readonly': True}, - } - - _attribute_map = { - 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, - 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, - 'deployment_time': {'key': 'deploymentTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(TrackedResourceModificationDetails, self).__init__(**kwargs) - self.policy_details = None - self.deployment_id = None - self.deployment_time = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/tracked_resource_modification_details_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/tracked_resource_modification_details_py3.py deleted file mode 100644 index afdbf4b87bac..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/tracked_resource_modification_details_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackedResourceModificationDetails(Model): - """The details of the policy triggered deployment that created or modified the - tracked resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar policy_details: The details of the policy that created or modified - the tracked resource. - :vartype policy_details: ~azure.mgmt.policyinsights.models.PolicyDetails - :ivar deployment_id: The ID of the deployment that created or modified the - tracked resource. - :vartype deployment_id: str - :ivar deployment_time: Timestamp of the deployment that created or - modified the tracked resource. - :vartype deployment_time: datetime - """ - - _validation = { - 'policy_details': {'readonly': True}, - 'deployment_id': {'readonly': True}, - 'deployment_time': {'readonly': True}, - } - - _attribute_map = { - 'policy_details': {'key': 'policyDetails', 'type': 'PolicyDetails'}, - 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, - 'deployment_time': {'key': 'deploymentTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(TrackedResourceModificationDetails, self).__init__(**kwargs) - self.policy_details = None - self.deployment_id = None - self.deployment_time = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/typed_error_info.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/typed_error_info.py deleted file mode 100644 index a6f6075fb316..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/typed_error_info.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TypedErrorInfo(Model): - """Scenario specific error details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of included error details. - :vartype type: str - :ivar info: The scenario specific error details. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(TypedErrorInfo, self).__init__(**kwargs) - self.type = None - self.info = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/typed_error_info_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/typed_error_info_py3.py deleted file mode 100644 index ed236615c925..000000000000 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/typed_error_info_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TypedErrorInfo(Model): - """Scenario specific error details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of included error details. - :vartype type: str - :ivar info: The scenario specific error details. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs) -> None: - super(TypedErrorInfo, self).__init__(**kwargs) - self.type = None - self.info = None diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/__init__.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/__init__.py index 09d836a14869..abab01e9ff3d 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/__init__.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/__init__.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .policy_tracked_resources_operations import PolicyTrackedResourcesOperations -from .remediations_operations import RemediationsOperations -from .policy_events_operations import PolicyEventsOperations -from .policy_states_operations import PolicyStatesOperations -from .operations import Operations +from ._policy_tracked_resources_operations import PolicyTrackedResourcesOperations +from ._remediations_operations import RemediationsOperations +from ._policy_events_operations import PolicyEventsOperations +from ._policy_states_operations import PolicyStatesOperations +from ._operations import Operations __all__ = [ 'PolicyTrackedResourcesOperations', diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/operations.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_operations.py similarity index 92% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/operations.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_operations.py index 05e3abb4bdde..83f792fc237e 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/operations.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_operations.py @@ -18,11 +18,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-07-01-preview". + :ivar api_version: Client Api Version. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-07-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -76,7 +78,6 @@ def list( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationsListResults', response) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_events_operations.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_events_operations.py similarity index 99% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_events_operations.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_events_operations.py index f52be2d2d3b5..38ff6aef394b 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_events_operations.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_events_operations.py @@ -18,6 +18,8 @@ class PolicyEventsOperations(object): """PolicyEventsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -128,7 +130,6 @@ def list_query_results_for_management_group( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -224,7 +225,6 @@ def list_query_results_for_subscription( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -323,7 +323,6 @@ def list_query_results_for_resource_group( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -419,7 +418,6 @@ def list_query_results_for_resource( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -519,7 +517,6 @@ def list_query_results_for_policy_set_definition( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -619,7 +616,6 @@ def list_query_results_for_policy_definition( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -719,7 +715,6 @@ def list_query_results_for_subscription_level_policy_assignment( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -822,7 +817,6 @@ def list_query_results_for_resource_group_level_policy_assignment( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyEventsQueryResults', response) @@ -880,7 +874,6 @@ def get_metadata( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('str', response) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_states_operations.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_states_operations.py similarity index 96% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_states_operations.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_states_operations.py index 8784b249626d..b0b671d622bc 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_states_operations.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_states_operations.py @@ -18,12 +18,14 @@ class PolicyStatesOperations(object): """PolicyStatesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. :ivar management_groups_namespace: The namespace for Microsoft Management RP; only "Microsoft.Management" is allowed. Constant value: "Microsoft.Management". - :ivar api_version: Client Api Version. Constant value: "2018-07-01-preview". + :ivar api_version: Client Api Version. Constant value: "2019-10-01". :ivar policy_states_summary_resource: The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. Constant value: "latest". :ivar authorization_namespace: The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed. Constant value: "Microsoft.Authorization". """ @@ -36,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.management_groups_namespace = "Microsoft.Management" - self.api_version = "2018-07-01-preview" + self.api_version = "2019-10-01" self.policy_states_summary_resource = "latest" self.authorization_namespace = "Microsoft.Authorization" @@ -134,7 +136,6 @@ def list_query_results_for_management_group( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -216,7 +217,6 @@ def summarize_for_management_group( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -318,7 +318,6 @@ def list_query_results_for_subscription( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -399,7 +398,6 @@ def summarize_for_subscription( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -504,7 +502,6 @@ def list_query_results_for_resource_group( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -588,7 +585,6 @@ def summarize_for_resource_group( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -695,7 +691,6 @@ def list_query_results_for_resource( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -776,7 +771,6 @@ def summarize_for_resource( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -882,7 +876,6 @@ def list_query_results_for_policy_set_definition( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -968,7 +961,6 @@ def summarize_for_policy_set_definition( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -1074,7 +1066,6 @@ def list_query_results_for_policy_definition( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -1159,7 +1150,6 @@ def summarize_for_policy_definition( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -1265,7 +1255,6 @@ def list_query_results_for_subscription_level_policy_assignment( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -1350,7 +1339,6 @@ def summarize_for_subscription_level_policy_assignment( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -1459,7 +1447,6 @@ def list_query_results_for_resource_group_level_policy_assignment( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PolicyStatesQueryResults', response) @@ -1548,7 +1535,6 @@ def summarize_for_resource_group_level_policy_assignment( raise models.QueryFailureException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SummarizeResults', response) @@ -1558,61 +1544,3 @@ def summarize_for_resource_group_level_policy_assignment( return deserialized summarize_for_resource_group_level_policy_assignment.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize'} - - def get_metadata( - self, scope, custom_headers=None, raw=False, **operation_config): - """Gets OData metadata XML document. - - :param scope: A valid scope, i.e. management group, subscription, - resource group, or resource ID. Scope used has no effect on metadata - returned. - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`QueryFailureException` - """ - # Construct URL - url = self.get_metadata.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.QueryFailureException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_metadata.metadata = {'url': '/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata'} diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_tracked_resources_operations.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_tracked_resources_operations.py similarity index 93% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_tracked_resources_operations.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_tracked_resources_operations.py index 12f49296ac67..62c3450c11b1 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/policy_tracked_resources_operations.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_policy_tracked_resources_operations.py @@ -18,6 +18,8 @@ class PolicyTrackedResourcesOperations(object): """PolicyTrackedResourcesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -66,8 +68,7 @@ def list_query_results_for_management_group( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_query_results_for_management_group.metadata['url'] @@ -102,6 +103,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -110,12 +116,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_query_results_for_management_group.metadata = {'url': '/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults'} @@ -146,8 +150,7 @@ def list_query_results_for_subscription( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_query_results_for_subscription.metadata['url'] @@ -181,6 +184,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -189,12 +197,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_query_results_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults'} @@ -227,8 +233,7 @@ def list_query_results_for_resource_group( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_query_results_for_resource_group.metadata['url'] @@ -263,6 +268,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -271,12 +281,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_query_results_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults'} @@ -307,8 +315,7 @@ def list_query_results_for_resource( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_query_results_for_resource.metadata['url'] @@ -342,6 +349,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -350,12 +362,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyTrackedResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_query_results_for_resource.metadata = {'url': '/{resourceId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults'} diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/remediations_operations.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_remediations_operations.py similarity index 97% rename from sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/remediations_operations.py rename to sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_remediations_operations.py index 10aa6e1ccf2f..0d06d1012dae 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/remediations_operations.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_remediations_operations.py @@ -18,6 +18,8 @@ class RemediationsOperations(object): """RemediationsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,8 +65,7 @@ def list_deployments_at_management_group( if query_options is not None: top = query_options.top - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_deployments_at_management_group.metadata['url'] @@ -97,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -105,12 +111,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_deployments_at_management_group.metadata = {'url': '/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments'} @@ -165,7 +169,6 @@ def cancel_at_management_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -202,8 +205,7 @@ def list_for_management_group( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_for_management_group.metadata['url'] @@ -237,6 +239,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -245,12 +252,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_for_management_group.metadata = {'url': '/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/remediations'} @@ -311,7 +316,6 @@ def create_or_update_at_management_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) if response.status_code == 201: @@ -374,7 +378,6 @@ def get_at_management_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -435,7 +438,6 @@ def delete_at_management_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -471,8 +473,7 @@ def list_deployments_at_subscription( if query_options is not None: top = query_options.top - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_deployments_at_subscription.metadata['url'] @@ -504,6 +505,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +518,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_deployments_at_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments'} @@ -571,7 +575,6 @@ def cancel_at_subscription( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -608,8 +611,7 @@ def list_for_subscription( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_for_subscription.metadata['url'] @@ -642,6 +644,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -650,12 +657,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations'} @@ -715,7 +720,6 @@ def create_or_update_at_subscription( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) if response.status_code == 201: @@ -777,7 +781,6 @@ def get_at_subscription( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -837,7 +840,6 @@ def delete_at_subscription( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -875,8 +877,7 @@ def list_deployments_at_resource_group( if query_options is not None: top = query_options.top - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_deployments_at_resource_group.metadata['url'] @@ -909,6 +910,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -917,12 +923,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_deployments_at_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments'} @@ -979,7 +983,6 @@ def cancel_at_resource_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -1018,8 +1021,7 @@ def list_for_resource_group( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_for_resource_group.metadata['url'] @@ -1053,6 +1055,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1061,12 +1068,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/remediations'} @@ -1129,7 +1134,6 @@ def create_or_update_at_resource_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) if response.status_code == 201: @@ -1194,7 +1198,6 @@ def get_at_resource_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -1257,7 +1260,6 @@ def delete_at_resource_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -1293,8 +1295,7 @@ def list_deployments_at_resource( if query_options is not None: top = query_options.top - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_deployments_at_resource.metadata['url'] @@ -1326,6 +1327,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1334,12 +1340,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationDeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_deployments_at_resource.metadata = {'url': '/{resourceId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments'} @@ -1393,7 +1397,6 @@ def cancel_at_resource( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -1430,8 +1433,7 @@ def list_for_resource( if query_options is not None: filter = query_options.filter - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_for_resource.metadata['url'] @@ -1464,6 +1466,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1472,12 +1479,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RemediationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_for_resource.metadata = {'url': '/{resourceId}/providers/Microsoft.PolicyInsights/remediations'} @@ -1537,7 +1542,6 @@ def create_or_update_at_resource( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) if response.status_code == 201: @@ -1599,7 +1603,6 @@ def get_at_resource( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) @@ -1659,7 +1662,6 @@ def delete_at_resource( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Remediation', response) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/setup.py b/sdk/policyinsights/azure-mgmt-policyinsights/setup.py index 7f916556d5fc..7c172ff529da 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/setup.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',