# 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 IpsecLocalEndpoint(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 = {
        "nat_traversal": "bool",
        "ipaddress": "str",
        "overlay_subnet": "str",
        "private_ipaddress": "str",
        "ipsec_local_ipaddress": "str",
        "asn": "int",
    }

    attribute_map = {
        "nat_traversal": "nat_traversal",
        "ipaddress": "ipaddress",
        "overlay_subnet": "overlay_subnet",
        "private_ipaddress": "private_ipaddress",
        "ipsec_local_ipaddress": "ipsec_local_ipaddress",
        "asn": "asn",
    }

    def __init__(
        self,
        nat_traversal=None,
        ipaddress=None,
        overlay_subnet=None,
        private_ipaddress=None,
        ipsec_local_ipaddress=None,
        asn=None,
    ):  # noqa: E501
        """IpsecLocalEndpoint - a model defined in OpenAPI"""  # noqa: E501

        self._nat_traversal = None
        self._ipaddress = None
        self._overlay_subnet = None
        self._private_ipaddress = None
        self._ipsec_local_ipaddress = None
        self._asn = None
        self.discriminator = None

        if nat_traversal is not None:
            self.nat_traversal = nat_traversal
        if ipaddress is not None:
            self.ipaddress = ipaddress
        if overlay_subnet is not None:
            self.overlay_subnet = overlay_subnet
        if private_ipaddress is not None:
            self.private_ipaddress = private_ipaddress
        if ipsec_local_ipaddress is not None:
            self.ipsec_local_ipaddress = ipsec_local_ipaddress
        if asn is not None:
            self.asn = asn

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


        :return: The nat_traversal of this IpsecLocalEndpoint.  # noqa: E501
        :rtype: bool
        """
        return self._nat_traversal

    @nat_traversal.setter
    def nat_traversal(self, nat_traversal):
        """Sets the nat_traversal of this IpsecLocalEndpoint.


        :param nat_traversal: The nat_traversal of this IpsecLocalEndpoint.  # noqa: E501
        :type: bool
        """

        self._nat_traversal = nat_traversal

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


        :return: The ipaddress of this IpsecLocalEndpoint.  # noqa: E501
        :rtype: str
        """
        return self._ipaddress

    @ipaddress.setter
    def ipaddress(self, ipaddress):
        """Sets the ipaddress of this IpsecLocalEndpoint.


        :param ipaddress: The ipaddress of this IpsecLocalEndpoint.  # noqa: E501
        :type: str
        """

        self._ipaddress = ipaddress

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


        :return: The overlay_subnet of this IpsecLocalEndpoint.  # noqa: E501
        :rtype: str
        """
        return self._overlay_subnet

    @overlay_subnet.setter
    def overlay_subnet(self, overlay_subnet):
        """Sets the overlay_subnet of this IpsecLocalEndpoint.


        :param overlay_subnet: The overlay_subnet of this IpsecLocalEndpoint.  # noqa: E501
        :type: str
        """

        self._overlay_subnet = overlay_subnet

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


        :return: The private_ipaddress of this IpsecLocalEndpoint.  # noqa: E501
        :rtype: str
        """
        return self._private_ipaddress

    @private_ipaddress.setter
    def private_ipaddress(self, private_ipaddress):
        """Sets the private_ipaddress of this IpsecLocalEndpoint.


        :param private_ipaddress: The private_ipaddress of this IpsecLocalEndpoint.  # noqa: E501
        :type: str
        """

        self._private_ipaddress = private_ipaddress

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


        :return: The ipsec_local_ipaddress of this IpsecLocalEndpoint.  # noqa: E501
        :rtype: str
        """
        return self._ipsec_local_ipaddress

    @ipsec_local_ipaddress.setter
    def ipsec_local_ipaddress(self, ipsec_local_ipaddress):
        """Sets the ipsec_local_ipaddress of this IpsecLocalEndpoint.


        :param ipsec_local_ipaddress: The ipsec_local_ipaddress of this IpsecLocalEndpoint.  # noqa: E501
        :type: str
        """

        self._ipsec_local_ipaddress = ipsec_local_ipaddress

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


        :return: The asn of this IpsecLocalEndpoint.  # noqa: E501
        :rtype: int
        """
        return self._asn

    @asn.setter
    def asn(self, asn):
        """Sets the asn of this IpsecLocalEndpoint.


        :param asn: The asn of this IpsecLocalEndpoint.  # noqa: E501
        :type: int
        """

        self._asn = asn

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

        return self.__dict__ == other.__dict__

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