# coding: utf-8

"""
    Python SDK for Opsgenie REST API

    Python SDK for Opsgenie REST API  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Contact: support@opsgenie.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class CreateIncidentPayload(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'message': 'str',
        'description': 'str',
        'responders': 'list[Recipient]',
        'tags': 'list[str]',
        'details': 'dict(str, str)',
        'priority': 'str',
        'note': 'str',
        'service_id': 'str',
        'status_page_entry': 'dict(str, StatusPageEntry)',
        'notify_stakeholders': 'bool'
    }

    attribute_map = {
        'message': 'message',
        'description': 'description',
        'responders': 'responders',
        'tags': 'tags',
        'details': 'details',
        'priority': 'priority',
        'note': 'note',
        'service_id': 'serviceId',
        'status_page_entry': 'statusPageEntry',
        'notify_stakeholders': 'notifyStakeholders'
    }

    def __init__(self, message=None, description=None, responders=None, tags=None, details=None, priority=None, note=None, service_id=None, status_page_entry=None, notify_stakeholders=None):  # noqa: E501
        """CreateIncidentPayload - a model defined in OpenAPI"""  # noqa: E501

        self._message = None
        self._description = None
        self._responders = None
        self._tags = None
        self._details = None
        self._priority = None
        self._note = None
        self._service_id = None
        self._status_page_entry = None
        self._notify_stakeholders = None
        self.discriminator = None

        if message is not None:
            self.message = message
        if description is not None:
            self.description = description
        if responders is not None:
            self.responders = responders
        if tags is not None:
            self.tags = tags
        if details is not None:
            self.details = details
        if priority is not None:
            self.priority = priority
        if note is not None:
            self.note = note
        if service_id is not None:
            self.service_id = service_id
        if status_page_entry is not None:
            self.status_page_entry = status_page_entry
        if notify_stakeholders is not None:
            self.notify_stakeholders = notify_stakeholders

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

        Message of the incident  # noqa: E501

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

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

        Message of the incident  # noqa: E501

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

        self._message = message

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

        Description field of the incident that is generally used to provide a detailed information about the incident.  # noqa: E501

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

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

        Description field of the incident that is generally used to provide a detailed information about the incident.  # noqa: E501

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

        self._description = description

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

        Responders that the incident will be routed to send notifications  # noqa: E501

        :return: The responders of this CreateIncidentPayload.  # noqa: E501
        :rtype: list[Recipient]
        """
        return self._responders

    @responders.setter
    def responders(self, responders):
        """Sets the responders of this CreateIncidentPayload.

        Responders that the incident will be routed to send notifications  # noqa: E501

        :param responders: The responders of this CreateIncidentPayload.  # noqa: E501
        :type: list[Recipient]
        """

        self._responders = responders

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

        Tags of the incident.  # noqa: E501

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

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

        Tags of the incident.  # noqa: E501

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

        self._tags = tags

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

        Map of key-value pairs to use as custom properties of the incident  # noqa: E501

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

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

        Map of key-value pairs to use as custom properties of the incident  # noqa: E501

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

        self._details = details

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

        Priority level of the incident  # noqa: E501

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

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

        Priority level of the incident  # noqa: E501

        :param priority: The priority of this CreateIncidentPayload.  # 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

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

        Additional note that will be added while creating the incident  # noqa: E501

        :return: The note of this CreateIncidentPayload.  # noqa: E501
        :rtype: str
        """
        return self._note

    @note.setter
    def note(self, note):
        """Sets the note of this CreateIncidentPayload.

        Additional note that will be added while creating the incident  # noqa: E501

        :param note: The note of this CreateIncidentPayload.  # noqa: E501
        :type: str
        """

        self._note = note

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

        Service on which incident will be created.  # noqa: E501

        :return: The service_id of this CreateIncidentPayload.  # noqa: E501
        :rtype: str
        """
        return self._service_id

    @service_id.setter
    def service_id(self, service_id):
        """Sets the service_id of this CreateIncidentPayload.

        Service on which incident will be created.  # noqa: E501

        :param service_id: The service_id of this CreateIncidentPayload.  # noqa: E501
        :type: str
        """

        self._service_id = service_id

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

        Status page entry fields. If this field is leaved blank, message and description of incident will be used for title and detail respectively.  # noqa: E501

        :return: The status_page_entry of this CreateIncidentPayload.  # noqa: E501
        :rtype: dict(str, StatusPageEntry)
        """
        return self._status_page_entry

    @status_page_entry.setter
    def status_page_entry(self, status_page_entry):
        """Sets the status_page_entry of this CreateIncidentPayload.

        Status page entry fields. If this field is leaved blank, message and description of incident will be used for title and detail respectively.  # noqa: E501

        :param status_page_entry: The status_page_entry of this CreateIncidentPayload.  # noqa: E501
        :type: dict(str, StatusPageEntry)
        """

        self._status_page_entry = status_page_entry

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

        Indicate whether stakeholders are notified or not. Default value is false.  # noqa: E501

        :return: The notify_stakeholders of this CreateIncidentPayload.  # noqa: E501
        :rtype: bool
        """
        return self._notify_stakeholders

    @notify_stakeholders.setter
    def notify_stakeholders(self, notify_stakeholders):
        """Sets the notify_stakeholders of this CreateIncidentPayload.

        Indicate whether stakeholders are notified or not. Default value is false.  # noqa: E501

        :param notify_stakeholders: The notify_stakeholders of this CreateIncidentPayload.  # noqa: E501
        :type: bool
        """

        self._notify_stakeholders = notify_stakeholders

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

        for attr, _ in six.iteritems(self.openapi_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, CreateIncidentPayload):
            return False

        return self.__dict__ == other.__dict__

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