# coding: utf-8

"""
    CodeChef API

    CodeChef API to support different applications.  # 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 codechef_client.models.all_ranking import AllRanking  # noqa: F401,E501
from codechef_client.models.city import City  # noqa: F401,E501
from codechef_client.models.country import Country  # noqa: F401,E501
from codechef_client.models.rating import Rating  # noqa: F401,E501
from codechef_client.models.state import State  # noqa: F401,E501
from codechef_client.models.user_problem_stats import UserProblemStats  # noqa: F401,E501
from codechef_client.models.user_submission_stats import UserSubmissionStats  # noqa: F401,E501


class User(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 = {
        'username': 'str',
        'fullname': 'str',
        'country': 'Country',
        'city': 'City',
        'state': 'State',
        'occupation': 'str',
        'organization': 'str',
        'problem_stats': 'UserProblemStats',
        'submission_stats': 'UserSubmissionStats',
        'ratings': 'Rating',
        'rankings': 'AllRanking'
    }

    attribute_map = {
        'username': 'username',
        'fullname': 'fullname',
        'country': 'country',
        'city': 'city',
        'state': 'state',
        'occupation': 'occupation',
        'organization': 'organization',
        'problem_stats': 'problemStats',
        'submission_stats': 'submissionStats',
        'ratings': 'ratings',
        'rankings': 'rankings'
    }

    def __init__(self, username=None, fullname=None, country=None, city=None, state=None, occupation=None, organization=None, problem_stats=None, submission_stats=None, ratings=None, rankings=None):  # noqa: E501
        """User - a model defined in Swagger"""  # noqa: E501

        self._username = None
        self._fullname = None
        self._country = None
        self._city = None
        self._state = None
        self._occupation = None
        self._organization = None
        self._problem_stats = None
        self._submission_stats = None
        self._ratings = None
        self._rankings = None
        self.discriminator = None

        if username is not None:
            self.username = username
        if fullname is not None:
            self.fullname = fullname
        if country is not None:
            self.country = country
        if city is not None:
            self.city = city
        if state is not None:
            self.state = state
        if occupation is not None:
            self.occupation = occupation
        if organization is not None:
            self.organization = organization
        if problem_stats is not None:
            self.problem_stats = problem_stats
        if submission_stats is not None:
            self.submission_stats = submission_stats
        if ratings is not None:
            self.ratings = ratings
        if rankings is not None:
            self.rankings = rankings

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

        Unique username of the user.  # noqa: E501

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

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

        Unique username of the user.  # noqa: E501

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

        self._username = username

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

        Fullname of the user.  # noqa: E501

        :return: The fullname of this User.  # noqa: E501
        :rtype: str
        """
        return self._fullname

    @fullname.setter
    def fullname(self, fullname):
        """Sets the fullname of this User.

        Fullname of the user.  # noqa: E501

        :param fullname: The fullname of this User.  # noqa: E501
        :type: str
        """

        self._fullname = fullname

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


        :return: The country of this User.  # noqa: E501
        :rtype: Country
        """
        return self._country

    @country.setter
    def country(self, country):
        """Sets the country of this User.


        :param country: The country of this User.  # noqa: E501
        :type: Country
        """

        self._country = country

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


        :return: The city of this User.  # noqa: E501
        :rtype: City
        """
        return self._city

    @city.setter
    def city(self, city):
        """Sets the city of this User.


        :param city: The city of this User.  # noqa: E501
        :type: City
        """

        self._city = city

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


        :return: The state of this User.  # noqa: E501
        :rtype: State
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this User.


        :param state: The state of this User.  # noqa: E501
        :type: State
        """

        self._state = state

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

        The User is a student or a professional.  # noqa: E501

        :return: The occupation of this User.  # noqa: E501
        :rtype: str
        """
        return self._occupation

    @occupation.setter
    def occupation(self, occupation):
        """Sets the occupation of this User.

        The User is a student or a professional.  # noqa: E501

        :param occupation: The occupation of this User.  # noqa: E501
        :type: str
        """

        self._occupation = occupation

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

        Institute or organization of the user.  # noqa: E501

        :return: The organization of this User.  # noqa: E501
        :rtype: str
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """Sets the organization of this User.

        Institute or organization of the user.  # noqa: E501

        :param organization: The organization of this User.  # noqa: E501
        :type: str
        """

        self._organization = organization

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


        :return: The problem_stats of this User.  # noqa: E501
        :rtype: UserProblemStats
        """
        return self._problem_stats

    @problem_stats.setter
    def problem_stats(self, problem_stats):
        """Sets the problem_stats of this User.


        :param problem_stats: The problem_stats of this User.  # noqa: E501
        :type: UserProblemStats
        """

        self._problem_stats = problem_stats

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


        :return: The submission_stats of this User.  # noqa: E501
        :rtype: UserSubmissionStats
        """
        return self._submission_stats

    @submission_stats.setter
    def submission_stats(self, submission_stats):
        """Sets the submission_stats of this User.


        :param submission_stats: The submission_stats of this User.  # noqa: E501
        :type: UserSubmissionStats
        """

        self._submission_stats = submission_stats

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


        :return: The ratings of this User.  # noqa: E501
        :rtype: Rating
        """
        return self._ratings

    @ratings.setter
    def ratings(self, ratings):
        """Sets the ratings of this User.


        :param ratings: The ratings of this User.  # noqa: E501
        :type: Rating
        """

        self._ratings = ratings

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


        :return: The rankings of this User.  # noqa: E501
        :rtype: AllRanking
        """
        return self._rankings

    @rankings.setter
    def rankings(self, rankings):
        """Sets the rankings of this User.


        :param rankings: The rankings of this User.  # noqa: E501
        :type: AllRanking
        """

        self._rankings = rankings

    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

        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, User):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
