# coding: utf-8

"""
    3blades API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class SshTunnel(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """


    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'id': 'str',
        'server': 'str',
        'name': 'str',
        'host': 'str',
        'local_port': 'int',
        'remote_port': 'int',
        'endpoint': 'str',
        'username': 'str'
    }

    attribute_map = {
        'id': 'id',
        'server': 'server',
        'name': 'name',
        'host': 'host',
        'local_port': 'local_port',
        'remote_port': 'remote_port',
        'endpoint': 'endpoint',
        'username': 'username'
    }

    def __init__(self, id=None, server=None, name=None, host=None, local_port=None, remote_port=None, endpoint=None, username=None):
        """
        SshTunnel - a model defined in Swagger
        """

        self._id = None
        self._server = None
        self._name = None
        self._host = None
        self._local_port = None
        self._remote_port = None
        self._endpoint = None
        self._username = None

        if id is not None:
          self.id = id
        if server is not None:
          self.server = server
        self.name = name
        self.host = host
        self.local_port = local_port
        self.remote_port = remote_port
        self.endpoint = endpoint
        self.username = username

    @property
    def id(self):
        """
        Gets the id of this SshTunnel.
        SSH tunnel unique identifier in UUID format.

        :return: The id of this SshTunnel.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this SshTunnel.
        SSH tunnel unique identifier in UUID format.

        :param id: The id of this SshTunnel.
        :type: str
        """

        self._id = id

    @property
    def server(self):
        """
        Gets the server of this SshTunnel.
        Server name.

        :return: The server of this SshTunnel.
        :rtype: str
        """
        return self._server

    @server.setter
    def server(self, server):
        """
        Sets the server of this SshTunnel.
        Server name.

        :param server: The server of this SshTunnel.
        :type: str
        """

        self._server = server

    @property
    def name(self):
        """
        Gets the name of this SshTunnel.
        SSH tunnel name.

        :return: The name of this SshTunnel.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this SshTunnel.
        SSH tunnel name.

        :param name: The name of this SshTunnel.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def host(self):
        """
        Gets the host of this SshTunnel.
        Host, usually IPv4, for SSH tunnel.

        :return: The host of this SshTunnel.
        :rtype: str
        """
        return self._host

    @host.setter
    def host(self, host):
        """
        Sets the host of this SshTunnel.
        Host, usually IPv4, for SSH tunnel.

        :param host: The host of this SshTunnel.
        :type: str
        """
        if host is None:
            raise ValueError("Invalid value for `host`, must not be `None`")

        self._host = host

    @property
    def local_port(self):
        """
        Gets the local_port of this SshTunnel.
        Local source port for SSH tunnel.

        :return: The local_port of this SshTunnel.
        :rtype: int
        """
        return self._local_port

    @local_port.setter
    def local_port(self, local_port):
        """
        Sets the local_port of this SshTunnel.
        Local source port for SSH tunnel.

        :param local_port: The local_port of this SshTunnel.
        :type: int
        """
        if local_port is None:
            raise ValueError("Invalid value for `local_port`, must not be `None`")

        self._local_port = local_port

    @property
    def remote_port(self):
        """
        Gets the remote_port of this SshTunnel.
        Remote port to establish SSH tunnel.

        :return: The remote_port of this SshTunnel.
        :rtype: int
        """
        return self._remote_port

    @remote_port.setter
    def remote_port(self, remote_port):
        """
        Sets the remote_port of this SshTunnel.
        Remote port to establish SSH tunnel.

        :param remote_port: The remote_port of this SshTunnel.
        :type: int
        """
        if remote_port is None:
            raise ValueError("Invalid value for `remote_port`, must not be `None`")

        self._remote_port = remote_port

    @property
    def endpoint(self):
        """
        Gets the endpoint of this SshTunnel.
        SSH tunnel destination endpoint.

        :return: The endpoint of this SshTunnel.
        :rtype: str
        """
        return self._endpoint

    @endpoint.setter
    def endpoint(self, endpoint):
        """
        Sets the endpoint of this SshTunnel.
        SSH tunnel destination endpoint.

        :param endpoint: The endpoint of this SshTunnel.
        :type: str
        """
        if endpoint is None:
            raise ValueError("Invalid value for `endpoint`, must not be `None`")

        self._endpoint = endpoint

    @property
    def username(self):
        """
        Gets the username of this SshTunnel.
        SSH tunnel user name.

        :return: The username of this SshTunnel.
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """
        Sets the username of this SshTunnel.
        SSH tunnel user name.

        :param username: The username of this SshTunnel.
        :type: str
        """
        if username is None:
            raise ValueError("Invalid value for `username`, must not be `None`")

        self._username = username

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

        for attr, _ in iteritems(self.swagger_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 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, SshTunnel):
            return False

        return self.__dict__ == other.__dict__

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