# 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 GeneralInfo(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 = {
        'current_time': 'datetime',
        'with_notary': 'bool',
        'with_chartmuseum': 'bool',
        'registry_url': 'str',
        'external_url': 'str',
        'auth_mode': 'str',
        'project_creation_restriction': 'str',
        'self_registration': 'bool',
        'has_ca_root': 'bool',
        'harbor_version': 'str',
        'registry_storage_provider_name': 'str',
        'read_only': 'bool',
        'notification_enable': 'bool',
        'authproxy_settings': 'AuthproxySetting'
    }

    attribute_map = {
        'current_time': 'current_time',
        'with_notary': 'with_notary',
        'with_chartmuseum': 'with_chartmuseum',
        'registry_url': 'registry_url',
        'external_url': 'external_url',
        'auth_mode': 'auth_mode',
        'project_creation_restriction': 'project_creation_restriction',
        'self_registration': 'self_registration',
        'has_ca_root': 'has_ca_root',
        'harbor_version': 'harbor_version',
        'registry_storage_provider_name': 'registry_storage_provider_name',
        'read_only': 'read_only',
        'notification_enable': 'notification_enable',
        'authproxy_settings': 'authproxy_settings'
    }

    def __init__(self, current_time=None, with_notary=None, with_chartmuseum=None, registry_url=None, external_url=None, auth_mode=None, project_creation_restriction=None, self_registration=None, has_ca_root=None, harbor_version=None, registry_storage_provider_name=None, read_only=None, notification_enable=None, authproxy_settings=None, _configuration=None):  # noqa: E501
        """GeneralInfo - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._current_time = None
        self._with_notary = None
        self._with_chartmuseum = None
        self._registry_url = None
        self._external_url = None
        self._auth_mode = None
        self._project_creation_restriction = None
        self._self_registration = None
        self._has_ca_root = None
        self._harbor_version = None
        self._registry_storage_provider_name = None
        self._read_only = None
        self._notification_enable = None
        self._authproxy_settings = None
        self.discriminator = None

        if current_time is not None:
            self.current_time = current_time
        if with_notary is not None:
            self.with_notary = with_notary
        if with_chartmuseum is not None:
            self.with_chartmuseum = with_chartmuseum
        if registry_url is not None:
            self.registry_url = registry_url
        if external_url is not None:
            self.external_url = external_url
        if auth_mode is not None:
            self.auth_mode = auth_mode
        if project_creation_restriction is not None:
            self.project_creation_restriction = project_creation_restriction
        if self_registration is not None:
            self.self_registration = self_registration
        if has_ca_root is not None:
            self.has_ca_root = has_ca_root
        if harbor_version is not None:
            self.harbor_version = harbor_version
        if registry_storage_provider_name is not None:
            self.registry_storage_provider_name = registry_storage_provider_name
        if read_only is not None:
            self.read_only = read_only
        if notification_enable is not None:
            self.notification_enable = notification_enable
        if authproxy_settings is not None:
            self.authproxy_settings = authproxy_settings

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

        The current time of the server.  # noqa: E501

        :return: The current_time of this GeneralInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._current_time

    @current_time.setter
    def current_time(self, current_time):
        """Sets the current_time of this GeneralInfo.

        The current time of the server.  # noqa: E501

        :param current_time: The current_time of this GeneralInfo.  # noqa: E501
        :type: datetime
        """

        self._current_time = current_time

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

        If the Harbor instance is deployed with nested notary.  # noqa: E501

        :return: The with_notary of this GeneralInfo.  # noqa: E501
        :rtype: bool
        """
        return self._with_notary

    @with_notary.setter
    def with_notary(self, with_notary):
        """Sets the with_notary of this GeneralInfo.

        If the Harbor instance is deployed with nested notary.  # noqa: E501

        :param with_notary: The with_notary of this GeneralInfo.  # noqa: E501
        :type: bool
        """

        self._with_notary = with_notary

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

        If the Harbor instance is deployed with nested chartmuseum.  # noqa: E501

        :return: The with_chartmuseum of this GeneralInfo.  # noqa: E501
        :rtype: bool
        """
        return self._with_chartmuseum

    @with_chartmuseum.setter
    def with_chartmuseum(self, with_chartmuseum):
        """Sets the with_chartmuseum of this GeneralInfo.

        If the Harbor instance is deployed with nested chartmuseum.  # noqa: E501

        :param with_chartmuseum: The with_chartmuseum of this GeneralInfo.  # noqa: E501
        :type: bool
        """

        self._with_chartmuseum = with_chartmuseum

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

        The url of registry against which the docker command should be issued.  # noqa: E501

        :return: The registry_url of this GeneralInfo.  # noqa: E501
        :rtype: str
        """
        return self._registry_url

    @registry_url.setter
    def registry_url(self, registry_url):
        """Sets the registry_url of this GeneralInfo.

        The url of registry against which the docker command should be issued.  # noqa: E501

        :param registry_url: The registry_url of this GeneralInfo.  # noqa: E501
        :type: str
        """

        self._registry_url = registry_url

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

        The external URL of Harbor, with protocol.  # noqa: E501

        :return: The external_url of this GeneralInfo.  # noqa: E501
        :rtype: str
        """
        return self._external_url

    @external_url.setter
    def external_url(self, external_url):
        """Sets the external_url of this GeneralInfo.

        The external URL of Harbor, with protocol.  # noqa: E501

        :param external_url: The external_url of this GeneralInfo.  # noqa: E501
        :type: str
        """

        self._external_url = external_url

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

        The auth mode of current Harbor instance.  # noqa: E501

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

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

        The auth mode of current Harbor instance.  # noqa: E501

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

        self._auth_mode = auth_mode

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

        Indicate who can create projects, it could be 'adminonly' or 'everyone'.  # noqa: E501

        :return: The project_creation_restriction of this GeneralInfo.  # noqa: E501
        :rtype: str
        """
        return self._project_creation_restriction

    @project_creation_restriction.setter
    def project_creation_restriction(self, project_creation_restriction):
        """Sets the project_creation_restriction of this GeneralInfo.

        Indicate who can create projects, it could be 'adminonly' or 'everyone'.  # noqa: E501

        :param project_creation_restriction: The project_creation_restriction of this GeneralInfo.  # noqa: E501
        :type: str
        """

        self._project_creation_restriction = project_creation_restriction

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

        Indicate whether the Harbor instance enable user to register himself.  # noqa: E501

        :return: The self_registration of this GeneralInfo.  # noqa: E501
        :rtype: bool
        """
        return self._self_registration

    @self_registration.setter
    def self_registration(self, self_registration):
        """Sets the self_registration of this GeneralInfo.

        Indicate whether the Harbor instance enable user to register himself.  # noqa: E501

        :param self_registration: The self_registration of this GeneralInfo.  # noqa: E501
        :type: bool
        """

        self._self_registration = self_registration

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

        Indicate whether there is a ca root cert file ready for download in the file system.  # noqa: E501

        :return: The has_ca_root of this GeneralInfo.  # noqa: E501
        :rtype: bool
        """
        return self._has_ca_root

    @has_ca_root.setter
    def has_ca_root(self, has_ca_root):
        """Sets the has_ca_root of this GeneralInfo.

        Indicate whether there is a ca root cert file ready for download in the file system.  # noqa: E501

        :param has_ca_root: The has_ca_root of this GeneralInfo.  # noqa: E501
        :type: bool
        """

        self._has_ca_root = has_ca_root

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

        The build version of Harbor.  # noqa: E501

        :return: The harbor_version of this GeneralInfo.  # noqa: E501
        :rtype: str
        """
        return self._harbor_version

    @harbor_version.setter
    def harbor_version(self, harbor_version):
        """Sets the harbor_version of this GeneralInfo.

        The build version of Harbor.  # noqa: E501

        :param harbor_version: The harbor_version of this GeneralInfo.  # noqa: E501
        :type: str
        """

        self._harbor_version = harbor_version

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

        The storage provider's name of Harbor registry  # noqa: E501

        :return: The registry_storage_provider_name of this GeneralInfo.  # noqa: E501
        :rtype: str
        """
        return self._registry_storage_provider_name

    @registry_storage_provider_name.setter
    def registry_storage_provider_name(self, registry_storage_provider_name):
        """Sets the registry_storage_provider_name of this GeneralInfo.

        The storage provider's name of Harbor registry  # noqa: E501

        :param registry_storage_provider_name: The registry_storage_provider_name of this GeneralInfo.  # noqa: E501
        :type: str
        """

        self._registry_storage_provider_name = registry_storage_provider_name

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

        The flag to indicate whether Harbor is in readonly mode.  # noqa: E501

        :return: The read_only of this GeneralInfo.  # noqa: E501
        :rtype: bool
        """
        return self._read_only

    @read_only.setter
    def read_only(self, read_only):
        """Sets the read_only of this GeneralInfo.

        The flag to indicate whether Harbor is in readonly mode.  # noqa: E501

        :param read_only: The read_only of this GeneralInfo.  # noqa: E501
        :type: bool
        """

        self._read_only = read_only

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

        The flag to indicate whether notification mechanism is enabled on Harbor instance.  # noqa: E501

        :return: The notification_enable of this GeneralInfo.  # noqa: E501
        :rtype: bool
        """
        return self._notification_enable

    @notification_enable.setter
    def notification_enable(self, notification_enable):
        """Sets the notification_enable of this GeneralInfo.

        The flag to indicate whether notification mechanism is enabled on Harbor instance.  # noqa: E501

        :param notification_enable: The notification_enable of this GeneralInfo.  # noqa: E501
        :type: bool
        """

        self._notification_enable = notification_enable

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

        The setting of auth proxy this is only available when Harbor relies on authproxy for authentication.  # noqa: E501

        :return: The authproxy_settings of this GeneralInfo.  # noqa: E501
        :rtype: AuthproxySetting
        """
        return self._authproxy_settings

    @authproxy_settings.setter
    def authproxy_settings(self, authproxy_settings):
        """Sets the authproxy_settings of this GeneralInfo.

        The setting of auth proxy this is only available when Harbor relies on authproxy for authentication.  # noqa: E501

        :param authproxy_settings: The authproxy_settings of this GeneralInfo.  # noqa: E501
        :type: AuthproxySetting
        """

        self._authproxy_settings = authproxy_settings

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

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