# coding: utf-8
try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from aoc.configuration import Configuration


class UserOrderByInput(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    allowed enum values
    """
    AUTH_CONFIG_ID_ASC = "auth_config_id_ASC"
    AUTH_CONFIG_ID_DESC = "auth_config_id_DESC"
    DISPLAY_USERNAME_ASC = "display_username_ASC"
    DISPLAY_USERNAME_DESC = "display_username_DESC"
    EMAIL_ADDRESS_ASC = "email_address_ASC"
    EMAIL_ADDRESS_DESC = "email_address_DESC"
    ID_ASC = "id_ASC"
    ID_DESC = "id_DESC"
    INTERNAL_ASC = "internal_ASC"
    INTERNAL_DESC = "internal_DESC"
    LDAP_DN_ASC = "ldap_dn_ASC"
    LDAP_DN_DESC = "ldap_dn_DESC"
    MOBILE_PHONE_ASC = "mobile_phone_ASC"
    MOBILE_PHONE_DESC = "mobile_phone_DESC"
    NAME_ASC = "name_ASC"
    NAME_DESC = "name_DESC"
    PASSWORD_EXPIRED_ASC = "password_expired_ASC"
    PASSWORD_EXPIRED_DESC = "password_expired_DESC"
    PASSWORD_RECOVER_QA_ASC = "password_recover_qa_ASC"
    PASSWORD_RECOVER_QA_DESC = "password_recover_qa_DESC"
    PASSWORD_UPDATED_AT_ASC = "password_updated_at_ASC"
    PASSWORD_UPDATED_AT_DESC = "password_updated_at_DESC"
    ROLE_ASC = "role_ASC"
    ROLE_DESC = "role_DESC"
    SOURCE_ASC = "source_ASC"
    SOURCE_DESC = "source_DESC"
    USERNAME_ASC = "username_ASC"
    USERNAME_DESC = "username_DESC"

    allowable_values = [AUTH_CONFIG_ID_ASC, AUTH_CONFIG_ID_DESC, DISPLAY_USERNAME_ASC, DISPLAY_USERNAME_DESC, EMAIL_ADDRESS_ASC, EMAIL_ADDRESS_DESC, ID_ASC, ID_DESC, INTERNAL_ASC, INTERNAL_DESC, LDAP_DN_ASC, LDAP_DN_DESC, MOBILE_PHONE_ASC, MOBILE_PHONE_DESC, NAME_ASC, NAME_DESC, PASSWORD_EXPIRED_ASC, PASSWORD_EXPIRED_DESC, PASSWORD_RECOVER_QA_ASC, PASSWORD_RECOVER_QA_DESC, PASSWORD_UPDATED_AT_ASC, PASSWORD_UPDATED_AT_DESC, ROLE_ASC, ROLE_DESC, SOURCE_ASC, SOURCE_DESC, USERNAME_ASC, USERNAME_DESC]  # noqa: E501

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
    }

    attribute_map = {
    }

    def __init__(self, **kwargs):  # noqa: E501
        """UserOrderByInput - a model defined in OpenAPI"""  # noqa: E501
        self.local_vars_configuration = kwargs.get("local_vars_configuration", Configuration.get_default_copy())
        self.discriminator = None

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, UserOrderByInput):
            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, UserOrderByInput):
            return True

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