# 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 UpdateIpsecConnectionRequest(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 = {
        "name": "str",
        "ipaddress": "str",
        "secret": "str",
        "pfs": "bool",
        "ike_version": "int",
        "nat_t_enabled": "bool",
        "extra_config": "str",
        "private_ipaddress": "str",
        "gre": "bool",
        "gre_interface_address": "str",
        "vpn_type": "str",
        "route_based_int_address": "str",
        "route_based_local": "str",
        "route_based_remote": "str",
    }

    attribute_map = {
        "name": "name",
        "ipaddress": "ipaddress",
        "secret": "secret",
        "pfs": "pfs",
        "ike_version": "ike_version",
        "nat_t_enabled": "nat_t_enabled",
        "extra_config": "extra_config",
        "private_ipaddress": "private_ipaddress",
        "gre": "gre",
        "gre_interface_address": "gre_interface_address",
        "vpn_type": "vpn_type",
        "route_based_int_address": "route_based_int_address",
        "route_based_local": "route_based_local",
        "route_based_remote": "route_based_remote",
    }

    def __init__(
        self,
        name=None,
        ipaddress=None,
        secret=None,
        pfs=None,
        ike_version=None,
        nat_t_enabled=None,
        extra_config=None,
        private_ipaddress=None,
        gre=None,
        gre_interface_address=None,
        vpn_type=None,
        route_based_int_address=None,
        route_based_local=None,
        route_based_remote=None,
    ):  # noqa: E501
        """UpdateIpsecConnectionRequest - a model defined in OpenAPI"""  # noqa: E501

        self._name = None
        self._ipaddress = None
        self._secret = None
        self._pfs = None
        self._ike_version = None
        self._nat_t_enabled = None
        self._extra_config = None
        self._private_ipaddress = None
        self._gre = None
        self._gre_interface_address = None
        self._vpn_type = None
        self._route_based_int_address = None
        self._route_based_local = None
        self._route_based_remote = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if ipaddress is not None:
            self.ipaddress = ipaddress
        if secret is not None:
            self.secret = secret
        if pfs is not None:
            self.pfs = pfs
        if ike_version is not None:
            self.ike_version = ike_version
        if nat_t_enabled is not None:
            self.nat_t_enabled = nat_t_enabled
        if extra_config is not None:
            self.extra_config = extra_config
        if private_ipaddress is not None:
            self.private_ipaddress = private_ipaddress
        if gre is not None:
            self.gre = gre
        if gre_interface_address is not None:
            self.gre_interface_address = gre_interface_address
        if vpn_type is not None:
            self.vpn_type = vpn_type
        if route_based_int_address is not None:
            self.route_based_int_address = route_based_int_address
        if route_based_local is not None:
            self.route_based_local = route_based_local
        if route_based_remote is not None:
            self.route_based_remote = route_based_remote

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

        Name for the connection.  # noqa: E501

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

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

        Name for the connection.  # noqa: E501

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

        self._name = name

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

        IP of the remote gateway  # noqa: E501

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

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

        IP of the remote gateway  # noqa: E501

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

        self._ipaddress = ipaddress

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

        Pre-shared key  # noqa: E501

        :return: The secret of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._secret

    @secret.setter
    def secret(self, secret):
        """Sets the secret of this UpdateIpsecConnectionRequest.

        Pre-shared key  # noqa: E501

        :param secret: The secret of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: str
        """

        self._secret = secret

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

        Perfect Forward Secrecy if true, disables if false.  # noqa: E501

        :return: The pfs of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: bool
        """
        return self._pfs

    @pfs.setter
    def pfs(self, pfs):
        """Sets the pfs of this UpdateIpsecConnectionRequest.

        Perfect Forward Secrecy if true, disables if false.  # noqa: E501

        :param pfs: The pfs of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: bool
        """

        self._pfs = pfs

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

        Version for IKE algorithm  # noqa: E501

        :return: The ike_version of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: int
        """
        return self._ike_version

    @ike_version.setter
    def ike_version(self, ike_version):
        """Sets the ike_version of this UpdateIpsecConnectionRequest.

        Version for IKE algorithm  # noqa: E501

        :param ike_version: The ike_version of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: int
        """
        allowed_values = [1, 2]  # noqa: E501
        if ike_version not in allowed_values:
            raise ValueError(
                "Invalid value for `ike_version` ({0}), must be one of {1}".format(  # noqa: E501
                    ike_version, allowed_values
                )
            )

        self._ike_version = ike_version

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

        True if you want encapsulated IPsec protocol to this gateway  # noqa: E501

        :return: The nat_t_enabled of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: bool
        """
        return self._nat_t_enabled

    @nat_t_enabled.setter
    def nat_t_enabled(self, nat_t_enabled):
        """Sets the nat_t_enabled of this UpdateIpsecConnectionRequest.

        True if you want encapsulated IPsec protocol to this gateway  # noqa: E501

        :param nat_t_enabled: The nat_t_enabled of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: bool
        """

        self._nat_t_enabled = nat_t_enabled

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

        Additional optionals for connection such as 'phase1=aes256_gcm-sha2_256-dh14 phase2=aes256_gcm'  # noqa: E501

        :return: The extra_config of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._extra_config

    @extra_config.setter
    def extra_config(self, extra_config):
        """Sets the extra_config of this UpdateIpsecConnectionRequest.

        Additional optionals for connection such as 'phase1=aes256_gcm-sha2_256-dh14 phase2=aes256_gcm'  # noqa: E501

        :param extra_config: The extra_config of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: str
        """

        self._extra_config = extra_config

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

        Internal NAT address of the remote gateway  # noqa: E501

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

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

        Internal NAT address of the remote gateway  # noqa: E501

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

        self._private_ipaddress = private_ipaddress

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

        True if GRE is being used for the specific endpoint  # noqa: E501

        :return: The gre of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: bool
        """
        return self._gre

    @gre.setter
    def gre(self, gre):
        """Sets the gre of this UpdateIpsecConnectionRequest.

        True if GRE is being used for the specific endpoint  # noqa: E501

        :param gre: The gre of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: bool
        """

        self._gre = gre

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

        Interface address for GRE  # noqa: E501

        :return: The gre_interface_address of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._gre_interface_address

    @gre_interface_address.setter
    def gre_interface_address(self, gre_interface_address):
        """Sets the gre_interface_address of this UpdateIpsecConnectionRequest.

        Interface address for GRE  # noqa: E501

        :param gre_interface_address: The gre_interface_address of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: str
        """

        self._gre_interface_address = gre_interface_address

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

        policy, gre, vti  # noqa: E501

        :return: The vpn_type of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._vpn_type

    @vpn_type.setter
    def vpn_type(self, vpn_type):
        """Sets the vpn_type of this UpdateIpsecConnectionRequest.

        policy, gre, vti  # noqa: E501

        :param vpn_type: The vpn_type of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: str
        """

        self._vpn_type = vpn_type

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


        :return: The route_based_int_address of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._route_based_int_address

    @route_based_int_address.setter
    def route_based_int_address(self, route_based_int_address):
        """Sets the route_based_int_address of this UpdateIpsecConnectionRequest.


        :param route_based_int_address: The route_based_int_address of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: str
        """

        self._route_based_int_address = route_based_int_address

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


        :return: The route_based_local of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._route_based_local

    @route_based_local.setter
    def route_based_local(self, route_based_local):
        """Sets the route_based_local of this UpdateIpsecConnectionRequest.


        :param route_based_local: The route_based_local of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: str
        """

        self._route_based_local = route_based_local

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


        :return: The route_based_remote of this UpdateIpsecConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._route_based_remote

    @route_based_remote.setter
    def route_based_remote(self, route_based_remote):
        """Sets the route_based_remote of this UpdateIpsecConnectionRequest.


        :param route_based_remote: The route_based_remote of this UpdateIpsecConnectionRequest.  # noqa: E501
        :type: str
        """

        self._route_based_remote = route_based_remote

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

        return self.__dict__ == other.__dict__

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