# coding: utf-8

"""
    GraphDB Workbench API

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

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


import pprint
import re  # noqa: F401

import six

from graphdb.graphdb_workbench.configuration import Configuration


class Location(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 = {
        'active': 'bool',
        'auth_type': 'str',
        'default_repository': 'str',
        'error_msg': 'str',
        'label': 'str',
        'local': 'bool',
        'password': 'str',
        'system': 'bool',
        'uri': 'str',
        'username': 'str'
    }

    attribute_map = {
        'active': 'active',
        'auth_type': 'authType',
        'default_repository': 'defaultRepository',
        'error_msg': 'errorMsg',
        'label': 'label',
        'local': 'local',
        'password': 'password',
        'system': 'system',
        'uri': 'uri',
        'username': 'username'
    }

    def __init__(self, active=None, auth_type=None, default_repository=None, error_msg=None, label=None, local=None, password=None, system=None, uri=None, username=None, _configuration=None):  # noqa: E501
        """Location - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._active = None
        self._auth_type = None
        self._default_repository = None
        self._error_msg = None
        self._label = None
        self._local = None
        self._password = None
        self._system = None
        self._uri = None
        self._username = None
        self.discriminator = None

        if active is not None:
            self.active = active
        if auth_type is not None:
            self.auth_type = auth_type
        if default_repository is not None:
            self.default_repository = default_repository
        if error_msg is not None:
            self.error_msg = error_msg
        if label is not None:
            self.label = label
        if local is not None:
            self.local = local
        if password is not None:
            self.password = password
        if system is not None:
            self.system = system
        if uri is not None:
            self.uri = uri
        if username is not None:
            self.username = username

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

        True if the location is the currently active one  # noqa: E501

        :return: The active of this Location.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this Location.

        True if the location is the currently active one  # noqa: E501

        :param active: The active of this Location.  # noqa: E501
        :type: bool
        """

        self._active = active

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

        Authentication type  # noqa: E501

        :return: The auth_type of this Location.  # noqa: E501
        :rtype: str
        """
        return self._auth_type

    @auth_type.setter
    def auth_type(self, auth_type):
        """Sets the auth_type of this Location.

        Authentication type  # noqa: E501

        :param auth_type: The auth_type of this Location.  # noqa: E501
        :type: str
        """
        allowed_values = ["none", "basic", "signature"]  # noqa: E501
        if (self._configuration.client_side_validation and
                auth_type not in allowed_values):
            raise ValueError(
                "Invalid value for `auth_type` ({0}), must be one of {1}"  # noqa: E501
                .format(auth_type, allowed_values)
            )

        self._auth_type = auth_type

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

        Default repository for the location.  # noqa: E501

        :return: The default_repository of this Location.  # noqa: E501
        :rtype: str
        """
        return self._default_repository

    @default_repository.setter
    def default_repository(self, default_repository):
        """Sets the default_repository of this Location.

        Default repository for the location.  # noqa: E501

        :param default_repository: The default_repository of this Location.  # noqa: E501
        :type: str
        """

        self._default_repository = default_repository

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

        Error message, if there was an error connecting to this location  # noqa: E501

        :return: The error_msg of this Location.  # noqa: E501
        :rtype: str
        """
        return self._error_msg

    @error_msg.setter
    def error_msg(self, error_msg):
        """Sets the error_msg of this Location.

        Error message, if there was an error connecting to this location  # noqa: E501

        :param error_msg: The error_msg of this Location.  # noqa: E501
        :type: str
        """

        self._error_msg = error_msg

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

        Human readable label  # noqa: E501

        :return: The label of this Location.  # noqa: E501
        :rtype: str
        """
        return self._label

    @label.setter
    def label(self, label):
        """Sets the label of this Location.

        Human readable label  # noqa: E501

        :param label: The label of this Location.  # noqa: E501
        :type: str
        """

        self._label = label

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

        True if the location is local (on the same machine as the workbench)  # noqa: E501

        :return: The local of this Location.  # noqa: E501
        :rtype: bool
        """
        return self._local

    @local.setter
    def local(self, local):
        """Sets the local of this Location.

        True if the location is local (on the same machine as the workbench)  # noqa: E501

        :param local: The local of this Location.  # noqa: E501
        :type: bool
        """

        self._local = local

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

        Password for the new location if any. This parameter only makes sense for remote locations  # noqa: E501

        :return: The password of this Location.  # noqa: E501
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this Location.

        Password for the new location if any. This parameter only makes sense for remote locations  # noqa: E501

        :param password: The password of this Location.  # noqa: E501
        :type: str
        """

        self._password = password

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

        True if the location is the system location  # noqa: E501

        :return: The system of this Location.  # noqa: E501
        :rtype: bool
        """
        return self._system

    @system.setter
    def system(self, system):
        """Sets the system of this Location.

        True if the location is the system location  # noqa: E501

        :param system: The system of this Location.  # noqa: E501
        :type: bool
        """

        self._system = system

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

        The GraphDB location URL  # noqa: E501

        :return: The uri of this Location.  # noqa: E501
        :rtype: str
        """
        return self._uri

    @uri.setter
    def uri(self, uri):
        """Sets the uri of this Location.

        The GraphDB location URL  # noqa: E501

        :param uri: The uri of this Location.  # noqa: E501
        :type: str
        """

        self._uri = uri

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

        Username for the new location if any. This parameter only makes sense for remote locations  # noqa: E501

        :return: The username of this Location.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this Location.

        Username for the new location if any. This parameter only makes sense for remote locations  # noqa: E501

        :param username: The username of this Location.  # noqa: E501
        :type: str
        """

        self._username = username

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

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