# coding: utf-8

"""
    OpsGenie REST API

    OpsGenie OpenAPI Specification  # noqa: E501

    OpenAPI spec version: 2.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from opsgenie_swagger.models.alert_policy import AlertPolicy  # noqa: F401,E501
from opsgenie_swagger.models.filter import Filter  # noqa: F401,E501
from opsgenie_swagger.models.recipient import Recipient  # noqa: F401,E501
from opsgenie_swagger.models.time_restriction_interval import TimeRestrictionInterval  # noqa: F401,E501


class ModifyAlertPolicy(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'ignore_original_alert_actions': 'bool',
        'ignore_original_details': 'bool',
        'ignore_original_recipients': 'bool',
        'ignore_original_tags': 'bool',
        'ignore_original_teams': 'bool',
        '_continue': 'bool',
        'alias': 'str',
        'description': 'str',
        'entity': 'str',
        'message': 'str',
        'source': 'str',
        'actions': 'list[str]',
        'recipients': 'list[Recipient]',
        'tags': 'list[str]',
        'details': 'dict(str, str)',
        'priority': 'str'
    }

    attribute_map = {
        'ignore_original_alert_actions': 'ignoreOriginalAlertActions',
        'ignore_original_details': 'ignoreOriginalDetails',
        'ignore_original_recipients': 'ignoreOriginalRecipients',
        'ignore_original_tags': 'ignoreOriginalTags',
        'ignore_original_teams': 'ignoreOriginalTeams',
        '_continue': 'continue',
        'alias': 'alias',
        'description': 'description',
        'entity': 'entity',
        'message': 'message',
        'source': 'source',
        'actions': 'actions',
        'recipients': 'recipients',
        'tags': 'tags',
        'details': 'details',
        'priority': 'priority'
    }

    def __init__(self, ignore_original_alert_actions=None, ignore_original_details=None, ignore_original_recipients=None, ignore_original_tags=None, ignore_original_teams=None, _continue=None, alias=None, description=None, entity=None, message=None, source=None, actions=None, recipients=None, tags=None, details=None, priority=None):  # noqa: E501
        """ModifyAlertPolicy - a model defined in Swagger"""  # noqa: E501

        self._ignore_original_alert_actions = None
        self._ignore_original_details = None
        self._ignore_original_recipients = None
        self._ignore_original_tags = None
        self._ignore_original_teams = None
        self.__continue = None
        self._alias = None
        self._description = None
        self._entity = None
        self._message = None
        self._source = None
        self._actions = None
        self._recipients = None
        self._tags = None
        self._details = None
        self._priority = None
        self.discriminator = None

        if ignore_original_alert_actions is not None:
            self.ignore_original_alert_actions = ignore_original_alert_actions
        if ignore_original_details is not None:
            self.ignore_original_details = ignore_original_details
        if ignore_original_recipients is not None:
            self.ignore_original_recipients = ignore_original_recipients
        if ignore_original_tags is not None:
            self.ignore_original_tags = ignore_original_tags
        if ignore_original_teams is not None:
            self.ignore_original_teams = ignore_original_teams
        if _continue is not None:
            self._continue = _continue
        if alias is not None:
            self.alias = alias
        if description is not None:
            self.description = description
        if entity is not None:
            self.entity = entity
        if message is not None:
            self.message = message
        if source is not None:
            self.source = source
        if actions is not None:
            self.actions = actions
        if recipients is not None:
            self.recipients = recipients
        if tags is not None:
            self.tags = tags
        if details is not None:
            self.details = details
        if priority is not None:
            self.priority = priority

    @property
    def ignore_original_alert_actions(self):
        """Gets the ignore_original_alert_actions of this ModifyAlertPolicy.  # noqa: E501


        :return: The ignore_original_alert_actions of this ModifyAlertPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_original_alert_actions

    @ignore_original_alert_actions.setter
    def ignore_original_alert_actions(self, ignore_original_alert_actions):
        """Sets the ignore_original_alert_actions of this ModifyAlertPolicy.


        :param ignore_original_alert_actions: The ignore_original_alert_actions of this ModifyAlertPolicy.  # noqa: E501
        :type: bool
        """

        self._ignore_original_alert_actions = ignore_original_alert_actions

    @property
    def ignore_original_details(self):
        """Gets the ignore_original_details of this ModifyAlertPolicy.  # noqa: E501

        If set to true, policy will ignore the original details of the alert. Default value is false  # noqa: E501

        :return: The ignore_original_details of this ModifyAlertPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_original_details

    @ignore_original_details.setter
    def ignore_original_details(self, ignore_original_details):
        """Sets the ignore_original_details of this ModifyAlertPolicy.

        If set to true, policy will ignore the original details of the alert. Default value is false  # noqa: E501

        :param ignore_original_details: The ignore_original_details of this ModifyAlertPolicy.  # noqa: E501
        :type: bool
        """

        self._ignore_original_details = ignore_original_details

    @property
    def ignore_original_recipients(self):
        """Gets the ignore_original_recipients of this ModifyAlertPolicy.  # noqa: E501

        If set to true, policy will ignore the original recipients of the alert. Default value is false  # noqa: E501

        :return: The ignore_original_recipients of this ModifyAlertPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_original_recipients

    @ignore_original_recipients.setter
    def ignore_original_recipients(self, ignore_original_recipients):
        """Sets the ignore_original_recipients of this ModifyAlertPolicy.

        If set to true, policy will ignore the original recipients of the alert. Default value is false  # noqa: E501

        :param ignore_original_recipients: The ignore_original_recipients of this ModifyAlertPolicy.  # noqa: E501
        :type: bool
        """

        self._ignore_original_recipients = ignore_original_recipients

    @property
    def ignore_original_tags(self):
        """Gets the ignore_original_tags of this ModifyAlertPolicy.  # noqa: E501

        If set to true, policy will ignore the original tags of the alert. Default value is false  # noqa: E501

        :return: The ignore_original_tags of this ModifyAlertPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_original_tags

    @ignore_original_tags.setter
    def ignore_original_tags(self, ignore_original_tags):
        """Sets the ignore_original_tags of this ModifyAlertPolicy.

        If set to true, policy will ignore the original tags of the alert. Default value is false  # noqa: E501

        :param ignore_original_tags: The ignore_original_tags of this ModifyAlertPolicy.  # noqa: E501
        :type: bool
        """

        self._ignore_original_tags = ignore_original_tags

    @property
    def ignore_original_teams(self):
        """Gets the ignore_original_teams of this ModifyAlertPolicy.  # noqa: E501

        If set to true, policy will ignore the original teams of the alert. Default value is false  # noqa: E501

        :return: The ignore_original_teams of this ModifyAlertPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_original_teams

    @ignore_original_teams.setter
    def ignore_original_teams(self, ignore_original_teams):
        """Sets the ignore_original_teams of this ModifyAlertPolicy.

        If set to true, policy will ignore the original teams of the alert. Default value is false  # noqa: E501

        :param ignore_original_teams: The ignore_original_teams of this ModifyAlertPolicy.  # noqa: E501
        :type: bool
        """

        self._ignore_original_teams = ignore_original_teams

    @property
    def _continue(self):
        """Gets the _continue of this ModifyAlertPolicy.  # noqa: E501

        Will continue with other modify policies if set to true  # noqa: E501

        :return: The _continue of this ModifyAlertPolicy.  # noqa: E501
        :rtype: bool
        """
        return self.__continue

    @_continue.setter
    def _continue(self, _continue):
        """Sets the _continue of this ModifyAlertPolicy.

        Will continue with other modify policies if set to true  # noqa: E501

        :param _continue: The _continue of this ModifyAlertPolicy.  # noqa: E501
        :type: bool
        """

        self.__continue = _continue

    @property
    def alias(self):
        """Gets the alias of this ModifyAlertPolicy.  # noqa: E501

        Alias of the alert. You can use {{alias}} to refer to the original alias. Default value is {{alias}}  # noqa: E501

        :return: The alias of this ModifyAlertPolicy.  # noqa: E501
        :rtype: str
        """
        return self._alias

    @alias.setter
    def alias(self, alias):
        """Sets the alias of this ModifyAlertPolicy.

        Alias of the alert. You can use {{alias}} to refer to the original alias. Default value is {{alias}}  # noqa: E501

        :param alias: The alias of this ModifyAlertPolicy.  # noqa: E501
        :type: str
        """

        self._alias = alias

    @property
    def description(self):
        """Gets the description of this ModifyAlertPolicy.  # noqa: E501

        Description of the alert. You can use {{description}} to refer to the original alert description. Default value is {{description}}  # noqa: E501

        :return: The description of this ModifyAlertPolicy.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ModifyAlertPolicy.

        Description of the alert. You can use {{description}} to refer to the original alert description. Default value is {{description}}  # noqa: E501

        :param description: The description of this ModifyAlertPolicy.  # noqa: E501
        :type: str
        """

        self._description = description

    @property
    def entity(self):
        """Gets the entity of this ModifyAlertPolicy.  # noqa: E501

        Entity field of the alert. You can use {{entity}} to refer to the original entity. Default value is {{entity}}  # noqa: E501

        :return: The entity of this ModifyAlertPolicy.  # noqa: E501
        :rtype: str
        """
        return self._entity

    @entity.setter
    def entity(self, entity):
        """Sets the entity of this ModifyAlertPolicy.

        Entity field of the alert. You can use {{entity}} to refer to the original entity. Default value is {{entity}}  # noqa: E501

        :param entity: The entity of this ModifyAlertPolicy.  # noqa: E501
        :type: str
        """

        self._entity = entity

    @property
    def message(self):
        """Gets the message of this ModifyAlertPolicy.  # noqa: E501

        Message of the alert  # noqa: E501

        :return: The message of this ModifyAlertPolicy.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this ModifyAlertPolicy.

        Message of the alert  # noqa: E501

        :param message: The message of this ModifyAlertPolicy.  # noqa: E501
        :type: str
        """

        self._message = message

    @property
    def source(self):
        """Gets the source of this ModifyAlertPolicy.  # noqa: E501

        Source field of the alert. You can use {{source}} to refer to the original source. Default value is {{source}}  # noqa: E501

        :return: The source of this ModifyAlertPolicy.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this ModifyAlertPolicy.

        Source field of the alert. You can use {{source}} to refer to the original source. Default value is {{source}}  # noqa: E501

        :param source: The source of this ModifyAlertPolicy.  # noqa: E501
        :type: str
        """

        self._source = source

    @property
    def actions(self):
        """Gets the actions of this ModifyAlertPolicy.  # noqa: E501

        Alert actions as a list of strings to add to the alerts original actions value. If ignoreOriginalAlertActions field is set to true, this will replace the original actions.  # noqa: E501

        :return: The actions of this ModifyAlertPolicy.  # noqa: E501
        :rtype: list[str]
        """
        return self._actions

    @actions.setter
    def actions(self, actions):
        """Sets the actions of this ModifyAlertPolicy.

        Alert actions as a list of strings to add to the alerts original actions value. If ignoreOriginalAlertActions field is set to true, this will replace the original actions.  # noqa: E501

        :param actions: The actions of this ModifyAlertPolicy.  # noqa: E501
        :type: list[str]
        """

        self._actions = actions

    @property
    def recipients(self):
        """Gets the recipients of this ModifyAlertPolicy.  # noqa: E501

        Recipients to add to the alerts original recipients value as a list of escalations, schedules, teams, users or the reserved word none or all. If ignoreOriginalRecipients field is set to true, this will replace the original recipients.  # noqa: E501

        :return: The recipients of this ModifyAlertPolicy.  # noqa: E501
        :rtype: list[Recipient]
        """
        return self._recipients

    @recipients.setter
    def recipients(self, recipients):
        """Sets the recipients of this ModifyAlertPolicy.

        Recipients to add to the alerts original recipients value as a list of escalations, schedules, teams, users or the reserved word none or all. If ignoreOriginalRecipients field is set to true, this will replace the original recipients.  # noqa: E501

        :param recipients: The recipients of this ModifyAlertPolicy.  # noqa: E501
        :type: list[Recipient]
        """

        self._recipients = recipients

    @property
    def tags(self):
        """Gets the tags of this ModifyAlertPolicy.  # noqa: E501

        Tags to add to the alerts original tags value as a list of strings. If ignoreOriginalRecipients field is set to true, this will replace the original recipients.  # noqa: E501

        :return: The tags of this ModifyAlertPolicy.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this ModifyAlertPolicy.

        Tags to add to the alerts original tags value as a list of strings. If ignoreOriginalRecipients field is set to true, this will replace the original recipients.  # noqa: E501

        :param tags: The tags of this ModifyAlertPolicy.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

    @property
    def details(self):
        """Gets the details of this ModifyAlertPolicy.  # noqa: E501

        Custom properties to add to the alerts original details value as a list of strings. If ignoreOriginalDetails field is set to true, this will replace the original details.  # noqa: E501

        :return: The details of this ModifyAlertPolicy.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._details

    @details.setter
    def details(self, details):
        """Sets the details of this ModifyAlertPolicy.

        Custom properties to add to the alerts original details value as a list of strings. If ignoreOriginalDetails field is set to true, this will replace the original details.  # noqa: E501

        :param details: The details of this ModifyAlertPolicy.  # noqa: E501
        :type: dict(str, str)
        """

        self._details = details

    @property
    def priority(self):
        """Gets the priority of this ModifyAlertPolicy.  # noqa: E501

        Priority level of the alert  # noqa: E501

        :return: The priority of this ModifyAlertPolicy.  # noqa: E501
        :rtype: str
        """
        return self._priority

    @priority.setter
    def priority(self, priority):
        """Sets the priority of this ModifyAlertPolicy.

        Priority level of the alert  # noqa: E501

        :param priority: The priority of this ModifyAlertPolicy.  # noqa: E501
        :type: str
        """
        allowed_values = ["P1", "P2", "P3", "P4", "P5"]  # noqa: E501
        if priority not in allowed_values:
            raise ValueError(
                "Invalid value for `priority` ({0}), must be one of {1}"  # noqa: E501
                .format(priority, allowed_values)
            )

        self._priority = priority

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ModifyAlertPolicy):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
