Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR policyinsights/resource-manager] Najagasi/compliance paging #9023

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
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 PolicyMetadata
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
Expand Down Expand Up @@ -56,11 +54,9 @@
from ._models import PolicyDetails
from ._models import PolicyEvaluationDetails
from ._models import PolicyEvent
from ._models import PolicyEventsQueryResults
from ._models import PolicyGroupSummary
from ._models import PolicyMetadata
from ._models import PolicyState
from ._models import PolicyStatesQueryResults
from ._models import PolicyTrackedResource
from ._models import QueryFailure, QueryFailureException
from ._models import QueryFailureError
Expand All @@ -75,6 +71,8 @@
from ._models import SummaryResults
from ._models import TrackedResourceModificationDetails
from ._models import TypedErrorInfo
from ._paged_models import PolicyEventPaged
from ._paged_models import PolicyStatePaged
from ._paged_models import PolicyTrackedResourcePaged
from ._paged_models import RemediationDeploymentPaged
from ._paged_models import RemediationPaged
Expand All @@ -98,11 +96,9 @@
'PolicyDetails',
'PolicyEvaluationDetails',
'PolicyEvent',
'PolicyEventsQueryResults',
'PolicyGroupSummary',
'PolicyMetadata',
'PolicyState',
'PolicyStatesQueryResults',
'PolicyTrackedResource',
'QueryFailure', 'QueryFailureException',
'QueryFailureError',
Expand All @@ -120,6 +116,8 @@
'PolicyTrackedResourcePaged',
'RemediationDeploymentPaged',
'RemediationPaged',
'PolicyEventPaged',
'PolicyStatePaged',
'SlimPolicyMetadataPaged',
'ResourceDiscoveryMode',
'PolicyStatesResource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,36 +533,6 @@ def __init__(self, **kwargs):
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.

Expand Down Expand Up @@ -809,36 +779,6 @@ def __init__(self, **kwargs):
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,36 +533,6 @@ def __init__(self, *, additional_properties=None, odataid: str=None, odatacontex
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.

Expand Down Expand Up @@ -809,36 +779,6 @@ def __init__(self, *, additional_properties=None, odataid: str=None, odatacontex
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,32 @@ class RemediationPaged(Paged):
def __init__(self, *args, **kwargs):

super(RemediationPaged, self).__init__(*args, **kwargs)
class PolicyEventPaged(Paged):
"""
A paging container for iterating over a list of :class:`PolicyEvent <azure.mgmt.policyinsights.models.PolicyEvent>` object
"""

_attribute_map = {
'next_link': {'key': '@odata\\.nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[PolicyEvent]'}
}

def __init__(self, *args, **kwargs):

super(PolicyEventPaged, self).__init__(*args, **kwargs)
class PolicyStatePaged(Paged):
"""
A paging container for iterating over a list of :class:`PolicyState <azure.mgmt.policyinsights.models.PolicyState>` object
"""

_attribute_map = {
'next_link': {'key': '@odata\\.nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[PolicyState]'}
}

def __init__(self, *args, **kwargs):

super(PolicyStatePaged, self).__init__(*args, **kwargs)
class SlimPolicyMetadataPaged(Paged):
"""
A paging container for iterating over a list of :class:`SlimPolicyMetadata <azure.mgmt.policyinsights.models.SlimPolicyMetadata>` object
Expand Down
Loading