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 advisor/resource-manager] [Microsoft.Advisor] Add isAlertable property to metadata entity properties. (API is not live yet) #5415

Merged
merged 2 commits into from
May 24, 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
2 changes: 2 additions & 0 deletions azure-mgmt-advisor/azure/mgmt/advisor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from .operation_entity_paged import OperationEntityPaged
from .suppression_contract_paged import SuppressionContractPaged
from .advisor_management_client_enums import (
Scenario,
Category,
Impact,
Risk,
Expand All @@ -61,6 +62,7 @@
'ResourceRecommendationBasePaged',
'OperationEntityPaged',
'SuppressionContractPaged',
'Scenario',
'Category',
'Impact',
'Risk',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
from enum import Enum


class Scenario(str, Enum):

alerts = "Alerts"


class Category(str, Enum):

high_availability = "HighAvailability"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class MetadataEntity(Model):
:type display_name: str
:param depends_on: The list of keys on which this entity depends on.
:type depends_on: list[str]
:param applicable_scenarios: The list of scenarios applicable to this
metadata entity.
:type applicable_scenarios: list[str or
~azure.mgmt.advisor.models.Scenario]
:param supported_values: The list of supported values.
:type supported_values:
list[~azure.mgmt.advisor.models.MetadataSupportedValueDetail]
Expand All @@ -36,6 +40,7 @@ class MetadataEntity(Model):
'name': {'key': 'name', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'},
'applicable_scenarios': {'key': 'properties.applicableScenarios', 'type': '[str]'},
'supported_values': {'key': 'properties.supportedValues', 'type': '[MetadataSupportedValueDetail]'},
}

Expand All @@ -46,4 +51,5 @@ def __init__(self, **kwargs):
self.name = kwargs.get('name', None)
self.display_name = kwargs.get('display_name', None)
self.depends_on = kwargs.get('depends_on', None)
self.applicable_scenarios = kwargs.get('applicable_scenarios', None)
self.supported_values = kwargs.get('supported_values', None)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class MetadataEntity(Model):
:type display_name: str
:param depends_on: The list of keys on which this entity depends on.
:type depends_on: list[str]
:param applicable_scenarios: The list of scenarios applicable to this
metadata entity.
:type applicable_scenarios: list[str or
~azure.mgmt.advisor.models.Scenario]
:param supported_values: The list of supported values.
:type supported_values:
list[~azure.mgmt.advisor.models.MetadataSupportedValueDetail]
Expand All @@ -36,14 +40,16 @@ class MetadataEntity(Model):
'name': {'key': 'name', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'},
'applicable_scenarios': {'key': 'properties.applicableScenarios', 'type': '[str]'},
'supported_values': {'key': 'properties.supportedValues', 'type': '[MetadataSupportedValueDetail]'},
}

def __init__(self, *, id: str=None, type: str=None, name: str=None, display_name: str=None, depends_on=None, supported_values=None, **kwargs) -> None:
def __init__(self, *, id: str=None, type: str=None, name: str=None, display_name: str=None, depends_on=None, applicable_scenarios=None, supported_values=None, **kwargs) -> None:
super(MetadataEntity, self).__init__(**kwargs)
self.id = id
self.type = type
self.name = name
self.display_name = display_name
self.depends_on = depends_on
self.applicable_scenarios = applicable_scenarios
self.supported_values = supported_values