# 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


class UpdateIpsecTunnelRequest(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 = {
        "bounce": "bool",
        "description": "str",
        "remote_subnet": "str",
        "local_subnet": "str",
        "ping_ipaddress": "str",
        "ping_interval": "int",
        "ping_interface": "str",
        "enabled": "bool",
    }

    attribute_map = {
        "bounce": "bounce",
        "description": "description",
        "remote_subnet": "remote_subnet",
        "local_subnet": "local_subnet",
        "ping_ipaddress": "ping_ipaddress",
        "ping_interval": "ping_interval",
        "ping_interface": "ping_interface",
        "enabled": "enabled",
    }

    def __init__(
        self,
        bounce=False,
        description=None,
        remote_subnet=None,
        local_subnet=None,
        ping_ipaddress=None,
        ping_interval=None,
        ping_interface=None,
        enabled=None,
    ):  # noqa: E501
        """UpdateIpsecTunnelRequest - a model defined in OpenAPI"""  # noqa: E501

        self._bounce = None
        self._description = None
        self._remote_subnet = None
        self._local_subnet = None
        self._ping_ipaddress = None
        self._ping_interval = None
        self._ping_interface = None
        self._enabled = None
        self.discriminator = None

        if bounce is not None:
            self.bounce = bounce
        if description is not None:
            self.description = description
        if remote_subnet is not None:
            self.remote_subnet = remote_subnet
        if local_subnet is not None:
            self.local_subnet = local_subnet
        if ping_ipaddress is not None:
            self.ping_ipaddress = ping_ipaddress
        if ping_interval is not None:
            self.ping_interval = ping_interval
        if ping_interface is not None:
            self.ping_interface = ping_interface
        if enabled is not None:
            self.enabled = enabled

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

        Resets the IPsec connection for this specific tunnel  # noqa: E501

        :return: The bounce of this UpdateIpsecTunnelRequest.  # noqa: E501
        :rtype: bool
        """
        return self._bounce

    @bounce.setter
    def bounce(self, bounce):
        """Sets the bounce of this UpdateIpsecTunnelRequest.

        Resets the IPsec connection for this specific tunnel  # noqa: E501

        :param bounce: The bounce of this UpdateIpsecTunnelRequest.  # noqa: E501
        :type: bool
        """

        self._bounce = bounce

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


        :return: The description of this UpdateIpsecTunnelRequest.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this UpdateIpsecTunnelRequest.


        :param description: The description of this UpdateIpsecTunnelRequest.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Remote subnet for tunnel in CIDR notation  # noqa: E501

        :return: The remote_subnet of this UpdateIpsecTunnelRequest.  # noqa: E501
        :rtype: str
        """
        return self._remote_subnet

    @remote_subnet.setter
    def remote_subnet(self, remote_subnet):
        """Sets the remote_subnet of this UpdateIpsecTunnelRequest.

        Remote subnet for tunnel in CIDR notation  # noqa: E501

        :param remote_subnet: The remote_subnet of this UpdateIpsecTunnelRequest.  # noqa: E501
        :type: str
        """

        self._remote_subnet = remote_subnet

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

        Local subnet for tunnel in CIDR notation  # noqa: E501

        :return: The local_subnet of this UpdateIpsecTunnelRequest.  # noqa: E501
        :rtype: str
        """
        return self._local_subnet

    @local_subnet.setter
    def local_subnet(self, local_subnet):
        """Sets the local_subnet of this UpdateIpsecTunnelRequest.

        Local subnet for tunnel in CIDR notation  # noqa: E501

        :param local_subnet: The local_subnet of this UpdateIpsecTunnelRequest.  # noqa: E501
        :type: str
        """

        self._local_subnet = local_subnet

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

        Exo Ping feature - remote IP destination of ping  # noqa: E501

        :return: The ping_ipaddress of this UpdateIpsecTunnelRequest.  # noqa: E501
        :rtype: str
        """
        return self._ping_ipaddress

    @ping_ipaddress.setter
    def ping_ipaddress(self, ping_ipaddress):
        """Sets the ping_ipaddress of this UpdateIpsecTunnelRequest.

        Exo Ping feature - remote IP destination of ping  # noqa: E501

        :param ping_ipaddress: The ping_ipaddress of this UpdateIpsecTunnelRequest.  # noqa: E501
        :type: str
        """

        self._ping_ipaddress = ping_ipaddress

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

        Exo Ping feature - periodicy of the ping in seconds  # noqa: E501

        :return: The ping_interval of this UpdateIpsecTunnelRequest.  # noqa: E501
        :rtype: int
        """
        return self._ping_interval

    @ping_interval.setter
    def ping_interval(self, ping_interval):
        """Sets the ping_interval of this UpdateIpsecTunnelRequest.

        Exo Ping feature - periodicy of the ping in seconds  # noqa: E501

        :param ping_interval: The ping_interval of this UpdateIpsecTunnelRequest.  # noqa: E501
        :type: int
        """

        self._ping_interval = ping_interval

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

        Exo Ping feature - what network interface IP of the VNS3 controller to use as the source of ping  # noqa: E501

        :return: The ping_interface of this UpdateIpsecTunnelRequest.  # noqa: E501
        :rtype: str
        """
        return self._ping_interface

    @ping_interface.setter
    def ping_interface(self, ping_interface):
        """Sets the ping_interface of this UpdateIpsecTunnelRequest.

        Exo Ping feature - what network interface IP of the VNS3 controller to use as the source of ping  # noqa: E501

        :param ping_interface: The ping_interface of this UpdateIpsecTunnelRequest.  # noqa: E501
        :type: str
        """

        self._ping_interface = ping_interface

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

        Disables tunnel if set to false  # noqa: E501

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

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

        Disables tunnel if set to false  # noqa: E501

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

        self._enabled = enabled

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

        return self.__dict__ == other.__dict__

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