Skip to content

Commit

Permalink
Generated from d422c1b17bd8b542f4c158eb0e2573691e598566
Browse files Browse the repository at this point in the history
monitor readme fix
  • Loading branch information
SDK Automation committed May 30, 2020
1 parent adf6471 commit 458191e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
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'
4 changes: 3 additions & 1 deletion sdk/monitor/azure-mgmt-monitor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
pass

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd:
with open(os.path.join(package_folder_path, 'version.py')
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)

Expand Down

0 comments on commit 458191e

Please sign in to comment.