Skip to content

Commit

Permalink
Generated from f99c05d07817bc049fdba480edc0dc7c2c9d0a53
Browse files Browse the repository at this point in the history
chnage description
  • Loading branch information
SDK Automation committed Sep 7, 2020
1 parent e67b96a commit 72ce55c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ class MultiMetricCriteria(Model):
:param dimensions: List of dimension conditions.
:type dimensions:
list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
:param skip_metric_validation: Allows creating an alert rule on a custom
metric that isn't yet emitted, by causing the metric validation to be
skipped.
:type skip_metric_validation: bool
:param criterion_type: Required. Constant filled by server.
:type criterion_type: str
"""
Expand All @@ -350,6 +354,7 @@ class MultiMetricCriteria(Model):
'metric_namespace': {'key': 'metricNamespace', 'type': 'str'},
'time_aggregation': {'key': 'timeAggregation', 'type': 'object'},
'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'},
'skip_metric_validation': {'key': 'skipMetricValidation', 'type': 'bool'},
'criterion_type': {'key': 'criterionType', 'type': 'str'},
}

Expand All @@ -365,6 +370,7 @@ def __init__(self, **kwargs):
self.metric_namespace = kwargs.get('metric_namespace', None)
self.time_aggregation = kwargs.get('time_aggregation', None)
self.dimensions = kwargs.get('dimensions', None)
self.skip_metric_validation = kwargs.get('skip_metric_validation', None)
self.criterion_type = None


Expand All @@ -387,6 +393,10 @@ class DynamicMetricCriteria(MultiMetricCriteria):
:param dimensions: List of dimension conditions.
:type dimensions:
list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
:param skip_metric_validation: Allows creating an alert rule on a custom
metric that isn't yet emitted, by causing the metric validation to be
skipped.
:type skip_metric_validation: bool
:param criterion_type: Required. Constant filled by server.
:type criterion_type: str
:param operator: Required. The operator used to compare the metric value
Expand Down Expand Up @@ -427,6 +437,7 @@ class DynamicMetricCriteria(MultiMetricCriteria):
'metric_namespace': {'key': 'metricNamespace', 'type': 'str'},
'time_aggregation': {'key': 'timeAggregation', 'type': 'object'},
'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'},
'skip_metric_validation': {'key': 'skipMetricValidation', 'type': 'bool'},
'criterion_type': {'key': 'criterionType', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'alert_sensitivity': {'key': 'alertSensitivity', 'type': 'str'},
Expand Down Expand Up @@ -1057,6 +1068,10 @@ class MetricCriteria(MultiMetricCriteria):
:param dimensions: List of dimension conditions.
:type dimensions:
list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
:param skip_metric_validation: Allows creating an alert rule on a custom
metric that isn't yet emitted, by causing the metric validation to be
skipped.
:type skip_metric_validation: bool
:param criterion_type: Required. Constant filled by server.
:type criterion_type: str
:param operator: Required. the criteria operator. Possible values include:
Expand Down Expand Up @@ -1084,6 +1099,7 @@ class MetricCriteria(MultiMetricCriteria):
'metric_namespace': {'key': 'metricNamespace', 'type': 'str'},
'time_aggregation': {'key': 'timeAggregation', 'type': 'object'},
'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'},
'skip_metric_validation': {'key': 'skipMetricValidation', 'type': 'bool'},
'criterion_type': {'key': 'criterionType', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'threshold': {'key': 'threshold', 'type': 'float'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ class MultiMetricCriteria(Model):
:param dimensions: List of dimension conditions.
:type dimensions:
list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
:param skip_metric_validation: Allows creating an alert rule on a custom
metric that isn't yet emitted, by causing the metric validation to be
skipped.
:type skip_metric_validation: bool
:param criterion_type: Required. Constant filled by server.
:type criterion_type: str
"""
Expand All @@ -350,21 +354,23 @@ class MultiMetricCriteria(Model):
'metric_namespace': {'key': 'metricNamespace', 'type': 'str'},
'time_aggregation': {'key': 'timeAggregation', 'type': 'object'},
'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'},
'skip_metric_validation': {'key': 'skipMetricValidation', 'type': 'bool'},
'criterion_type': {'key': 'criterionType', 'type': 'str'},
}

_subtype_map = {
'criterion_type': {'StaticThresholdCriterion': 'MetricCriteria', 'DynamicThresholdCriterion': 'DynamicMetricCriteria'}
}

def __init__(self, *, name: str, metric_name: str, time_aggregation, additional_properties=None, metric_namespace: str=None, dimensions=None, **kwargs) -> None:
def __init__(self, *, name: str, metric_name: str, time_aggregation, additional_properties=None, metric_namespace: str=None, dimensions=None, skip_metric_validation: bool=None, **kwargs) -> None:
super(MultiMetricCriteria, self).__init__(**kwargs)
self.additional_properties = additional_properties
self.name = name
self.metric_name = metric_name
self.metric_namespace = metric_namespace
self.time_aggregation = time_aggregation
self.dimensions = dimensions
self.skip_metric_validation = skip_metric_validation
self.criterion_type = None


Expand All @@ -387,6 +393,10 @@ class DynamicMetricCriteria(MultiMetricCriteria):
:param dimensions: List of dimension conditions.
:type dimensions:
list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
:param skip_metric_validation: Allows creating an alert rule on a custom
metric that isn't yet emitted, by causing the metric validation to be
skipped.
:type skip_metric_validation: bool
:param criterion_type: Required. Constant filled by server.
:type criterion_type: str
:param operator: Required. The operator used to compare the metric value
Expand Down Expand Up @@ -427,15 +437,16 @@ class DynamicMetricCriteria(MultiMetricCriteria):
'metric_namespace': {'key': 'metricNamespace', 'type': 'str'},
'time_aggregation': {'key': 'timeAggregation', 'type': 'object'},
'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'},
'skip_metric_validation': {'key': 'skipMetricValidation', 'type': 'bool'},
'criterion_type': {'key': 'criterionType', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'alert_sensitivity': {'key': 'alertSensitivity', 'type': 'str'},
'failing_periods': {'key': 'failingPeriods', 'type': 'DynamicThresholdFailingPeriods'},
'ignore_data_before': {'key': 'ignoreDataBefore', 'type': 'iso-8601'},
}

def __init__(self, *, name: str, metric_name: str, time_aggregation, operator, alert_sensitivity, failing_periods, additional_properties=None, metric_namespace: str=None, dimensions=None, ignore_data_before=None, **kwargs) -> None:
super(DynamicMetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, **kwargs)
def __init__(self, *, name: str, metric_name: str, time_aggregation, operator, alert_sensitivity, failing_periods, additional_properties=None, metric_namespace: str=None, dimensions=None, skip_metric_validation: bool=None, ignore_data_before=None, **kwargs) -> None:
super(DynamicMetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, skip_metric_validation=skip_metric_validation, **kwargs)
self.operator = operator
self.alert_sensitivity = alert_sensitivity
self.failing_periods = failing_periods
Expand Down Expand Up @@ -1057,6 +1068,10 @@ class MetricCriteria(MultiMetricCriteria):
:param dimensions: List of dimension conditions.
:type dimensions:
list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
:param skip_metric_validation: Allows creating an alert rule on a custom
metric that isn't yet emitted, by causing the metric validation to be
skipped.
:type skip_metric_validation: bool
:param criterion_type: Required. Constant filled by server.
:type criterion_type: str
:param operator: Required. the criteria operator. Possible values include:
Expand Down Expand Up @@ -1084,13 +1099,14 @@ class MetricCriteria(MultiMetricCriteria):
'metric_namespace': {'key': 'metricNamespace', 'type': 'str'},
'time_aggregation': {'key': 'timeAggregation', 'type': 'object'},
'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'},
'skip_metric_validation': {'key': 'skipMetricValidation', 'type': 'bool'},
'criterion_type': {'key': 'criterionType', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'threshold': {'key': 'threshold', 'type': 'float'},
}

def __init__(self, *, name: str, metric_name: str, time_aggregation, operator, threshold: float, additional_properties=None, metric_namespace: str=None, dimensions=None, **kwargs) -> None:
super(MetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, **kwargs)
def __init__(self, *, name: str, metric_name: str, time_aggregation, operator, threshold: float, additional_properties=None, metric_namespace: str=None, dimensions=None, skip_metric_validation: bool=None, **kwargs) -> None:
super(MetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, skip_metric_validation=skip_metric_validation, **kwargs)
self.operator = operator
self.threshold = threshold
self.criterion_type = 'StaticThresholdCriterion'
Expand Down

0 comments on commit 72ce55c

Please sign in to comment.