# coding: utf-8

"""
    Prompt.io APIs

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

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

import pprint
import re  # noqa: F401

import six

class EventEndpointModel(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 = {
        'id': 'int',
        'name': 'str',
        'endpoint': 'str',
        'active': 'bool',
        'creator_id': 'int',
        'created_timestamp': 'int',
        'auth_last_modified_user_id': 'int',
        'auth_last_modified_timestamp': 'int',
        'auth_type': 'str',
        'basic_auth_username': 'str',
        'basic_auth_password': 'str',
        'x_hub_signature_secret': 'str',
        'x_hub_signature_data': 'str',
        'events': 'list[str]',
        'custom_headers': 'list[KeyValueDataModel]'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'endpoint': 'endpoint',
        'active': 'active',
        'creator_id': 'creatorId',
        'created_timestamp': 'createdTimestamp',
        'auth_last_modified_user_id': 'authLastModifiedUserId',
        'auth_last_modified_timestamp': 'authLastModifiedTimestamp',
        'auth_type': 'authType',
        'basic_auth_username': 'basicAuthUsername',
        'basic_auth_password': 'basicAuthPassword',
        'x_hub_signature_secret': 'xHubSignatureSecret',
        'x_hub_signature_data': 'xHubSignatureData',
        'events': 'events',
        'custom_headers': 'customHeaders'
    }

    def __init__(self, id=None, name=None, endpoint=None, active=None, creator_id=None, created_timestamp=None, auth_last_modified_user_id=None, auth_last_modified_timestamp=None, auth_type=None, basic_auth_username=None, basic_auth_password=None, x_hub_signature_secret=None, x_hub_signature_data=None, events=None, custom_headers=None):  # noqa: E501
        """EventEndpointModel - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._endpoint = None
        self._active = None
        self._creator_id = None
        self._created_timestamp = None
        self._auth_last_modified_user_id = None
        self._auth_last_modified_timestamp = None
        self._auth_type = None
        self._basic_auth_username = None
        self._basic_auth_password = None
        self._x_hub_signature_secret = None
        self._x_hub_signature_data = None
        self._events = None
        self._custom_headers = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if endpoint is not None:
            self.endpoint = endpoint
        if active is not None:
            self.active = active
        if creator_id is not None:
            self.creator_id = creator_id
        if created_timestamp is not None:
            self.created_timestamp = created_timestamp
        if auth_last_modified_user_id is not None:
            self.auth_last_modified_user_id = auth_last_modified_user_id
        if auth_last_modified_timestamp is not None:
            self.auth_last_modified_timestamp = auth_last_modified_timestamp
        if auth_type is not None:
            self.auth_type = auth_type
        if basic_auth_username is not None:
            self.basic_auth_username = basic_auth_username
        if basic_auth_password is not None:
            self.basic_auth_password = basic_auth_password
        if x_hub_signature_secret is not None:
            self.x_hub_signature_secret = x_hub_signature_secret
        if x_hub_signature_data is not None:
            self.x_hub_signature_data = x_hub_signature_data
        if events is not None:
            self.events = events
        if custom_headers is not None:
            self.custom_headers = custom_headers

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

        The system generated unique id for this Event Endpoint.  # noqa: E501

        :return: The id of this EventEndpointModel.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this EventEndpointModel.

        The system generated unique id for this Event Endpoint.  # noqa: E501

        :param id: The id of this EventEndpointModel.  # noqa: E501
        :type: int
        """

        self._id = id

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

        A descriptive name for this Event Endpoint to show in agent UIs.  # noqa: E501

        :return: The name of this EventEndpointModel.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this EventEndpointModel.

        A descriptive name for this Event Endpoint to show in agent UIs.  # noqa: E501

        :param name: The name of this EventEndpointModel.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Endpoint url to call when an event occurs.  # noqa: E501

        :return: The endpoint of this EventEndpointModel.  # noqa: E501
        :rtype: str
        """
        return self._endpoint

    @endpoint.setter
    def endpoint(self, endpoint):
        """Sets the endpoint of this EventEndpointModel.

        Endpoint url to call when an event occurs.  # noqa: E501

        :param endpoint: The endpoint of this EventEndpointModel.  # noqa: E501
        :type: str
        """

        self._endpoint = endpoint

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

        Whether the Event Endpoint is active  # noqa: E501

        :return: The active of this EventEndpointModel.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this EventEndpointModel.

        Whether the Event Endpoint is active  # noqa: E501

        :param active: The active of this EventEndpointModel.  # noqa: E501
        :type: bool
        """

        self._active = active

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

        ID of the user that created the Event Endpoint.  # noqa: E501

        :return: The creator_id of this EventEndpointModel.  # noqa: E501
        :rtype: int
        """
        return self._creator_id

    @creator_id.setter
    def creator_id(self, creator_id):
        """Sets the creator_id of this EventEndpointModel.

        ID of the user that created the Event Endpoint.  # noqa: E501

        :param creator_id: The creator_id of this EventEndpointModel.  # noqa: E501
        :type: int
        """

        self._creator_id = creator_id

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

        The time the Event Endpoint was created.  # noqa: E501

        :return: The created_timestamp of this EventEndpointModel.  # noqa: E501
        :rtype: int
        """
        return self._created_timestamp

    @created_timestamp.setter
    def created_timestamp(self, created_timestamp):
        """Sets the created_timestamp of this EventEndpointModel.

        The time the Event Endpoint was created.  # noqa: E501

        :param created_timestamp: The created_timestamp of this EventEndpointModel.  # noqa: E501
        :type: int
        """

        self._created_timestamp = created_timestamp

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

        ID of the user that last modified authentication.  # noqa: E501

        :return: The auth_last_modified_user_id of this EventEndpointModel.  # noqa: E501
        :rtype: int
        """
        return self._auth_last_modified_user_id

    @auth_last_modified_user_id.setter
    def auth_last_modified_user_id(self, auth_last_modified_user_id):
        """Sets the auth_last_modified_user_id of this EventEndpointModel.

        ID of the user that last modified authentication.  # noqa: E501

        :param auth_last_modified_user_id: The auth_last_modified_user_id of this EventEndpointModel.  # noqa: E501
        :type: int
        """

        self._auth_last_modified_user_id = auth_last_modified_user_id

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

        The time authentication was last modified  # noqa: E501

        :return: The auth_last_modified_timestamp of this EventEndpointModel.  # noqa: E501
        :rtype: int
        """
        return self._auth_last_modified_timestamp

    @auth_last_modified_timestamp.setter
    def auth_last_modified_timestamp(self, auth_last_modified_timestamp):
        """Sets the auth_last_modified_timestamp of this EventEndpointModel.

        The time authentication was last modified  # noqa: E501

        :param auth_last_modified_timestamp: The auth_last_modified_timestamp of this EventEndpointModel.  # noqa: E501
        :type: int
        """

        self._auth_last_modified_timestamp = auth_last_modified_timestamp

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

        The authentication type for this Event Endpoint  # noqa: E501

        :return: The auth_type of this EventEndpointModel.  # noqa: E501
        :rtype: str
        """
        return self._auth_type

    @auth_type.setter
    def auth_type(self, auth_type):
        """Sets the auth_type of this EventEndpointModel.

        The authentication type for this Event Endpoint  # noqa: E501

        :param auth_type: The auth_type of this EventEndpointModel.  # noqa: E501
        :type: str
        """
        allowed_values = ["NO_AUTH", "BASIC_AUTH", "X_HUB_SIGNATURE", "CUSTOM_HEADERS_ONLY"]  # noqa: E501
        if auth_type not in allowed_values:
            raise ValueError(
                "Invalid value for `auth_type` ({0}), must be one of {1}"  # noqa: E501
                .format(auth_type, allowed_values)
            )

        self._auth_type = auth_type

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

        The Username for when Basic Authentication is specified  # noqa: E501

        :return: The basic_auth_username of this EventEndpointModel.  # noqa: E501
        :rtype: str
        """
        return self._basic_auth_username

    @basic_auth_username.setter
    def basic_auth_username(self, basic_auth_username):
        """Sets the basic_auth_username of this EventEndpointModel.

        The Username for when Basic Authentication is specified  # noqa: E501

        :param basic_auth_username: The basic_auth_username of this EventEndpointModel.  # noqa: E501
        :type: str
        """

        self._basic_auth_username = basic_auth_username

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

        The Password for when Basic Authentication is specified  # noqa: E501

        :return: The basic_auth_password of this EventEndpointModel.  # noqa: E501
        :rtype: str
        """
        return self._basic_auth_password

    @basic_auth_password.setter
    def basic_auth_password(self, basic_auth_password):
        """Sets the basic_auth_password of this EventEndpointModel.

        The Password for when Basic Authentication is specified  # noqa: E501

        :param basic_auth_password: The basic_auth_password of this EventEndpointModel.  # noqa: E501
        :type: str
        """

        self._basic_auth_password = basic_auth_password

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

        The Secret Key for when X-Hub-Signature is specified  # noqa: E501

        :return: The x_hub_signature_secret of this EventEndpointModel.  # noqa: E501
        :rtype: str
        """
        return self._x_hub_signature_secret

    @x_hub_signature_secret.setter
    def x_hub_signature_secret(self, x_hub_signature_secret):
        """Sets the x_hub_signature_secret of this EventEndpointModel.

        The Secret Key for when X-Hub-Signature is specified  # noqa: E501

        :param x_hub_signature_secret: The x_hub_signature_secret of this EventEndpointModel.  # noqa: E501
        :type: str
        """

        self._x_hub_signature_secret = x_hub_signature_secret

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

        It's the secret code shared between you and Chatbox when X-Hub-Signature authentication is specified that allows you to verify that API traffic sent to an Automation by Chatbox is genuine.  # noqa: E501

        :return: The x_hub_signature_data of this EventEndpointModel.  # noqa: E501
        :rtype: str
        """
        return self._x_hub_signature_data

    @x_hub_signature_data.setter
    def x_hub_signature_data(self, x_hub_signature_data):
        """Sets the x_hub_signature_data of this EventEndpointModel.

        It's the secret code shared between you and Chatbox when X-Hub-Signature authentication is specified that allows you to verify that API traffic sent to an Automation by Chatbox is genuine.  # noqa: E501

        :param x_hub_signature_data: The x_hub_signature_data of this EventEndpointModel.  # noqa: E501
        :type: str
        """

        self._x_hub_signature_data = x_hub_signature_data

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

        The endpoint will be called when any of these events occur.  # noqa: E501

        :return: The events of this EventEndpointModel.  # noqa: E501
        :rtype: list[str]
        """
        return self._events

    @events.setter
    def events(self, events):
        """Sets the events of this EventEndpointModel.

        The endpoint will be called when any of these events occur.  # noqa: E501

        :param events: The events of this EventEndpointModel.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["CUSTOMER_ADDED", "MESSAGE_ADDED", "MESSAGE_STATUS", "CONVERSATION_ADDED", "CONVERSATION_JOINED", "CONVERSATION_LEFT", "INSTANT_APP_ADDED", "INSTANT_APP_CUSTOMER_CONNECTED", "INSTANT_APP_CUSTOMER_DISCONNECTED", "INSTANT_APP_STATUS", "INSTANT_APP_UPDATE", "INSTANT_APP_CUSTOM", "BULK_ACTION", "CARRIER_REJECTION_RATE_EXCEEDED", "LOGIN", "LOGOUT", "AGENT_TOOLS_START", "AGENT_TOOLS_END", "AGENT_TOOLS_IDLE", "AGENT_TOOLS_BOOTED", "MONITOR_START", "MONITOR_END", "MONITOR_INSPECT", "MESSAGE_SCHEDULED", "SCHEDULED_MESSAGE_DELETED", "SCHEDULED_MESSAGE_MODIFIED", "CHANNEL_ADDED", "CHANNEL_DELETED", "CHANNEL_MODIFIED", "AGENT_ADDED", "AGENT_DELETED", "AGENT_MODIFIED", "SEND_MESSAGE_ERROR", "ALTERRA_ERROR", "INSTANT_APP_SCRIPT_ERROR", "CUSTOMER_CHANNEL_MODIFIED", "CUSTOMER_MODIFIED", "CUSTOMER_OPT_OUT", "NOTIFICATION_SENT", "NOTIFICATION_MODIFIED", "INTERACTION_CONFIG_MODIFIED", "GOOGLE_SHEETS_READ", "GOOGLE_SHEETS_WRITE", "CONSOLE_LOG_INFO", "CONSOLE_LOG_WARN", "CONSOLE_LOG_ERROR", "CONTACT_LIST_IMPORT_STARTED", "CONTACT_LIST_IMPORT_COMPLETED"]  # noqa: E501
        if not set(events).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `events` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(events) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._events = events

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

        Custom headers that can be additionally supplied to authenticated event endpoint calls.  # noqa: E501

        :return: The custom_headers of this EventEndpointModel.  # noqa: E501
        :rtype: list[KeyValueDataModel]
        """
        return self._custom_headers

    @custom_headers.setter
    def custom_headers(self, custom_headers):
        """Sets the custom_headers of this EventEndpointModel.

        Custom headers that can be additionally supplied to authenticated event endpoint calls.  # noqa: E501

        :param custom_headers: The custom_headers of this EventEndpointModel.  # noqa: E501
        :type: list[KeyValueDataModel]
        """

        self._custom_headers = custom_headers

    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(EventEndpointModel, 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, EventEndpointModel):
            return False

        return self.__dict__ == other.__dict__

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