From d31fc050b152e907d4d372f7844047db2c4f9429 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 4 Jan 2021 14:05:12 +0000 Subject: [PATCH] CodeGen from PR 9790 in Azure/azure-rest-api-specs Merge f6e8cff81794e72e7fde5113d9dfb49c555afb97 into 4f48037eb2df7537f7468afe4b793ef4a31f5fe1 --- .../monitor/v2018_03_01/models/_models.py | 29 ++++++----------- .../monitor/v2018_03_01/models/_models_py3.py | 31 +++++++------------ 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py index bb3c8394d87b..6d00b873997f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py @@ -862,26 +862,24 @@ class MetricAlertResourcePatch(Model): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param tags: Resource tags :type tags: dict[str, str] - :param description: Required. the description of the metric alert that - will be included in the alert email. + :param description: the description of the metric alert that will be + included in the alert email. :type description: str - :param severity: Required. Alert severity {0, 1, 2, 3, 4} + :param severity: Alert severity {0, 1, 2, 3, 4} :type severity: int - :param enabled: Required. the flag that indicates whether the metric alert - is enabled. + :param enabled: the flag that indicates whether the metric alert is + enabled. :type enabled: bool :param scopes: the list of resource id's that this metric alert is scoped to. :type scopes: list[str] - :param evaluation_frequency: Required. how often the metric alert is - evaluated represented in ISO 8601 duration format. + :param evaluation_frequency: how often the metric alert is evaluated + represented in ISO 8601 duration format. :type evaluation_frequency: timedelta - :param window_size: Required. the period of time (in ISO 8601 duration - format) that is used to monitor alert activity based on the threshold. + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. :type window_size: timedelta :param target_resource_type: the resource type of the target resource(s) on which the alert is created/updated. Mandatory for @@ -891,8 +889,7 @@ class MetricAlertResourcePatch(Model): which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. :type target_resource_region: str - :param criteria: Required. defines the specific alert criteria - information. + :param criteria: defines the specific alert criteria information. :type criteria: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertCriteria :param auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true. @@ -906,12 +903,6 @@ class MetricAlertResourcePatch(Model): """ _validation = { - 'description': {'required': True}, - 'severity': {'required': True}, - 'enabled': {'required': True}, - 'evaluation_frequency': {'required': True}, - 'window_size': {'required': True}, - 'criteria': {'required': True}, 'last_updated_time': {'readonly': True}, } diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py index dd52c49ceb7a..3db3edbb3a4f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py @@ -862,26 +862,24 @@ class MetricAlertResourcePatch(Model): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param tags: Resource tags :type tags: dict[str, str] - :param description: Required. the description of the metric alert that - will be included in the alert email. + :param description: the description of the metric alert that will be + included in the alert email. :type description: str - :param severity: Required. Alert severity {0, 1, 2, 3, 4} + :param severity: Alert severity {0, 1, 2, 3, 4} :type severity: int - :param enabled: Required. the flag that indicates whether the metric alert - is enabled. + :param enabled: the flag that indicates whether the metric alert is + enabled. :type enabled: bool :param scopes: the list of resource id's that this metric alert is scoped to. :type scopes: list[str] - :param evaluation_frequency: Required. how often the metric alert is - evaluated represented in ISO 8601 duration format. + :param evaluation_frequency: how often the metric alert is evaluated + represented in ISO 8601 duration format. :type evaluation_frequency: timedelta - :param window_size: Required. the period of time (in ISO 8601 duration - format) that is used to monitor alert activity based on the threshold. + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. :type window_size: timedelta :param target_resource_type: the resource type of the target resource(s) on which the alert is created/updated. Mandatory for @@ -891,8 +889,7 @@ class MetricAlertResourcePatch(Model): which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. :type target_resource_region: str - :param criteria: Required. defines the specific alert criteria - information. + :param criteria: defines the specific alert criteria information. :type criteria: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertCriteria :param auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true. @@ -906,12 +903,6 @@ class MetricAlertResourcePatch(Model): """ _validation = { - 'description': {'required': True}, - 'severity': {'required': True}, - 'enabled': {'required': True}, - 'evaluation_frequency': {'required': True}, - 'window_size': {'required': True}, - 'criteria': {'required': True}, 'last_updated_time': {'readonly': True}, } @@ -931,7 +922,7 @@ class MetricAlertResourcePatch(Model): 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } - def __init__(self, *, description: str, severity: int, enabled: bool, evaluation_frequency, window_size, criteria, tags=None, scopes=None, target_resource_type: str=None, target_resource_region: str=None, auto_mitigate: bool=None, actions=None, **kwargs) -> None: + def __init__(self, *, tags=None, description: str=None, severity: int=None, enabled: bool=None, scopes=None, evaluation_frequency=None, window_size=None, target_resource_type: str=None, target_resource_region: str=None, criteria=None, auto_mitigate: bool=None, actions=None, **kwargs) -> None: super(MetricAlertResourcePatch, self).__init__(**kwargs) self.tags = tags self.description = description