# coding: utf-8

"""
    Agilicus API

    Agilicus is API-first. Modern software is controlled by other software, is open, is available for you to use the way you want, securely, simply.  A rendered, online viewable and usable version of this specification is available at [api](https://www.agilicus.com/api). You may try the API inline directly in the web page. To do so, first obtain an Authentication Token (the simplest way is to install the Python SDK, and then run `agilicus-cli --issuer https://MYISSUER get-token`). You will need an org-id for most calls (and can obtain from `agilicus-cli --issuer https://MYISSUER list-orgs`). The `MYISSUER` will typically be `auth.MYDOMAIN`, and you will see it as you sign-in to the administrative UI.  This API releases on Bearer-Token authentication. To obtain a valid bearer token you will need to Authenticate to an Issuer with OpenID Connect (a superset of OAUTH2).  Your \"issuer\" will look like https://auth.MYDOMAIN. For example, when you signed-up, if you said \"use my own domain name\" and assigned a CNAME of cloud.example.com, then your issuer would be https://auth.cloud.example.com.  If you selected \"use an Agilicus supplied domain name\", your issuer would look like https://auth.myorg.agilicus.cloud.  For test purposes you can use our [Python SDK](https://pypi.org/project/agilicus/) and run `agilicus-cli --issuer https://auth.MYDOMAIN get-token`.  This API may be used in any language runtime that supports OpenAPI 3.0, or, you may use our [Python SDK](https://pypi.org/project/agilicus/), our [Typescript SDK](https://www.npmjs.com/package/@agilicus/angular), or our [Golang SDK](https://git.agilicus.com/pub/sdk-go).  100% of the activities in our system our API-driven, from our web-admin, through our progressive web applications, to all internals: there is nothing that is not accessible.  For more information, see [developer resources](https://www.agilicus.com/developer).   # noqa: E501

    The version of the OpenAPI document: 2021.05.26
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class IpsecConnectionSpec(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 = {
        'ike_version': 'str',
        'remote_ipv4_address': 'str',
        'remote_dns_ipv4_address': 'str',
        'remote_healthcheck_ipv4_address': 'str',
        'ike_cipher_encryption_algorithm': 'CipherEncryptionAlgorithm',
        'ike_cipher_integrity_algorithm': 'CipherIntegrityAlgorithm',
        'ike_cipher_diffie_hellman_group': 'CipherDiffieHellmanGroup',
        'esp_cipher_encryption_algorithm': 'CipherEncryptionAlgorithm',
        'esp_cipher_integrity_algorithm': 'CipherIntegrityAlgorithm',
        'esp_cipher_diffie_hellman_group': 'CipherDiffieHellmanGroup',
        'esp_lifetime': 'int',
        'ike_lifetime': 'int',
        'ike_rekey': 'bool',
        'ike_reauth': 'bool',
        'ike_authentication_type': 'str',
        'ike_preshared_key': 'str',
        'ike_chain_of_trust_certificates': 'str',
        'ike_certificate_dn': 'str',
        'ike_remote_identity': 'str',
        'local_ipv4_block': 'str',
        'remote_ipv4_ranges': 'list[IpsecConnectionIpv4Block]',
        'use_cert_hash': 'bool',
        'local_certificate_uribase': 'str',
        'remote_certificate_uribase': 'str'
    }

    attribute_map = {
        'ike_version': 'ike_version',
        'remote_ipv4_address': 'remote_ipv4_address',
        'remote_dns_ipv4_address': 'remote_dns_ipv4_address',
        'remote_healthcheck_ipv4_address': 'remote_healthcheck_ipv4_address',
        'ike_cipher_encryption_algorithm': 'ike_cipher_encryption_algorithm',
        'ike_cipher_integrity_algorithm': 'ike_cipher_integrity_algorithm',
        'ike_cipher_diffie_hellman_group': 'ike_cipher_diffie_hellman_group',
        'esp_cipher_encryption_algorithm': 'esp_cipher_encryption_algorithm',
        'esp_cipher_integrity_algorithm': 'esp_cipher_integrity_algorithm',
        'esp_cipher_diffie_hellman_group': 'esp_cipher_diffie_hellman_group',
        'esp_lifetime': 'esp_lifetime',
        'ike_lifetime': 'ike_lifetime',
        'ike_rekey': 'ike_rekey',
        'ike_reauth': 'ike_reauth',
        'ike_authentication_type': 'ike_authentication_type',
        'ike_preshared_key': 'ike_preshared_key',
        'ike_chain_of_trust_certificates': 'ike_chain_of_trust_certificates',
        'ike_certificate_dn': 'ike_certificate_dn',
        'ike_remote_identity': 'ike_remote_identity',
        'local_ipv4_block': 'local_ipv4_block',
        'remote_ipv4_ranges': 'remote_ipv4_ranges',
        'use_cert_hash': 'use_cert_hash',
        'local_certificate_uribase': 'local_certificate_uribase',
        'remote_certificate_uribase': 'remote_certificate_uribase'
    }

    def __init__(self, ike_version=None, remote_ipv4_address=None, remote_dns_ipv4_address=None, remote_healthcheck_ipv4_address=None, ike_cipher_encryption_algorithm=None, ike_cipher_integrity_algorithm=None, ike_cipher_diffie_hellman_group=None, esp_cipher_encryption_algorithm=None, esp_cipher_integrity_algorithm=None, esp_cipher_diffie_hellman_group=None, esp_lifetime=None, ike_lifetime=None, ike_rekey=None, ike_reauth=None, ike_authentication_type=None, ike_preshared_key=None, ike_chain_of_trust_certificates=None, ike_certificate_dn=None, ike_remote_identity=None, local_ipv4_block=None, remote_ipv4_ranges=None, use_cert_hash=None, local_certificate_uribase=None, remote_certificate_uribase=None, local_vars_configuration=None):  # noqa: E501
        """IpsecConnectionSpec - 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._ike_version = None
        self._remote_ipv4_address = None
        self._remote_dns_ipv4_address = None
        self._remote_healthcheck_ipv4_address = None
        self._ike_cipher_encryption_algorithm = None
        self._ike_cipher_integrity_algorithm = None
        self._ike_cipher_diffie_hellman_group = None
        self._esp_cipher_encryption_algorithm = None
        self._esp_cipher_integrity_algorithm = None
        self._esp_cipher_diffie_hellman_group = None
        self._esp_lifetime = None
        self._ike_lifetime = None
        self._ike_rekey = None
        self._ike_reauth = None
        self._ike_authentication_type = None
        self._ike_preshared_key = None
        self._ike_chain_of_trust_certificates = None
        self._ike_certificate_dn = None
        self._ike_remote_identity = None
        self._local_ipv4_block = None
        self._remote_ipv4_ranges = None
        self._use_cert_hash = None
        self._local_certificate_uribase = None
        self._remote_certificate_uribase = None
        self.discriminator = None

        if ike_version is not None:
            self.ike_version = ike_version
        if remote_ipv4_address is not None:
            self.remote_ipv4_address = remote_ipv4_address
        if remote_dns_ipv4_address is not None:
            self.remote_dns_ipv4_address = remote_dns_ipv4_address
        if remote_healthcheck_ipv4_address is not None:
            self.remote_healthcheck_ipv4_address = remote_healthcheck_ipv4_address
        if ike_cipher_encryption_algorithm is not None:
            self.ike_cipher_encryption_algorithm = ike_cipher_encryption_algorithm
        if ike_cipher_integrity_algorithm is not None:
            self.ike_cipher_integrity_algorithm = ike_cipher_integrity_algorithm
        if ike_cipher_diffie_hellman_group is not None:
            self.ike_cipher_diffie_hellman_group = ike_cipher_diffie_hellman_group
        if esp_cipher_encryption_algorithm is not None:
            self.esp_cipher_encryption_algorithm = esp_cipher_encryption_algorithm
        if esp_cipher_integrity_algorithm is not None:
            self.esp_cipher_integrity_algorithm = esp_cipher_integrity_algorithm
        if esp_cipher_diffie_hellman_group is not None:
            self.esp_cipher_diffie_hellman_group = esp_cipher_diffie_hellman_group
        if esp_lifetime is not None:
            self.esp_lifetime = esp_lifetime
        if ike_lifetime is not None:
            self.ike_lifetime = ike_lifetime
        if ike_rekey is not None:
            self.ike_rekey = ike_rekey
        if ike_reauth is not None:
            self.ike_reauth = ike_reauth
        if ike_authentication_type is not None:
            self.ike_authentication_type = ike_authentication_type
        if ike_preshared_key is not None:
            self.ike_preshared_key = ike_preshared_key
        if ike_chain_of_trust_certificates is not None:
            self.ike_chain_of_trust_certificates = ike_chain_of_trust_certificates
        if ike_certificate_dn is not None:
            self.ike_certificate_dn = ike_certificate_dn
        if ike_remote_identity is not None:
            self.ike_remote_identity = ike_remote_identity
        if local_ipv4_block is not None:
            self.local_ipv4_block = local_ipv4_block
        if remote_ipv4_ranges is not None:
            self.remote_ipv4_ranges = remote_ipv4_ranges
        if use_cert_hash is not None:
            self.use_cert_hash = use_cert_hash
        if local_certificate_uribase is not None:
            self.local_certificate_uribase = local_certificate_uribase
        if remote_certificate_uribase is not None:
            self.remote_certificate_uribase = remote_certificate_uribase

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

        The IKE version  # noqa: E501

        :return: The ike_version of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._ike_version

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

        The IKE version  # noqa: E501

        :param ike_version: The ike_version of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """
        allowed_values = ["ikev1", "ikev2"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ike_version not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `ike_version` ({0}), must be one of {1}"  # noqa: E501
                .format(ike_version, allowed_values)
            )

        self._ike_version = ike_version

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

        remote peer IPv4 address  # noqa: E501

        :return: The remote_ipv4_address of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._remote_ipv4_address

    @remote_ipv4_address.setter
    def remote_ipv4_address(self, remote_ipv4_address):
        """Sets the remote_ipv4_address of this IpsecConnectionSpec.

        remote peer IPv4 address  # noqa: E501

        :param remote_ipv4_address: The remote_ipv4_address of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._remote_ipv4_address = remote_ipv4_address

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

        remote peer DNS IPv4 address  # noqa: E501

        :return: The remote_dns_ipv4_address of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._remote_dns_ipv4_address

    @remote_dns_ipv4_address.setter
    def remote_dns_ipv4_address(self, remote_dns_ipv4_address):
        """Sets the remote_dns_ipv4_address of this IpsecConnectionSpec.

        remote peer DNS IPv4 address  # noqa: E501

        :param remote_dns_ipv4_address: The remote_dns_ipv4_address of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._remote_dns_ipv4_address = remote_dns_ipv4_address

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

        Remote peer healthcheck IPv4 address. The remote peer address must respond to ping (ICMP). This is used to validate the health of the connection.   # noqa: E501

        :return: The remote_healthcheck_ipv4_address of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._remote_healthcheck_ipv4_address

    @remote_healthcheck_ipv4_address.setter
    def remote_healthcheck_ipv4_address(self, remote_healthcheck_ipv4_address):
        """Sets the remote_healthcheck_ipv4_address of this IpsecConnectionSpec.

        Remote peer healthcheck IPv4 address. The remote peer address must respond to ping (ICMP). This is used to validate the health of the connection.   # noqa: E501

        :param remote_healthcheck_ipv4_address: The remote_healthcheck_ipv4_address of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._remote_healthcheck_ipv4_address = remote_healthcheck_ipv4_address

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


        :return: The ike_cipher_encryption_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :rtype: CipherEncryptionAlgorithm
        """
        return self._ike_cipher_encryption_algorithm

    @ike_cipher_encryption_algorithm.setter
    def ike_cipher_encryption_algorithm(self, ike_cipher_encryption_algorithm):
        """Sets the ike_cipher_encryption_algorithm of this IpsecConnectionSpec.


        :param ike_cipher_encryption_algorithm: The ike_cipher_encryption_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :type: CipherEncryptionAlgorithm
        """

        self._ike_cipher_encryption_algorithm = ike_cipher_encryption_algorithm

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


        :return: The ike_cipher_integrity_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :rtype: CipherIntegrityAlgorithm
        """
        return self._ike_cipher_integrity_algorithm

    @ike_cipher_integrity_algorithm.setter
    def ike_cipher_integrity_algorithm(self, ike_cipher_integrity_algorithm):
        """Sets the ike_cipher_integrity_algorithm of this IpsecConnectionSpec.


        :param ike_cipher_integrity_algorithm: The ike_cipher_integrity_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :type: CipherIntegrityAlgorithm
        """

        self._ike_cipher_integrity_algorithm = ike_cipher_integrity_algorithm

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


        :return: The ike_cipher_diffie_hellman_group of this IpsecConnectionSpec.  # noqa: E501
        :rtype: CipherDiffieHellmanGroup
        """
        return self._ike_cipher_diffie_hellman_group

    @ike_cipher_diffie_hellman_group.setter
    def ike_cipher_diffie_hellman_group(self, ike_cipher_diffie_hellman_group):
        """Sets the ike_cipher_diffie_hellman_group of this IpsecConnectionSpec.


        :param ike_cipher_diffie_hellman_group: The ike_cipher_diffie_hellman_group of this IpsecConnectionSpec.  # noqa: E501
        :type: CipherDiffieHellmanGroup
        """

        self._ike_cipher_diffie_hellman_group = ike_cipher_diffie_hellman_group

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


        :return: The esp_cipher_encryption_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :rtype: CipherEncryptionAlgorithm
        """
        return self._esp_cipher_encryption_algorithm

    @esp_cipher_encryption_algorithm.setter
    def esp_cipher_encryption_algorithm(self, esp_cipher_encryption_algorithm):
        """Sets the esp_cipher_encryption_algorithm of this IpsecConnectionSpec.


        :param esp_cipher_encryption_algorithm: The esp_cipher_encryption_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :type: CipherEncryptionAlgorithm
        """

        self._esp_cipher_encryption_algorithm = esp_cipher_encryption_algorithm

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


        :return: The esp_cipher_integrity_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :rtype: CipherIntegrityAlgorithm
        """
        return self._esp_cipher_integrity_algorithm

    @esp_cipher_integrity_algorithm.setter
    def esp_cipher_integrity_algorithm(self, esp_cipher_integrity_algorithm):
        """Sets the esp_cipher_integrity_algorithm of this IpsecConnectionSpec.


        :param esp_cipher_integrity_algorithm: The esp_cipher_integrity_algorithm of this IpsecConnectionSpec.  # noqa: E501
        :type: CipherIntegrityAlgorithm
        """

        self._esp_cipher_integrity_algorithm = esp_cipher_integrity_algorithm

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


        :return: The esp_cipher_diffie_hellman_group of this IpsecConnectionSpec.  # noqa: E501
        :rtype: CipherDiffieHellmanGroup
        """
        return self._esp_cipher_diffie_hellman_group

    @esp_cipher_diffie_hellman_group.setter
    def esp_cipher_diffie_hellman_group(self, esp_cipher_diffie_hellman_group):
        """Sets the esp_cipher_diffie_hellman_group of this IpsecConnectionSpec.


        :param esp_cipher_diffie_hellman_group: The esp_cipher_diffie_hellman_group of this IpsecConnectionSpec.  # noqa: E501
        :type: CipherDiffieHellmanGroup
        """

        self._esp_cipher_diffie_hellman_group = esp_cipher_diffie_hellman_group

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

        Absolute time after which an IPsec security association expires, in minutes.   # noqa: E501

        :return: The esp_lifetime of this IpsecConnectionSpec.  # noqa: E501
        :rtype: int
        """
        return self._esp_lifetime

    @esp_lifetime.setter
    def esp_lifetime(self, esp_lifetime):
        """Sets the esp_lifetime of this IpsecConnectionSpec.

        Absolute time after which an IPsec security association expires, in minutes.   # noqa: E501

        :param esp_lifetime: The esp_lifetime of this IpsecConnectionSpec.  # noqa: E501
        :type: int
        """

        self._esp_lifetime = esp_lifetime

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

        Absolute time after which an IKE security association expires, in minutes.   # noqa: E501

        :return: The ike_lifetime of this IpsecConnectionSpec.  # noqa: E501
        :rtype: int
        """
        return self._ike_lifetime

    @ike_lifetime.setter
    def ike_lifetime(self, ike_lifetime):
        """Sets the ike_lifetime of this IpsecConnectionSpec.

        Absolute time after which an IKE security association expires, in minutes.   # noqa: E501

        :param ike_lifetime: The ike_lifetime of this IpsecConnectionSpec.  # noqa: E501
        :type: int
        """

        self._ike_lifetime = ike_lifetime

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

        Allows control of IKE rekey.  true is enabled, false is disabled.   # noqa: E501

        :return: The ike_rekey of this IpsecConnectionSpec.  # noqa: E501
        :rtype: bool
        """
        return self._ike_rekey

    @ike_rekey.setter
    def ike_rekey(self, ike_rekey):
        """Sets the ike_rekey of this IpsecConnectionSpec.

        Allows control of IKE rekey.  true is enabled, false is disabled.   # noqa: E501

        :param ike_rekey: The ike_rekey of this IpsecConnectionSpec.  # noqa: E501
        :type: bool
        """

        self._ike_rekey = ike_rekey

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

        Allows control of IKE re-authentication.  true is enabled, false is disabled.   # noqa: E501

        :return: The ike_reauth of this IpsecConnectionSpec.  # noqa: E501
        :rtype: bool
        """
        return self._ike_reauth

    @ike_reauth.setter
    def ike_reauth(self, ike_reauth):
        """Sets the ike_reauth of this IpsecConnectionSpec.

        Allows control of IKE re-authentication.  true is enabled, false is disabled.   # noqa: E501

        :param ike_reauth: The ike_reauth of this IpsecConnectionSpec.  # noqa: E501
        :type: bool
        """

        self._ike_reauth = ike_reauth

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

        The IKE authentication type.  # noqa: E501

        :return: The ike_authentication_type of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._ike_authentication_type

    @ike_authentication_type.setter
    def ike_authentication_type(self, ike_authentication_type):
        """Sets the ike_authentication_type of this IpsecConnectionSpec.

        The IKE authentication type.  # noqa: E501

        :param ike_authentication_type: The ike_authentication_type of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """
        allowed_values = ["ike_preshared_key", "certificate"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ike_authentication_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `ike_authentication_type` ({0}), must be one of {1}"  # noqa: E501
                .format(ike_authentication_type, allowed_values)
            )

        self._ike_authentication_type = ike_authentication_type

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

        ike preshared key  # noqa: E501

        :return: The ike_preshared_key of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._ike_preshared_key

    @ike_preshared_key.setter
    def ike_preshared_key(self, ike_preshared_key):
        """Sets the ike_preshared_key of this IpsecConnectionSpec.

        ike preshared key  # noqa: E501

        :param ike_preshared_key: The ike_preshared_key of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._ike_preshared_key = ike_preshared_key

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

        Chain of trust certficates. Certificates are PEM encoded and are separated by a newline.  ie. A signed by B would be a string where A is first, newline, followed by B.   # noqa: E501

        :return: The ike_chain_of_trust_certificates of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._ike_chain_of_trust_certificates

    @ike_chain_of_trust_certificates.setter
    def ike_chain_of_trust_certificates(self, ike_chain_of_trust_certificates):
        """Sets the ike_chain_of_trust_certificates of this IpsecConnectionSpec.

        Chain of trust certficates. Certificates are PEM encoded and are separated by a newline.  ie. A signed by B would be a string where A is first, newline, followed by B.   # noqa: E501

        :param ike_chain_of_trust_certificates: The ike_chain_of_trust_certificates of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._ike_chain_of_trust_certificates = ike_chain_of_trust_certificates

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

        certificate distinguished name (DN) Deprecated in favour of the generic ike_remote_identity field.   # noqa: E501

        :return: The ike_certificate_dn of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._ike_certificate_dn

    @ike_certificate_dn.setter
    def ike_certificate_dn(self, ike_certificate_dn):
        """Sets the ike_certificate_dn of this IpsecConnectionSpec.

        certificate distinguished name (DN) Deprecated in favour of the generic ike_remote_identity field.   # noqa: E501

        :param ike_certificate_dn: The ike_certificate_dn of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._ike_certificate_dn = ike_certificate_dn

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

        The identity of the remote peer. The remote peer will send credentials including this identity as part of the IKE authentication exchange.  The meaning of the identity depends on the authentication type.   - `ike_preshared_key`: This is an arbitrary value provisioned on the remote     peer, often a FQDN or email address. E.g. \"vpn.my-org.example.com\".   - `certificate`: This is the distinguished name (DN) of the entity certificate     presented by the remote peer. E.g. \"C=CA; O=Agilicus; CN=vpn-1.ca-1.agilicus.ca\".   # noqa: E501

        :return: The ike_remote_identity of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._ike_remote_identity

    @ike_remote_identity.setter
    def ike_remote_identity(self, ike_remote_identity):
        """Sets the ike_remote_identity of this IpsecConnectionSpec.

        The identity of the remote peer. The remote peer will send credentials including this identity as part of the IKE authentication exchange.  The meaning of the identity depends on the authentication type.   - `ike_preshared_key`: This is an arbitrary value provisioned on the remote     peer, often a FQDN or email address. E.g. \"vpn.my-org.example.com\".   - `certificate`: This is the distinguished name (DN) of the entity certificate     presented by the remote peer. E.g. \"C=CA; O=Agilicus; CN=vpn-1.ca-1.agilicus.ca\".   # noqa: E501

        :param ike_remote_identity: The ike_remote_identity of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._ike_remote_identity = ike_remote_identity

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

        The local IP block that used by the tunnel. A tunnel requires a /30 subnet, within the following IP address ranges    192.168.0.0 -> 192.168.255.252   172.16.0.0 -> 172.31.255.255   # noqa: E501

        :return: The local_ipv4_block of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._local_ipv4_block

    @local_ipv4_block.setter
    def local_ipv4_block(self, local_ipv4_block):
        """Sets the local_ipv4_block of this IpsecConnectionSpec.

        The local IP block that used by the tunnel. A tunnel requires a /30 subnet, within the following IP address ranges    192.168.0.0 -> 192.168.255.252   172.16.0.0 -> 172.31.255.255   # noqa: E501

        :param local_ipv4_block: The local_ipv4_block of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._local_ipv4_block = local_ipv4_block

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

        One or more IP address ranges that define the peer network range.   # noqa: E501

        :return: The remote_ipv4_ranges of this IpsecConnectionSpec.  # noqa: E501
        :rtype: list[IpsecConnectionIpv4Block]
        """
        return self._remote_ipv4_ranges

    @remote_ipv4_ranges.setter
    def remote_ipv4_ranges(self, remote_ipv4_ranges):
        """Sets the remote_ipv4_ranges of this IpsecConnectionSpec.

        One or more IP address ranges that define the peer network range.   # noqa: E501

        :param remote_ipv4_ranges: The remote_ipv4_ranges of this IpsecConnectionSpec.  # noqa: E501
        :type: list[IpsecConnectionIpv4Block]
        """

        self._remote_ipv4_ranges = remote_ipv4_ranges

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

        Controls if certificate exchange using hash is enabled.   # noqa: E501

        :return: The use_cert_hash of this IpsecConnectionSpec.  # noqa: E501
        :rtype: bool
        """
        return self._use_cert_hash

    @use_cert_hash.setter
    def use_cert_hash(self, use_cert_hash):
        """Sets the use_cert_hash of this IpsecConnectionSpec.

        Controls if certificate exchange using hash is enabled.   # noqa: E501

        :param use_cert_hash: The use_cert_hash of this IpsecConnectionSpec.  # noqa: E501
        :type: bool
        """

        self._use_cert_hash = use_cert_hash

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

        Provides the local endpoint uri base for certificate hash lookup. See https://tools.ietf.org/html/rfc7296#section-3.6 (Hash and URL encoding). Note that since the ultimate URL is constructed through concatenation, the final `/` is important.   # noqa: E501

        :return: The local_certificate_uribase of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._local_certificate_uribase

    @local_certificate_uribase.setter
    def local_certificate_uribase(self, local_certificate_uribase):
        """Sets the local_certificate_uribase of this IpsecConnectionSpec.

        Provides the local endpoint uri base for certificate hash lookup. See https://tools.ietf.org/html/rfc7296#section-3.6 (Hash and URL encoding). Note that since the ultimate URL is constructed through concatenation, the final `/` is important.   # noqa: E501

        :param local_certificate_uribase: The local_certificate_uribase of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._local_certificate_uribase = local_certificate_uribase

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

        Provides the remote endpoint uri base for certificate hash lookup. See https://tools.ietf.org/html/rfc7296#section-3.6 (Hash and URL encoding). Note that since the ultimate URL is constructed through concatenation, the final `/` is important.   # noqa: E501

        :return: The remote_certificate_uribase of this IpsecConnectionSpec.  # noqa: E501
        :rtype: str
        """
        return self._remote_certificate_uribase

    @remote_certificate_uribase.setter
    def remote_certificate_uribase(self, remote_certificate_uribase):
        """Sets the remote_certificate_uribase of this IpsecConnectionSpec.

        Provides the remote endpoint uri base for certificate hash lookup. See https://tools.ietf.org/html/rfc7296#section-3.6 (Hash and URL encoding). Note that since the ultimate URL is constructed through concatenation, the final `/` is important.   # noqa: E501

        :param remote_certificate_uribase: The remote_certificate_uribase of this IpsecConnectionSpec.  # noqa: E501
        :type: str
        """

        self._remote_certificate_uribase = remote_certificate_uribase

    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, IpsecConnectionSpec):
            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, IpsecConnectionSpec):
            return True

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