# coding: utf-8

"""
    Harbor API

    These APIs provide services for manipulating Harbor project.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from harbor_client.configuration import Configuration


class Instance(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': 'int',
        'name': 'str',
        'description': 'str',
        'vendor': 'str',
        'endpoint': 'str',
        'auth_mode': 'str',
        'auth_info': 'dict(str, str)',
        'status': 'str',
        'enabled': 'bool',
        'default': 'bool',
        'insecure': 'bool',
        'setup_timestamp': 'int'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'description': 'description',
        'vendor': 'vendor',
        'endpoint': 'endpoint',
        'auth_mode': 'auth_mode',
        'auth_info': 'auth_info',
        'status': 'status',
        'enabled': 'enabled',
        'default': 'default',
        'insecure': 'insecure',
        'setup_timestamp': 'setup_timestamp'
    }

    def __init__(self, id=None, name=None, description=None, vendor=None, endpoint=None, auth_mode=None, auth_info=None, status=None, enabled=None, default=None, insecure=None, setup_timestamp=None, _configuration=None):  # noqa: E501
        """Instance - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._name = None
        self._description = None
        self._vendor = None
        self._endpoint = None
        self._auth_mode = None
        self._auth_info = None
        self._status = None
        self._enabled = None
        self._default = None
        self._insecure = None
        self._setup_timestamp = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if description is not None:
            self.description = description
        if vendor is not None:
            self.vendor = vendor
        if endpoint is not None:
            self.endpoint = endpoint
        if auth_mode is not None:
            self.auth_mode = auth_mode
        if auth_info is not None:
            self.auth_info = auth_info
        if status is not None:
            self.status = status
        if enabled is not None:
            self.enabled = enabled
        if default is not None:
            self.default = default
        if insecure is not None:
            self.insecure = insecure
        if setup_timestamp is not None:
            self.setup_timestamp = setup_timestamp

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

        Unique ID  # noqa: E501

        :return: The id of this Instance.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Instance.

        Unique ID  # noqa: E501

        :param id: The id of this Instance.  # noqa: E501
        :type: int
        """

        self._id = id

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

        Instance name  # noqa: E501

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

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

        Instance name  # noqa: E501

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

        self._name = name

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

        Description of instance  # noqa: E501

        :return: The description of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Instance.

        Description of instance  # noqa: E501

        :param description: The description of this Instance.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Based on which driver, identified by ID  # noqa: E501

        :return: The vendor of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._vendor

    @vendor.setter
    def vendor(self, vendor):
        """Sets the vendor of this Instance.

        Based on which driver, identified by ID  # noqa: E501

        :param vendor: The vendor of this Instance.  # noqa: E501
        :type: str
        """

        self._vendor = vendor

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

        The service endpoint of this instance  # noqa: E501

        :return: The endpoint of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._endpoint

    @endpoint.setter
    def endpoint(self, endpoint):
        """Sets the endpoint of this Instance.

        The service endpoint of this instance  # noqa: E501

        :param endpoint: The endpoint of this Instance.  # noqa: E501
        :type: str
        """

        self._endpoint = endpoint

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

        The authentication way supported  # noqa: E501

        :return: The auth_mode of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._auth_mode

    @auth_mode.setter
    def auth_mode(self, auth_mode):
        """Sets the auth_mode of this Instance.

        The authentication way supported  # noqa: E501

        :param auth_mode: The auth_mode of this Instance.  # noqa: E501
        :type: str
        """

        self._auth_mode = auth_mode

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

        The auth credential data if exists  # noqa: E501

        :return: The auth_info of this Instance.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._auth_info

    @auth_info.setter
    def auth_info(self, auth_info):
        """Sets the auth_info of this Instance.

        The auth credential data if exists  # noqa: E501

        :param auth_info: The auth_info of this Instance.  # noqa: E501
        :type: dict(str, str)
        """

        self._auth_info = auth_info

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

        The health status  # noqa: E501

        :return: The status of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Instance.

        The health status  # noqa: E501

        :param status: The status of this Instance.  # noqa: E501
        :type: str
        """

        self._status = status

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

        Whether the instance is activated or not  # noqa: E501

        :return: The enabled of this Instance.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this Instance.

        Whether the instance is activated or not  # noqa: E501

        :param enabled: The enabled of this Instance.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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

        Whether the instance is default or not  # noqa: E501

        :return: The default of this Instance.  # noqa: E501
        :rtype: bool
        """
        return self._default

    @default.setter
    def default(self, default):
        """Sets the default of this Instance.

        Whether the instance is default or not  # noqa: E501

        :param default: The default of this Instance.  # noqa: E501
        :type: bool
        """

        self._default = default

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

        Whether the instance endpoint is insecure or not  # noqa: E501

        :return: The insecure of this Instance.  # noqa: E501
        :rtype: bool
        """
        return self._insecure

    @insecure.setter
    def insecure(self, insecure):
        """Sets the insecure of this Instance.

        Whether the instance endpoint is insecure or not  # noqa: E501

        :param insecure: The insecure of this Instance.  # noqa: E501
        :type: bool
        """

        self._insecure = insecure

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

        The timestamp of instance setting up  # noqa: E501

        :return: The setup_timestamp of this Instance.  # noqa: E501
        :rtype: int
        """
        return self._setup_timestamp

    @setup_timestamp.setter
    def setup_timestamp(self, setup_timestamp):
        """Sets the setup_timestamp of this Instance.

        The timestamp of instance setting up  # noqa: E501

        :param setup_timestamp: The setup_timestamp of this Instance.  # noqa: E501
        :type: int
        """

        self._setup_timestamp = setup_timestamp

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

        for attr, _ in six.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
        if issubclass(Instance, dict):
            for key, value in self.items():
                result[key] = 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, Instance):
            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, Instance):
            return True

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