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

[ReleasePR azure-mgmt-monitor] [Hub Generated] Review request for Microsoft.Insights to add version stable/2018-03-01 #10924

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 @@ -674,6 +674,7 @@ class MetricAlertCriteria(Model):

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: MetricAlertSingleResourceMultipleMetricCriteria,
WebtestLocationAvailabilityCriteria,
MetricAlertMultipleResourceMultipleMetricCriteria

All required parameters must be populated in order to send to Azure.
Expand All @@ -695,7 +696,7 @@ class MetricAlertCriteria(Model):
}

_subtype_map = {
'odatatype': {'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria': 'MetricAlertSingleResourceMultipleMetricCriteria', 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria': 'MetricAlertMultipleResourceMultipleMetricCriteria'}
'odatatype': {'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria': 'MetricAlertSingleResourceMultipleMetricCriteria', 'Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria': 'WebtestLocationAvailabilityCriteria', 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria': 'MetricAlertMultipleResourceMultipleMetricCriteria'}
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -1232,11 +1233,16 @@ def __init__(self, **kwargs):
self.service_uri = kwargs.get('service_uri', None)


class WebtestLocationAvailabilityCriteria(Model):
class WebtestLocationAvailabilityCriteria(MetricAlertCriteria):
"""Specifies the metric alert rule criteria for a web test resource.

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

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param web_test_id: Required. The Application Insights web test Id.
:type web_test_id: str
:param component_id: Required. The Application Insights resource Id.
Expand All @@ -1246,12 +1252,15 @@ class WebtestLocationAvailabilityCriteria(Model):
"""

_validation = {
'odatatype': {'required': True},
'web_test_id': {'required': True},
'component_id': {'required': True},
'failed_location_count': {'required': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'odatatype': {'key': 'odata\\.type', 'type': 'str'},
'web_test_id': {'key': 'webTestId', 'type': 'str'},
'component_id': {'key': 'componentId', 'type': 'str'},
'failed_location_count': {'key': 'failedLocationCount', 'type': 'float'},
Expand All @@ -1262,3 +1271,4 @@ def __init__(self, **kwargs):
self.web_test_id = kwargs.get('web_test_id', None)
self.component_id = kwargs.get('component_id', None)
self.failed_location_count = kwargs.get('failed_location_count', None)
self.odatatype = 'Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria'
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ class MetricAlertCriteria(Model):

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: MetricAlertSingleResourceMultipleMetricCriteria,
WebtestLocationAvailabilityCriteria,
MetricAlertMultipleResourceMultipleMetricCriteria

All required parameters must be populated in order to send to Azure.
Expand All @@ -695,7 +696,7 @@ class MetricAlertCriteria(Model):
}

_subtype_map = {
'odatatype': {'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria': 'MetricAlertSingleResourceMultipleMetricCriteria', 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria': 'MetricAlertMultipleResourceMultipleMetricCriteria'}
'odatatype': {'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria': 'MetricAlertSingleResourceMultipleMetricCriteria', 'Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria': 'WebtestLocationAvailabilityCriteria', 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria': 'MetricAlertMultipleResourceMultipleMetricCriteria'}
}

def __init__(self, *, additional_properties=None, **kwargs) -> None:
Expand Down Expand Up @@ -1232,11 +1233,16 @@ def __init__(self, *, name: str, service_uri: str, **kwargs) -> None:
self.service_uri = service_uri


class WebtestLocationAvailabilityCriteria(Model):
class WebtestLocationAvailabilityCriteria(MetricAlertCriteria):
"""Specifies the metric alert rule criteria for a web test resource.

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

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param web_test_id: Required. The Application Insights web test Id.
:type web_test_id: str
:param component_id: Required. The Application Insights resource Id.
Expand All @@ -1246,19 +1252,23 @@ class WebtestLocationAvailabilityCriteria(Model):
"""

_validation = {
'odatatype': {'required': True},
'web_test_id': {'required': True},
'component_id': {'required': True},
'failed_location_count': {'required': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'odatatype': {'key': 'odata\\.type', 'type': 'str'},
'web_test_id': {'key': 'webTestId', 'type': 'str'},
'component_id': {'key': 'componentId', 'type': 'str'},
'failed_location_count': {'key': 'failedLocationCount', 'type': 'float'},
}

def __init__(self, *, web_test_id: str, component_id: str, failed_location_count: float, **kwargs) -> None:
super(WebtestLocationAvailabilityCriteria, self).__init__(**kwargs)
def __init__(self, *, web_test_id: str, component_id: str, failed_location_count: float, additional_properties=None, **kwargs) -> None:
super(WebtestLocationAvailabilityCriteria, self).__init__(additional_properties=additional_properties, **kwargs)
self.web_test_id = web_test_id
self.component_id = component_id
self.failed_location_count = failed_location_count
self.odatatype = 'Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria'