# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class UserResult(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 = {
        'name': 'str',
        'username': 'str',
        'email': 'str',
        'address': 'Address',
        'distance': 'float',
        'custom_values': 'dict(str, str)',
        'phone': 'str',
        'account_number': 'str',
        'group': 'EntityReference',
        'group_set': 'EntityReference'
    }

    attribute_map = {
        'name': 'name',
        'username': 'username',
        'email': 'email',
        'address': 'address',
        'distance': 'distance',
        'custom_values': 'customValues',
        'phone': 'phone',
        'account_number': 'accountNumber',
        'group': 'group',
        'group_set': 'groupSet'
    }

    def __init__(self, name=None, username=None, email=None, address=None, distance=None, custom_values=None, phone=None, account_number=None, group=None, group_set=None, _configuration=None):  # noqa: E501
        """UserResult - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._username = None
        self._email = None
        self._address = None
        self._distance = None
        self._custom_values = None
        self._phone = None
        self._account_number = None
        self._group = None
        self._group_set = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if username is not None:
            self.username = username
        if email is not None:
            self.email = email
        if address is not None:
            self.address = address
        if distance is not None:
            self.distance = distance
        if custom_values is not None:
            self.custom_values = custom_values
        if phone is not None:
            self.phone = phone
        if account_number is not None:
            self.account_number = account_number
        if group is not None:
            self.group = group
        if group_set is not None:
            self.group_set = group_set

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

        The user's full name  # noqa: E501

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

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

        The user's full name  # noqa: E501

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

        self._name = name

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

        The user's login name  # noqa: E501

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

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

        The user's login name  # noqa: E501

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

        self._username = username

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

        The user's e-mail  # noqa: E501

        :return: The email of this UserResult.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this UserResult.

        The user's e-mail  # noqa: E501

        :param email: The email of this UserResult.  # noqa: E501
        :type: str
        """

        self._email = email

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

        Address to be placed on map. Is only returned when the search result type is `map`.   # noqa: E501

        :return: The address of this UserResult.  # noqa: E501
        :rtype: Address
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this UserResult.

        Address to be placed on map. Is only returned when the search result type is `map`.   # noqa: E501

        :param address: The address of this UserResult.  # noqa: E501
        :type: Address
        """

        self._address = address

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

        Only returned when there is a base location to calculate the distance from. The unit (kilometers or miles) depends on configuration.   # noqa: E501

        :return: The distance of this UserResult.  # noqa: E501
        :rtype: float
        """
        return self._distance

    @distance.setter
    def distance(self, distance):
        """Sets the distance of this UserResult.

        Only returned when there is a base location to calculate the distance from. The unit (kilometers or miles) depends on configuration.   # noqa: E501

        :param distance: The distance of this UserResult.  # noqa: E501
        :type: float
        """

        self._distance = distance

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

        Holds the values for custom fields, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`   # noqa: E501

        :return: The custom_values of this UserResult.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._custom_values

    @custom_values.setter
    def custom_values(self, custom_values):
        """Sets the custom_values of this UserResult.

        Holds the values for custom fields, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`   # noqa: E501

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

        self._custom_values = custom_values

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

        First phone number, used when phone is marked on products to be returned on user list   # noqa: E501

        :return: The phone of this UserResult.  # noqa: E501
        :rtype: str
        """
        return self._phone

    @phone.setter
    def phone(self, phone):
        """Sets the phone of this UserResult.

        First phone number, used when phone is marked on products to be returned on user list   # noqa: E501

        :param phone: The phone of this UserResult.  # noqa: E501
        :type: str
        """

        self._phone = phone

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

        First account number, used when account number is marked on products to be returned on user list   # noqa: E501

        :return: The account_number of this UserResult.  # noqa: E501
        :rtype: str
        """
        return self._account_number

    @account_number.setter
    def account_number(self, account_number):
        """Sets the account_number of this UserResult.

        First account number, used when account number is marked on products to be returned on user list   # noqa: E501

        :param account_number: The account_number of this UserResult.  # noqa: E501
        :type: str
        """

        self._account_number = account_number

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

        The user group. Only returned when the `includeGroup` parameter is set to `true` and the current user can see other users' groups.   # noqa: E501

        :return: The group of this UserResult.  # noqa: E501
        :rtype: EntityReference
        """
        return self._group

    @group.setter
    def group(self, group):
        """Sets the group of this UserResult.

        The user group. Only returned when the `includeGroup` parameter is set to `true` and the current user can see other users' groups.   # noqa: E501

        :param group: The group of this UserResult.  # noqa: E501
        :type: EntityReference
        """

        self._group = group

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

        The user group. Only returned when the `includeGroupSet` parameter is set to `true` and the current user can see other users' group set.   # noqa: E501

        :return: The group_set of this UserResult.  # noqa: E501
        :rtype: EntityReference
        """
        return self._group_set

    @group_set.setter
    def group_set(self, group_set):
        """Sets the group_set of this UserResult.

        The user group. Only returned when the `includeGroupSet` parameter is set to `true` and the current user can see other users' group set.   # noqa: E501

        :param group_set: The group_set of this UserResult.  # noqa: E501
        :type: EntityReference
        """

        self._group_set = group_set

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

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