# coding: utf-8

"""
    ExaVault API

    See our API reference documentation at https://www.exavault.com/developer/api-docs/  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@exavault.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class WebhookAttributes(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 = {
        'endpoint_url': 'str',
        'failed': 'bool',
        'verification_token': 'str',
        'response_version': 'str',
        'triggers': 'WebhookTriggers',
        'created': 'datetime',
        'modified': 'datetime'
    }

    attribute_map = {
        'endpoint_url': 'endpointUrl',
        'failed': 'failed',
        'verification_token': 'verificationToken',
        'response_version': 'responseVersion',
        'triggers': 'triggers',
        'created': 'created',
        'modified': 'modified'
    }

    def __init__(self, endpoint_url=None, failed=None, verification_token=None, response_version=None, triggers=None, created=None, modified=None):  # noqa: E501
        """WebhookAttributes - a model defined in Swagger"""  # noqa: E501
        self._endpoint_url = None
        self._failed = None
        self._verification_token = None
        self._response_version = None
        self._triggers = None
        self._created = None
        self._modified = None
        self.discriminator = None
        if endpoint_url is not None:
            self.endpoint_url = endpoint_url
        if failed is not None:
            self.failed = failed
        if verification_token is not None:
            self.verification_token = verification_token
        if response_version is not None:
            self.response_version = response_version
        if triggers is not None:
            self.triggers = triggers
        if created is not None:
            self.created = created
        if modified is not None:
            self.modified = modified

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

        The endpoint is where the webhook request will be sent.  # noqa: E501

        :return: The endpoint_url of this WebhookAttributes.  # noqa: E501
        :rtype: str
        """
        return self._endpoint_url

    @endpoint_url.setter
    def endpoint_url(self, endpoint_url):
        """Sets the endpoint_url of this WebhookAttributes.

        The endpoint is where the webhook request will be sent.  # noqa: E501

        :param endpoint_url: The endpoint_url of this WebhookAttributes.  # noqa: E501
        :type: str
        """

        self._endpoint_url = endpoint_url

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

        Whether webhook has been disabled for too many consecutive failures  # noqa: E501

        :return: The failed of this WebhookAttributes.  # noqa: E501
        :rtype: bool
        """
        return self._failed

    @failed.setter
    def failed(self, failed):
        """Sets the failed of this WebhookAttributes.

        Whether webhook has been disabled for too many consecutive failures  # noqa: E501

        :param failed: The failed of this WebhookAttributes.  # noqa: E501
        :type: bool
        """

        self._failed = failed

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

        Token for verifying sender is ExaVault  # noqa: E501

        :return: The verification_token of this WebhookAttributes.  # noqa: E501
        :rtype: str
        """
        return self._verification_token

    @verification_token.setter
    def verification_token(self, verification_token):
        """Sets the verification_token of this WebhookAttributes.

        Token for verifying sender is ExaVault  # noqa: E501

        :param verification_token: The verification_token of this WebhookAttributes.  # noqa: E501
        :type: str
        """

        self._verification_token = verification_token

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

        The version of webhook request to send to the endpoint URL  # noqa: E501

        :return: The response_version of this WebhookAttributes.  # noqa: E501
        :rtype: str
        """
        return self._response_version

    @response_version.setter
    def response_version(self, response_version):
        """Sets the response_version of this WebhookAttributes.

        The version of webhook request to send to the endpoint URL  # noqa: E501

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

        self._response_version = response_version

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


        :return: The triggers of this WebhookAttributes.  # noqa: E501
        :rtype: WebhookTriggers
        """
        return self._triggers

    @triggers.setter
    def triggers(self, triggers):
        """Sets the triggers of this WebhookAttributes.


        :param triggers: The triggers of this WebhookAttributes.  # noqa: E501
        :type: WebhookTriggers
        """

        self._triggers = triggers

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

        Timestamp when webhook configuration was added to system.  # noqa: E501

        :return: The created of this WebhookAttributes.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this WebhookAttributes.

        Timestamp when webhook configuration was added to system.  # noqa: E501

        :param created: The created of this WebhookAttributes.  # noqa: E501
        :type: datetime
        """

        self._created = created

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

        Timestamp when webhook configuration was last modified  # noqa: E501

        :return: The modified of this WebhookAttributes.  # noqa: E501
        :rtype: datetime
        """
        return self._modified

    @modified.setter
    def modified(self, modified):
        """Sets the modified of this WebhookAttributes.

        Timestamp when webhook configuration was last modified  # noqa: E501

        :param modified: The modified of this WebhookAttributes.  # noqa: E501
        :type: datetime
        """

        self._modified = modified

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

        return self.__dict__ == other.__dict__

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