# 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 UpdateWebhookRequestBody(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',
        'triggers': 'WebhookTriggers',
        'resource': 'str',
        'response_version': 'str'
    }

    attribute_map = {
        'endpoint_url': 'endpointUrl',
        'triggers': 'triggers',
        'resource': 'resource',
        'response_version': 'responseVersion'
    }

    def __init__(self, endpoint_url=None, triggers=None, resource=None, response_version=None):  # noqa: E501
        """UpdateWebhookRequestBody - a model defined in Swagger"""  # noqa: E501
        self._endpoint_url = None
        self._triggers = None
        self._resource = None
        self._response_version = None
        self.discriminator = None
        if endpoint_url is not None:
            self.endpoint_url = endpoint_url
        if triggers is not None:
            self.triggers = triggers
        if resource is not None:
            self.resource = resource
        if response_version is not None:
            self.response_version = response_version

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

        New endpoint URL to use for the webhook configuration  # noqa: E501

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

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

        New endpoint URL to use for the webhook configuration  # noqa: E501

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

        self._endpoint_url = endpoint_url

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


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

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


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

        self._triggers = triggers

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

        Resource identifier of the top folder watched by this webhook.  # noqa: E501

        :return: The resource of this UpdateWebhookRequestBody.  # noqa: E501
        :rtype: str
        """
        return self._resource

    @resource.setter
    def resource(self, resource):
        """Sets the resource of this UpdateWebhookRequestBody.

        Resource identifier of the top folder watched by this webhook.  # noqa: E501

        :param resource: The resource of this UpdateWebhookRequestBody.  # noqa: E501
        :type: str
        """

        self._resource = resource

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

        Version of the webhooks message to send to the endpoint  # noqa: E501

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

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

        Version of the webhooks message to send to the endpoint  # noqa: E501

        :param response_version: The response_version of this UpdateWebhookRequestBody.  # noqa: E501
        :type: str
        """
        allowed_values = ["v2", "v1"]  # 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

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

        return self.__dict__ == other.__dict__

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