Skip to content

Commit

Permalink
[AutoPR policyinsights/resource-manager] Reorganize policyinsights; c…
Browse files Browse the repository at this point in the history
…hange modelAsString for x-ms-enum to true (#2107)

* Generated from 648b3651cc044b52ce58431a57ba3b7f7392fc2d

Reorganize files; change modelAsString for x-ms-enum to true

Reorganize files (remove resource type based subfolders; rename conflicting example files to have resource type name; change swagger spec files and MD file based on new file locations and names); change modelAsString for x-ms-enum to true based on API review board recommendation

* Generated from 14bce7a312971c5831a8e2bd1f70d167bd42d96d

Dummy change to kick the CI again
  • Loading branch information
AutorestCI authored Mar 7, 2018
1 parent 8c792e5 commit dce3ab7
Show file tree
Hide file tree
Showing 39 changed files with 4,493 additions and 0 deletions.
18 changes: 18 additions & 0 deletions azure-mgmt-policyinsights/azure/mgmt/policyinsights/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .policy_insights_client import PolicyInsightsClient
from .version import VERSION

__all__ = ['PolicyInsightsClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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.
# --------------------------------------------------------------------------

try:
from .policy_event_py3 import PolicyEvent
from .policy_events_query_results_py3 import PolicyEventsQueryResults
from .query_failure_error_py3 import QueryFailureError
from .query_failure_py3 import QueryFailure, QueryFailureException
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
except (SyntaxError, ImportError):
from .policy_event import PolicyEvent
from .policy_events_query_results import PolicyEventsQueryResults
from .query_failure_error import QueryFailureError
from .query_failure import QueryFailure, QueryFailureException
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_insights_client_enums import (
PolicyStatesResource,
)

__all__ = [
'PolicyEvent',
'PolicyEventsQueryResults',
'QueryFailureError',
'QueryFailure', 'QueryFailureException',
'PolicyState',
'PolicyStatesQueryResults',
'SummaryResults',
'PolicyDefinitionSummary',
'PolicyAssignmentSummary',
'Summary',
'SummarizeResults',
'OperationDisplay',
'Operation',
'OperationsListResults',
'QueryOptions',
'PolicyStatesResource',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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
Loading

0 comments on commit dce3ab7

Please sign in to comment.