Source code for azure.mgmt.web.models.recommendation_rule_py3

# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .proxy_only_resource_py3 import ProxyOnlyResource


[docs]class RecommendationRule(ProxyOnlyResource): """Represents a recommendation rule that the recommendation engine can perform. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource Name. :vartype name: str :param kind: Kind of resource. :type kind: str :ivar type: Resource type. :vartype type: str :param recommendation_name: Unique name of the rule. :type recommendation_name: str :param display_name: UI friendly name of the rule. :type display_name: str :param message: Localized name of the rule (Good for UI). :type message: str :param recommendation_id: Recommendation ID of an associated recommendation object tied to the rule, if exists. If such an object doesn't exist, it is set to null. :type recommendation_id: str :param description: Localized detailed description of the rule. :type description: str :param action_name: Name of action that is recommended by this rule in string. :type action_name: str :param level: Level of impact indicating how critical this rule is. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' :type level: str or ~azure.mgmt.web.models.NotificationLevel :param channels: List of available channels that this rule applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All' :type channels: str or ~azure.mgmt.web.models.Channels :ivar category_tags: The list of category tags that this recommendation rule belongs to. :vartype category_tags: list[str] :param is_dynamic: True if this is associated with a dynamically added rule :type is_dynamic: bool :param extension_name: Extension name of the portal if exists. Applicable to dynamic rule only. :type extension_name: str :param blade_name: Deep link to a blade on the portal. Applicable to dynamic rule only. :type blade_name: str :param forward_link: Forward link to an external document associated with the rule. Applicable to dynamic rule only. :type forward_link: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'category_tags': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'message': {'key': 'properties.message', 'type': 'str'}, 'recommendation_id': {'key': 'properties.recommendationId', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'action_name': {'key': 'properties.actionName', 'type': 'str'}, 'level': {'key': 'properties.level', 'type': 'NotificationLevel'}, 'channels': {'key': 'properties.channels', 'type': 'Channels'}, 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, 'extension_name': {'key': 'properties.extensionName', 'type': 'str'}, 'blade_name': {'key': 'properties.bladeName', 'type': 'str'}, 'forward_link': {'key': 'properties.forwardLink', 'type': 'str'}, } def __init__(self, *, kind: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: super(RecommendationRule, self).__init__(kind=kind, **kwargs) self.recommendation_name = recommendation_name self.display_name = display_name self.message = message self.recommendation_id = recommendation_id self.description = description self.action_name = action_name self.level = level self.channels = channels self.category_tags = None self.is_dynamic = is_dynamic self.extension_name = extension_name self.blade_name = blade_name self.forward_link = forward_link