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 security/resource-manager] Security - Updating API versions of alerts and pricing types #4423

Merged
merged 2 commits into from
Feb 28, 2019
Merged
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
5 changes: 3 additions & 2 deletions azure-mgmt-security/azure/mgmt/security/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

try:
from .pricing_py3 import Pricing
from .pricing_list_py3 import PricingList
from .asc_location_py3 import AscLocation
from .resource_py3 import Resource
from .security_contact_py3 import SecurityContact
Expand Down Expand Up @@ -65,6 +66,7 @@
from .allowed_connections_resource_py3 import AllowedConnectionsResource
except (SyntaxError, ImportError):
from .pricing import Pricing
from .pricing_list import PricingList
from .asc_location import AscLocation
from .resource import Resource
from .security_contact import SecurityContact
Expand Down Expand Up @@ -117,7 +119,6 @@
from .connected_resource import ConnectedResource
from .connectable_resource import ConnectableResource
from .allowed_connections_resource import AllowedConnectionsResource
from .pricing_paged import PricingPaged
from .security_contact_paged import SecurityContactPaged
from .workspace_setting_paged import WorkspaceSettingPaged
from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged
Expand Down Expand Up @@ -151,6 +152,7 @@

__all__ = [
'Pricing',
'PricingList',
'AscLocation',
'Resource',
'SecurityContact',
Expand Down Expand Up @@ -203,7 +205,6 @@
'ConnectedResource',
'ConnectableResource',
'AllowedConnectionsResource',
'PricingPaged',
'SecurityContactPaged',
'WorkspaceSettingPaged',
'AutoProvisioningSettingPaged',
Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-security/azure/mgmt/security/models/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Alert(Resource):
(Active, Blocked etc.)
:vartype action_taken: str
:ivar reported_severity: Estimated severity of this alert. Possible values
include: 'Silent', 'Information', 'Low', 'High'
include: 'Informational', 'Low', 'Medium', 'High'
:vartype reported_severity: str or
~azure.mgmt.security.models.ReportedSeverity
:ivar compromised_entity: The entity that the incident happened on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Alert(Resource):
(Active, Blocked etc.)
:vartype action_taken: str
:ivar reported_severity: Estimated severity of this alert. Possible values
include: 'Silent', 'Information', 'Low', 'High'
include: 'Informational', 'Low', 'Medium', 'High'
:vartype reported_severity: str or
~azure.mgmt.security.models.ReportedSeverity
:ivar compromised_entity: The entity that the incident happened on
Expand Down
10 changes: 8 additions & 2 deletions azure-mgmt-security/azure/mgmt/security/models/pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,31 @@ class Pricing(Resource):
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param pricing_tier: Required. Pricing tier type. Possible values include:
'Free', 'Standard'
:param pricing_tier: Required. The pricing tier value. Possible values
include: 'Free', 'Standard'
:type pricing_tier: str or ~azure.mgmt.security.models.PricingTier
:ivar free_trial_remaining_time: The duration left for the subscriptions
free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S).
:vartype free_trial_remaining_time: timedelta
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'pricing_tier': {'required': True},
'free_trial_remaining_time': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'},
'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'},
}

def __init__(self, **kwargs):
super(Pricing, self).__init__(**kwargs)
self.pricing_tier = kwargs.get('pricing_tier', None)
self.free_trial_remaining_time = None
34 changes: 34 additions & 0 deletions azure-mgmt-security/azure/mgmt/security/models/pricing_list.py
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 PricingList(Model):
"""List of pricing configurations response.

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

:param value: Required. List of pricing configurations
:type value: list[~azure.mgmt.security.models.Pricing]
"""

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

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

def __init__(self, **kwargs):
super(PricingList, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
34 changes: 34 additions & 0 deletions azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py
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 PricingList(Model):
"""List of pricing configurations response.

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

:param value: Required. List of pricing configurations
:type value: list[~azure.mgmt.security.models.Pricing]
"""

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

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

def __init__(self, *, value, **kwargs) -> None:
super(PricingList, self).__init__(**kwargs)
self.value = value
10 changes: 8 additions & 2 deletions azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,31 @@ class Pricing(Resource):
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param pricing_tier: Required. Pricing tier type. Possible values include:
'Free', 'Standard'
:param pricing_tier: Required. The pricing tier value. Possible values
include: 'Free', 'Standard'
:type pricing_tier: str or ~azure.mgmt.security.models.PricingTier
:ivar free_trial_remaining_time: The duration left for the subscriptions
free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S).
:vartype free_trial_remaining_time: timedelta
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'pricing_tier': {'required': True},
'free_trial_remaining_time': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'},
'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'},
}

def __init__(self, *, pricing_tier, **kwargs) -> None:
super(Pricing, self).__init__(**kwargs)
self.pricing_tier = pricing_tier
self.free_trial_remaining_time = None
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class SettingKind(str, Enum):

class ReportedSeverity(str, Enum):

silent = "Silent"
information = "Information"
informational = "Informational"
low = "Low"
medium = "Medium"
high = "High"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AlertsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: API version for the operation. Constant value: "2015-06-01-preview".
:ivar api_version: API version for the operation. Constant value: "2019-01-01".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2015-06-01-preview"
self.api_version = "2019-01-01"

self.config = config

Expand Down
Loading