# coding: utf-8

"""
    Tator REST API

    Interface to the Tator backend.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class JobCluster(object):
    """
    """

    """
    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 = {
        'cert': 'str',
        'effective_permission': 'int',
        'host': 'str',
        'id': 'int',
        'name': 'str',
        'organization': 'int',
        'port': 'int',
        'token': 'str'
    }

    attribute_map = {
        'cert': 'cert',
        'effective_permission': 'effective_permission',
        'host': 'host',
        'id': 'id',
        'name': 'name',
        'organization': 'organization',
        'port': 'port',
        'token': 'token'
    }

    def __init__(self, cert=None, effective_permission=None, host=None, id=None, name=None, organization=None, port=None, token=None, local_vars_configuration=None):  # noqa: E501
        """JobCluster - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._cert = None
        self._effective_permission = None
        self._host = None
        self._id = None
        self._name = None
        self._organization = None
        self._port = None
        self._token = None
        self.discriminator = None

        if cert is not None:
            self.cert = cert
        if effective_permission is not None:
            self.effective_permission = effective_permission
        if host is not None:
            self.host = host
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if organization is not None:
            self.organization = organization
        if port is not None:
            self.port = port
        if token is not None:
            self.token = token

    @property
    def cert(self):
        """
        Certificate for accessing the job cluster.

        :return: The cert of this JobCluster. 
        :rtype: str
        """
        return self._cert

    @cert.setter
    def cert(self, cert):
        """
        Certificate for accessing the job cluster.

        :param cert: The cert of this JobCluster.
        :type: str
        """

        self._cert = cert

    @property
    def effective_permission(self):
        """
        Effective permission mask for this entity.

        :return: The effective_permission of this JobCluster. 
        :rtype: int
        """
        return self._effective_permission

    @effective_permission.setter
    def effective_permission(self, effective_permission):
        """
        Effective permission mask for this entity.

        :param effective_permission: The effective_permission of this JobCluster.
        :type: int
        """

        self._effective_permission = effective_permission

    @property
    def host(self):
        """
        Hostname where the cluster can be accessed.

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

    @host.setter
    def host(self, host):
        """
        Hostname where the cluster can be accessed.

        :param host: The host of this JobCluster.
        :type: str
        """

        self._host = host

    @property
    def id(self):
        """
        Unique integer identifying the job cluster.

        :return: The id of this JobCluster. 
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Unique integer identifying the job cluster.

        :param id: The id of this JobCluster.
        :type: int
        """

        self._id = id

    @property
    def name(self):
        """
        Unique name of the job cluster.

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

    @name.setter
    def name(self, name):
        """
        Unique name of the job cluster.

        :param name: The name of this JobCluster.
        :type: str
        """

        self._name = name

    @property
    def organization(self):
        """
        Unique integer identifying the organization associated with the job cluster.

        :return: The organization of this JobCluster. 
        :rtype: int
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """
        Unique integer identifying the organization associated with the job cluster.

        :param organization: The organization of this JobCluster.
        :type: int
        """

        self._organization = organization

    @property
    def port(self):
        """
        Port where the cluster can be accessed.

        :return: The port of this JobCluster. 
        :rtype: int
        """
        return self._port

    @port.setter
    def port(self, port):
        """
        Port where the cluster can be accessed.

        :param port: The port of this JobCluster.
        :type: int
        """

        self._port = port

    @property
    def token(self):
        """
        Token for accessing the job cluster.

        :return: The token of this JobCluster. 
        :rtype: str
        """
        return self._token

    @token.setter
    def token(self, token):
        """
        Token for accessing the job cluster.

        :param token: The token of this JobCluster.
        :type: str
        """

        self._token = token

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

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