# coding: utf-8

"""
    Octopus Server API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from octopus_deploy_swagger_client.models.event_notification_subscription_filter import EventNotificationSubscriptionFilter  # noqa: F401,E501


class EventNotificationSubscription(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 = {
        'filter': 'EventNotificationSubscriptionFilter',
        'email_teams': 'list[str]',
        'email_frequency_period': 'str',
        'email_priority': 'str',
        'email_digest_last_processed': 'datetime',
        'email_digest_last_processed_event_auto_id': 'int',
        'email_show_dates_in_time_zone_id': 'str',
        'webhook_uri': 'str',
        'webhook_teams': 'list[str]',
        'webhook_timeout': 'str',
        'webhook_header_key': 'str',
        'webhook_header_value': 'str',
        'webhook_last_processed': 'datetime',
        'webhook_last_processed_event_auto_id': 'int'
    }

    attribute_map = {
        'filter': 'Filter',
        'email_teams': 'EmailTeams',
        'email_frequency_period': 'EmailFrequencyPeriod',
        'email_priority': 'EmailPriority',
        'email_digest_last_processed': 'EmailDigestLastProcessed',
        'email_digest_last_processed_event_auto_id': 'EmailDigestLastProcessedEventAutoId',
        'email_show_dates_in_time_zone_id': 'EmailShowDatesInTimeZoneId',
        'webhook_uri': 'WebhookURI',
        'webhook_teams': 'WebhookTeams',
        'webhook_timeout': 'WebhookTimeout',
        'webhook_header_key': 'WebhookHeaderKey',
        'webhook_header_value': 'WebhookHeaderValue',
        'webhook_last_processed': 'WebhookLastProcessed',
        'webhook_last_processed_event_auto_id': 'WebhookLastProcessedEventAutoId'
    }

    def __init__(self, filter=None, email_teams=None, email_frequency_period=None, email_priority=None, email_digest_last_processed=None, email_digest_last_processed_event_auto_id=None, email_show_dates_in_time_zone_id=None, webhook_uri=None, webhook_teams=None, webhook_timeout=None, webhook_header_key=None, webhook_header_value=None, webhook_last_processed=None, webhook_last_processed_event_auto_id=None):  # noqa: E501
        """EventNotificationSubscription - a model defined in Swagger"""  # noqa: E501

        self._filter = None
        self._email_teams = None
        self._email_frequency_period = None
        self._email_priority = None
        self._email_digest_last_processed = None
        self._email_digest_last_processed_event_auto_id = None
        self._email_show_dates_in_time_zone_id = None
        self._webhook_uri = None
        self._webhook_teams = None
        self._webhook_timeout = None
        self._webhook_header_key = None
        self._webhook_header_value = None
        self._webhook_last_processed = None
        self._webhook_last_processed_event_auto_id = None
        self.discriminator = None

        if filter is not None:
            self.filter = filter
        if email_teams is not None:
            self.email_teams = email_teams
        if email_frequency_period is not None:
            self.email_frequency_period = email_frequency_period
        if email_priority is not None:
            self.email_priority = email_priority
        if email_digest_last_processed is not None:
            self.email_digest_last_processed = email_digest_last_processed
        if email_digest_last_processed_event_auto_id is not None:
            self.email_digest_last_processed_event_auto_id = email_digest_last_processed_event_auto_id
        if email_show_dates_in_time_zone_id is not None:
            self.email_show_dates_in_time_zone_id = email_show_dates_in_time_zone_id
        if webhook_uri is not None:
            self.webhook_uri = webhook_uri
        if webhook_teams is not None:
            self.webhook_teams = webhook_teams
        if webhook_timeout is not None:
            self.webhook_timeout = webhook_timeout
        if webhook_header_key is not None:
            self.webhook_header_key = webhook_header_key
        if webhook_header_value is not None:
            self.webhook_header_value = webhook_header_value
        if webhook_last_processed is not None:
            self.webhook_last_processed = webhook_last_processed
        if webhook_last_processed_event_auto_id is not None:
            self.webhook_last_processed_event_auto_id = webhook_last_processed_event_auto_id

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


        :return: The filter of this EventNotificationSubscription.  # noqa: E501
        :rtype: EventNotificationSubscriptionFilter
        """
        return self._filter

    @filter.setter
    def filter(self, filter):
        """Sets the filter of this EventNotificationSubscription.


        :param filter: The filter of this EventNotificationSubscription.  # noqa: E501
        :type: EventNotificationSubscriptionFilter
        """

        self._filter = filter

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


        :return: The email_teams of this EventNotificationSubscription.  # noqa: E501
        :rtype: list[str]
        """
        return self._email_teams

    @email_teams.setter
    def email_teams(self, email_teams):
        """Sets the email_teams of this EventNotificationSubscription.


        :param email_teams: The email_teams of this EventNotificationSubscription.  # noqa: E501
        :type: list[str]
        """

        self._email_teams = email_teams

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


        :return: The email_frequency_period of this EventNotificationSubscription.  # noqa: E501
        :rtype: str
        """
        return self._email_frequency_period

    @email_frequency_period.setter
    def email_frequency_period(self, email_frequency_period):
        """Sets the email_frequency_period of this EventNotificationSubscription.


        :param email_frequency_period: The email_frequency_period of this EventNotificationSubscription.  # noqa: E501
        :type: str
        """

        self._email_frequency_period = email_frequency_period

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


        :return: The email_priority of this EventNotificationSubscription.  # noqa: E501
        :rtype: str
        """
        return self._email_priority

    @email_priority.setter
    def email_priority(self, email_priority):
        """Sets the email_priority of this EventNotificationSubscription.


        :param email_priority: The email_priority of this EventNotificationSubscription.  # noqa: E501
        :type: str
        """
        allowed_values = ["Normal", "Low", "High"]  # noqa: E501
        if email_priority not in allowed_values:
            raise ValueError(
                "Invalid value for `email_priority` ({0}), must be one of {1}"  # noqa: E501
                .format(email_priority, allowed_values)
            )

        self._email_priority = email_priority

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


        :return: The email_digest_last_processed of this EventNotificationSubscription.  # noqa: E501
        :rtype: datetime
        """
        return self._email_digest_last_processed

    @email_digest_last_processed.setter
    def email_digest_last_processed(self, email_digest_last_processed):
        """Sets the email_digest_last_processed of this EventNotificationSubscription.


        :param email_digest_last_processed: The email_digest_last_processed of this EventNotificationSubscription.  # noqa: E501
        :type: datetime
        """

        self._email_digest_last_processed = email_digest_last_processed

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


        :return: The email_digest_last_processed_event_auto_id of this EventNotificationSubscription.  # noqa: E501
        :rtype: int
        """
        return self._email_digest_last_processed_event_auto_id

    @email_digest_last_processed_event_auto_id.setter
    def email_digest_last_processed_event_auto_id(self, email_digest_last_processed_event_auto_id):
        """Sets the email_digest_last_processed_event_auto_id of this EventNotificationSubscription.


        :param email_digest_last_processed_event_auto_id: The email_digest_last_processed_event_auto_id of this EventNotificationSubscription.  # noqa: E501
        :type: int
        """

        self._email_digest_last_processed_event_auto_id = email_digest_last_processed_event_auto_id

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


        :return: The email_show_dates_in_time_zone_id of this EventNotificationSubscription.  # noqa: E501
        :rtype: str
        """
        return self._email_show_dates_in_time_zone_id

    @email_show_dates_in_time_zone_id.setter
    def email_show_dates_in_time_zone_id(self, email_show_dates_in_time_zone_id):
        """Sets the email_show_dates_in_time_zone_id of this EventNotificationSubscription.


        :param email_show_dates_in_time_zone_id: The email_show_dates_in_time_zone_id of this EventNotificationSubscription.  # noqa: E501
        :type: str
        """

        self._email_show_dates_in_time_zone_id = email_show_dates_in_time_zone_id

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


        :return: The webhook_uri of this EventNotificationSubscription.  # noqa: E501
        :rtype: str
        """
        return self._webhook_uri

    @webhook_uri.setter
    def webhook_uri(self, webhook_uri):
        """Sets the webhook_uri of this EventNotificationSubscription.


        :param webhook_uri: The webhook_uri of this EventNotificationSubscription.  # noqa: E501
        :type: str
        """

        self._webhook_uri = webhook_uri

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


        :return: The webhook_teams of this EventNotificationSubscription.  # noqa: E501
        :rtype: list[str]
        """
        return self._webhook_teams

    @webhook_teams.setter
    def webhook_teams(self, webhook_teams):
        """Sets the webhook_teams of this EventNotificationSubscription.


        :param webhook_teams: The webhook_teams of this EventNotificationSubscription.  # noqa: E501
        :type: list[str]
        """

        self._webhook_teams = webhook_teams

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


        :return: The webhook_timeout of this EventNotificationSubscription.  # noqa: E501
        :rtype: str
        """
        return self._webhook_timeout

    @webhook_timeout.setter
    def webhook_timeout(self, webhook_timeout):
        """Sets the webhook_timeout of this EventNotificationSubscription.


        :param webhook_timeout: The webhook_timeout of this EventNotificationSubscription.  # noqa: E501
        :type: str
        """

        self._webhook_timeout = webhook_timeout

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


        :return: The webhook_header_key of this EventNotificationSubscription.  # noqa: E501
        :rtype: str
        """
        return self._webhook_header_key

    @webhook_header_key.setter
    def webhook_header_key(self, webhook_header_key):
        """Sets the webhook_header_key of this EventNotificationSubscription.


        :param webhook_header_key: The webhook_header_key of this EventNotificationSubscription.  # noqa: E501
        :type: str
        """

        self._webhook_header_key = webhook_header_key

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


        :return: The webhook_header_value of this EventNotificationSubscription.  # noqa: E501
        :rtype: str
        """
        return self._webhook_header_value

    @webhook_header_value.setter
    def webhook_header_value(self, webhook_header_value):
        """Sets the webhook_header_value of this EventNotificationSubscription.


        :param webhook_header_value: The webhook_header_value of this EventNotificationSubscription.  # noqa: E501
        :type: str
        """

        self._webhook_header_value = webhook_header_value

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


        :return: The webhook_last_processed of this EventNotificationSubscription.  # noqa: E501
        :rtype: datetime
        """
        return self._webhook_last_processed

    @webhook_last_processed.setter
    def webhook_last_processed(self, webhook_last_processed):
        """Sets the webhook_last_processed of this EventNotificationSubscription.


        :param webhook_last_processed: The webhook_last_processed of this EventNotificationSubscription.  # noqa: E501
        :type: datetime
        """

        self._webhook_last_processed = webhook_last_processed

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


        :return: The webhook_last_processed_event_auto_id of this EventNotificationSubscription.  # noqa: E501
        :rtype: int
        """
        return self._webhook_last_processed_event_auto_id

    @webhook_last_processed_event_auto_id.setter
    def webhook_last_processed_event_auto_id(self, webhook_last_processed_event_auto_id):
        """Sets the webhook_last_processed_event_auto_id of this EventNotificationSubscription.


        :param webhook_last_processed_event_auto_id: The webhook_last_processed_event_auto_id of this EventNotificationSubscription.  # noqa: E501
        :type: int
        """

        self._webhook_last_processed_event_auto_id = webhook_last_processed_event_auto_id

    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
        if issubclass(EventNotificationSubscription, dict):
            for key, value in self.items():
                result[key] = 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, EventNotificationSubscription):
            return False

        return self.__dict__ == other.__dict__

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