Skip to content
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
20 changes: 14 additions & 6 deletions azure-mgmt-security/azure/mgmt/security/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
# --------------------------------------------------------------------------

try:
from .pricing_py3 import Pricing
from .pricing_list_py3 import PricingList
from .compliance_result_py3 import ComplianceResult
from .compliance_result_list_py3 import ComplianceResultList
from .asc_location_py3 import AscLocation
from .resource_py3 import Resource
from .pricing_py3 import Pricing
from .pricing_list_py3 import PricingList
from .alert_entity_py3 import AlertEntity
from .alert_confidence_reason_py3 import AlertConfidenceReason
from .alert_py3 import Alert
Expand Down Expand Up @@ -68,10 +70,12 @@
from .regulatory_compliance_control_py3 import RegulatoryComplianceControl
from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment
except (SyntaxError, ImportError):
from .pricing import Pricing
from .pricing_list import PricingList
from .compliance_result import ComplianceResult
from .compliance_result_list import ComplianceResultList
from .asc_location import AscLocation
from .resource import Resource
from .pricing import Pricing
from .pricing_list import PricingList
from .alert_entity import AlertEntity
from .alert_confidence_reason import AlertConfidenceReason
from .alert import Alert
Expand Down Expand Up @@ -144,6 +148,7 @@
from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged
from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged
from .security_center_enums import (
ResourceStatus,
PricingTier,
ReportedSeverity,
SettingKind,
Expand All @@ -161,10 +166,12 @@
)

__all__ = [
'Pricing',
'PricingList',
'ComplianceResult',
'ComplianceResultList',
'AscLocation',
'Resource',
'Pricing',
'PricingList',
'AlertEntity',
'AlertConfidenceReason',
'Alert',
Expand Down Expand Up @@ -236,6 +243,7 @@
'RegulatoryComplianceStandardPaged',
'RegulatoryComplianceControlPaged',
'RegulatoryComplianceAssessmentPaged',
'ResourceStatus',
'PricingTier',
'ReportedSeverity',
'SettingKind',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 .resource import Resource


class ComplianceResult(Resource):
"""a compliance result.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:ivar resource_status: The status of the resource regarding a single
assessment. Possible values include: 'Healthy', 'NotApplicable',
'OffByPolicy', 'NotHealthy'
:vartype resource_status: str or
~azure.mgmt.security.models.ResourceStatus
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'resource_status': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ComplianceResult, self).__init__(**kwargs)
self.resource_status = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 ComplianceResultList(Model):
"""List of compliance results response.

All required parameters must be populated in order to send to Azure.

:param value: Required. List of compliance results
:type value: list[~azure.mgmt.security.models.ComplianceResult]
"""

_validation = {
'value': {'required': True},
}

_attribute_map = {
'value': {'key': 'value', 'type': '[ComplianceResult]'},
}

def __init__(self, **kwargs):
super(ComplianceResultList, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 ComplianceResultList(Model):
"""List of compliance results response.

All required parameters must be populated in order to send to Azure.

:param value: Required. List of compliance results
:type value: list[~azure.mgmt.security.models.ComplianceResult]
"""

_validation = {
'value': {'required': True},
}

_attribute_map = {
'value': {'key': 'value', 'type': '[ComplianceResult]'},
}

def __init__(self, *, value, **kwargs) -> None:
super(ComplianceResultList, self).__init__(**kwargs)
self.value = value
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 .resource_py3 import Resource


class ComplianceResult(Resource):
"""a compliance result.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:ivar resource_status: The status of the resource regarding a single
assessment. Possible values include: 'Healthy', 'NotApplicable',
'OffByPolicy', 'NotHealthy'
:vartype resource_status: str or
~azure.mgmt.security.models.ResourceStatus
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'resource_status': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(ComplianceResult, self).__init__(**kwargs)
self.resource_status = None
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
from enum import Enum


class ResourceStatus(str, Enum):

healthy = "Healthy" #: This assessment on the resource is healthy
not_applicable = "NotApplicable" #: This assessment is not applicable to this resource
off_by_policy = "OffByPolicy" #: This assessment is turned off by policy on this subscription
not_healthy = "NotHealthy" #: This assessment on the resource is not healthy


class PricingTier(str, Enum):

free = "Free" #: Get free Azure security center experience with basic security features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .compliance_results_operations import ComplianceResultsOperations
from .pricings_operations import PricingsOperations
from .alerts_operations import AlertsOperations
from .settings_operations import SettingsOperations
Expand All @@ -31,6 +32,7 @@
from .regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations

__all__ = [
'ComplianceResultsOperations',
'PricingsOperations',
'AlertsOperations',
'SettingsOperations',
Expand Down
Loading