# coding: utf-8

"""
    BTCPay Greenfield API

    A full API to use your BTCPay Server  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class WebhookDataBase(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': 'str',
        'enabled': 'bool',
        'automatic_redelivery': 'bool',
        'url': 'str',
        'authorized_events': 'WebhookDataBaseAuthorizedEvents'
    }

    attribute_map = {
        'id': 'id',
        'enabled': 'enabled',
        'automatic_redelivery': 'automaticRedelivery',
        'url': 'url',
        'authorized_events': 'authorizedEvents'
    }

    def __init__(self, id=None, enabled=True, automatic_redelivery=True, url=None, authorized_events=None):  # noqa: E501
        """WebhookDataBase - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._enabled = None
        self._automatic_redelivery = None
        self._url = None
        self._authorized_events = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if enabled is not None:
            self.enabled = enabled
        if automatic_redelivery is not None:
            self.automatic_redelivery = automatic_redelivery
        if url is not None:
            self.url = url
        if authorized_events is not None:
            self.authorized_events = authorized_events

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

        The id of the webhook  # noqa: E501

        :return: The id of this WebhookDataBase.  # noqa: E501
        :rtype: str
        """
        return self._id

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

        The id of the webhook  # noqa: E501

        :param id: The id of this WebhookDataBase.  # noqa: E501
        :type: str
        """

        self._id = id

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

        Whether this webhook is enabled or not  # noqa: E501

        :return: The enabled of this WebhookDataBase.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this WebhookDataBase.

        Whether this webhook is enabled or not  # noqa: E501

        :param enabled: The enabled of this WebhookDataBase.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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

        If true, BTCPay Server will retry to redeliver any failed delivery after 10 seconds, 1 minutes and up to 6 times after 10 minutes.  # noqa: E501

        :return: The automatic_redelivery of this WebhookDataBase.  # noqa: E501
        :rtype: bool
        """
        return self._automatic_redelivery

    @automatic_redelivery.setter
    def automatic_redelivery(self, automatic_redelivery):
        """Sets the automatic_redelivery of this WebhookDataBase.

        If true, BTCPay Server will retry to redeliver any failed delivery after 10 seconds, 1 minutes and up to 6 times after 10 minutes.  # noqa: E501

        :param automatic_redelivery: The automatic_redelivery of this WebhookDataBase.  # noqa: E501
        :type: bool
        """

        self._automatic_redelivery = automatic_redelivery

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

        The endpoint where BTCPay Server will make the POST request with the webhook body  # noqa: E501

        :return: The url of this WebhookDataBase.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this WebhookDataBase.

        The endpoint where BTCPay Server will make the POST request with the webhook body  # noqa: E501

        :param url: The url of this WebhookDataBase.  # noqa: E501
        :type: str
        """

        self._url = url

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


        :return: The authorized_events of this WebhookDataBase.  # noqa: E501
        :rtype: WebhookDataBaseAuthorizedEvents
        """
        return self._authorized_events

    @authorized_events.setter
    def authorized_events(self, authorized_events):
        """Sets the authorized_events of this WebhookDataBase.


        :param authorized_events: The authorized_events of this WebhookDataBase.  # noqa: E501
        :type: WebhookDataBaseAuthorizedEvents
        """

        self._authorized_events = authorized_events

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

        return self.__dict__ == other.__dict__

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