# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from openapi_client.configuration import Configuration


class OrmWorkspacePort(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 = {
        'credential_key': 'str',
        'credential_type': 'str',
        'credential_value': 'str',
        'expose_type': 'str',
        'health_check_path': 'str',
        'name': 'str',
        'port': 'int'
    }

    attribute_map = {
        'credential_key': 'credential_key',
        'credential_type': 'credential_type',
        'credential_value': 'credential_value',
        'expose_type': 'expose_type',
        'health_check_path': 'health_check_path',
        'name': 'name',
        'port': 'port'
    }

    def __init__(self, credential_key=None, credential_type=None, credential_value=None, expose_type='http', health_check_path=None, name=None, port=None, local_vars_configuration=None):  # noqa: E501
        """OrmWorkspacePort - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._credential_key = None
        self._credential_type = None
        self._credential_value = None
        self._expose_type = None
        self._health_check_path = None
        self._name = None
        self._port = None
        self.discriminator = None

        if credential_key is not None:
            self.credential_key = credential_key
        if credential_type is not None:
            self.credential_type = credential_type
        if credential_value is not None:
            self.credential_value = credential_value
        if expose_type is not None:
            self.expose_type = expose_type
        if health_check_path is not None:
            self.health_check_path = health_check_path
        if name is not None:
            self.name = name
        if port is not None:
            self.port = port

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


        :return: The credential_key of this OrmWorkspacePort.  # noqa: E501
        :rtype: str
        """
        return self._credential_key

    @credential_key.setter
    def credential_key(self, credential_key):
        """Sets the credential_key of this OrmWorkspacePort.


        :param credential_key: The credential_key of this OrmWorkspacePort.  # noqa: E501
        :type credential_key: str
        """

        self._credential_key = credential_key

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


        :return: The credential_type of this OrmWorkspacePort.  # noqa: E501
        :rtype: str
        """
        return self._credential_type

    @credential_type.setter
    def credential_type(self, credential_type):
        """Sets the credential_type of this OrmWorkspacePort.


        :param credential_type: The credential_type of this OrmWorkspacePort.  # noqa: E501
        :type credential_type: str
        """

        self._credential_type = credential_type

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


        :return: The credential_value of this OrmWorkspacePort.  # noqa: E501
        :rtype: str
        """
        return self._credential_value

    @credential_value.setter
    def credential_value(self, credential_value):
        """Sets the credential_value of this OrmWorkspacePort.


        :param credential_value: The credential_value of this OrmWorkspacePort.  # noqa: E501
        :type credential_value: str
        """

        self._credential_value = credential_value

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


        :return: The expose_type of this OrmWorkspacePort.  # noqa: E501
        :rtype: str
        """
        return self._expose_type

    @expose_type.setter
    def expose_type(self, expose_type):
        """Sets the expose_type of this OrmWorkspacePort.


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

        self._expose_type = expose_type

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


        :return: The health_check_path of this OrmWorkspacePort.  # noqa: E501
        :rtype: str
        """
        return self._health_check_path

    @health_check_path.setter
    def health_check_path(self, health_check_path):
        """Sets the health_check_path of this OrmWorkspacePort.


        :param health_check_path: The health_check_path of this OrmWorkspacePort.  # noqa: E501
        :type health_check_path: str
        """

        self._health_check_path = health_check_path

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


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

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


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

        self._name = name

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


        :return: The port of this OrmWorkspacePort.  # noqa: E501
        :rtype: int
        """
        return self._port

    @port.setter
    def port(self, port):
        """Sets the port of this OrmWorkspacePort.


        :param port: The port of this OrmWorkspacePort.  # noqa: E501
        :type port: int
        """

        self._port = port

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, OrmWorkspacePort):
            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, OrmWorkspacePort):
            return True

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