# coding: utf-8

"""
    VNS3 Controller API

    Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge  # noqa: E501

    The version of the OpenAPI document: 4.8
    Contact: solutions@cohesive.net
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from cohesivenet.configuration import Configuration


class WebhookIntegration(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        "id": "int",
        "name": "str",
        "validate_cert": "bool",
        "created_at": "datetime",
        "updated_at": "datetime",
        "url": "str",
        "body": "str",
        "custom_properties": "list[WebhookCustomProperty]",
        "headers": "list[WebhookHeader]",
        "parameters": "list[WebhookParameter]",
        "events": "list[str]",
    }

    attribute_map = {
        "id": "id",
        "name": "name",
        "validate_cert": "validate_cert",
        "created_at": "created_at",
        "updated_at": "updated_at",
        "url": "url",
        "body": "body",
        "custom_properties": "custom_properties",
        "headers": "headers",
        "parameters": "parameters",
        "events": "events",
    }

    def __init__(
        self,
        id=None,
        name=None,
        validate_cert=None,
        created_at=None,
        updated_at=None,
        url=None,
        body=None,
        custom_properties=None,
        headers=None,
        parameters=None,
        events=None,
        local_vars_configuration=None,
    ):  # noqa: E501
        """WebhookIntegration - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._name = None
        self._validate_cert = None
        self._created_at = None
        self._updated_at = None
        self._url = None
        self._body = None
        self._custom_properties = None
        self._headers = None
        self._parameters = None
        self._events = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if validate_cert is not None:
            self.validate_cert = validate_cert
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if url is not None:
            self.url = url
        if body is not None:
            self.body = body
        if custom_properties is not None:
            self.custom_properties = custom_properties
        if headers is not None:
            self.headers = headers
        if parameters is not None:
            self.parameters = parameters
        if events is not None:
            self.events = events

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


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

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


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

        self._id = id

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


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

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


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

        self._name = name

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


        :return: The validate_cert of this WebhookIntegration.  # noqa: E501
        :rtype: bool
        """
        return self._validate_cert

    @validate_cert.setter
    def validate_cert(self, validate_cert):
        """Sets the validate_cert of this WebhookIntegration.


        :param validate_cert: The validate_cert of this WebhookIntegration.  # noqa: E501
        :type: bool
        """

        self._validate_cert = validate_cert

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


        :return: The created_at of this WebhookIntegration.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this WebhookIntegration.


        :param created_at: The created_at of this WebhookIntegration.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The updated_at of this WebhookIntegration.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this WebhookIntegration.


        :param updated_at: The updated_at of this WebhookIntegration.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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


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

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


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

        self._url = url

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


        :return: The body of this WebhookIntegration.  # noqa: E501
        :rtype: str
        """
        return self._body

    @body.setter
    def body(self, body):
        """Sets the body of this WebhookIntegration.


        :param body: The body of this WebhookIntegration.  # noqa: E501
        :type: str
        """

        self._body = body

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


        :return: The custom_properties of this WebhookIntegration.  # noqa: E501
        :rtype: list[WebhookCustomProperty]
        """
        return self._custom_properties

    @custom_properties.setter
    def custom_properties(self, custom_properties):
        """Sets the custom_properties of this WebhookIntegration.


        :param custom_properties: The custom_properties of this WebhookIntegration.  # noqa: E501
        :type: list[WebhookCustomProperty]
        """

        self._custom_properties = custom_properties

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


        :return: The headers of this WebhookIntegration.  # noqa: E501
        :rtype: list[WebhookHeader]
        """
        return self._headers

    @headers.setter
    def headers(self, headers):
        """Sets the headers of this WebhookIntegration.


        :param headers: The headers of this WebhookIntegration.  # noqa: E501
        :type: list[WebhookHeader]
        """

        self._headers = headers

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


        :return: The parameters of this WebhookIntegration.  # noqa: E501
        :rtype: list[WebhookHeader]
        """
        return self._parameters

    @parameters.setter
    def parameters(self, parameters):
        """Sets the parameters of this WebhookIntegration.


        :param parameters: The parameters of this WebhookIntegration.  # noqa: E501
        :type: list[WebhookHeader]
        """

        self._parameters = parameters

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


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

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


        :param events: The events of this WebhookIntegration.  # noqa: E501
        :type: list[str]
        """

        self._events = events

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
