# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    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 = {
        'name': 'str',
        'username': 'str',
        'email': 'str',
        'password': 'str',
        'invite_code': 'str',
        'organization_name': 'str',
        'invitation_id': 'str',
        'lastname': 'str',
        'magic_token': 'str',
        'title': 'str',
        'company': 'str',
        'organization_marketing_questions': 'OrganizationMarketingQuestions',
        'is_oa': 'bool',
        'captcha_token': 'str'
    }

    attribute_map = {
        'name': 'name',
        'username': 'username',
        'email': 'email',
        'password': 'password',
        'invite_code': 'invite_code',
        'organization_name': 'organization_name',
        'invitation_id': 'invitation_id',
        'lastname': 'lastname',
        'magic_token': 'magic_token',
        'title': 'title',
        'company': 'company',
        'organization_marketing_questions': 'organization_marketing_questions',
        'is_oa': 'is_oa',
        'captcha_token': 'captcha_token'
    }

    def __init__(self, name=None, username=None, email=None, password=None, invite_code=None, organization_name=None, invitation_id=None, lastname=None, magic_token=None, title=None, company=None, organization_marketing_questions=None, is_oa=False, captcha_token=None, local_vars_configuration=None):  # noqa: E501
        """CreateUser - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._username = None
        self._email = None
        self._password = None
        self._invite_code = None
        self._organization_name = None
        self._invitation_id = None
        self._lastname = None
        self._magic_token = None
        self._title = None
        self._company = None
        self._organization_marketing_questions = None
        self._is_oa = None
        self._captcha_token = None
        self.discriminator = None

        self.name = name
        self.username = username
        self.email = email
        if password is not None:
            self.password = password
        if invite_code is not None:
            self.invite_code = invite_code
        if organization_name is not None:
            self.organization_name = organization_name
        if invitation_id is not None:
            self.invitation_id = invitation_id
        if lastname is not None:
            self.lastname = lastname
        if magic_token is not None:
            self.magic_token = magic_token
        if title is not None:
            self.title = title
        if company is not None:
            self.company = company
        if organization_marketing_questions is not None:
            self.organization_marketing_questions = organization_marketing_questions
        if is_oa is not None:
            self.is_oa = is_oa
        if captcha_token is not None:
            self.captcha_token = captcha_token

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


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

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


        :param name: The name of this CreateUser.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


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

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


        :param username: The username of this CreateUser.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and username is None:  # noqa: E501
            raise ValueError("Invalid value for `username`, must not be `None`")  # noqa: E501

        self._username = username

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


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

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


        :param email: The email of this CreateUser.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and email is None:  # noqa: E501
            raise ValueError("Invalid value for `email`, must not be `None`")  # noqa: E501

        self._email = email

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

        Password to use for logging in as the user. At least one authentication method should be used. Either password or magic link.  # noqa: E501

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

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

        Password to use for logging in as the user. At least one authentication method should be used. Either password or magic link.  # noqa: E501

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

        self._password = password

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


        :return: The invite_code of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._invite_code

    @invite_code.setter
    def invite_code(self, invite_code):
        """Sets the invite_code of this CreateUser.


        :param invite_code: The invite_code of this CreateUser.  # noqa: E501
        :type: str
        """

        self._invite_code = invite_code

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


        :return: The organization_name of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._organization_name

    @organization_name.setter
    def organization_name(self, organization_name):
        """Sets the organization_name of this CreateUser.


        :param organization_name: The organization_name of this CreateUser.  # noqa: E501
        :type: str
        """

        self._organization_name = organization_name

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


        :return: The invitation_id of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._invitation_id

    @invitation_id.setter
    def invitation_id(self, invitation_id):
        """Sets the invitation_id of this CreateUser.


        :param invitation_id: The invitation_id of this CreateUser.  # noqa: E501
        :type: str
        """

        self._invitation_id = invitation_id

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


        :return: The lastname of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._lastname

    @lastname.setter
    def lastname(self, lastname):
        """Sets the lastname of this CreateUser.


        :param lastname: The lastname of this CreateUser.  # noqa: E501
        :type: str
        """

        self._lastname = lastname

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

        Magic link token to authenticate ownership of an email address. At least one authentication method should be used. Either password or magic link.  # noqa: E501

        :return: The magic_token of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._magic_token

    @magic_token.setter
    def magic_token(self, magic_token):
        """Sets the magic_token of this CreateUser.

        Magic link token to authenticate ownership of an email address. At least one authentication method should be used. Either password or magic link.  # noqa: E501

        :param magic_token: The magic_token of this CreateUser.  # noqa: E501
        :type: str
        """

        self._magic_token = magic_token

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


        :return: The title of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this CreateUser.


        :param title: The title of this CreateUser.  # noqa: E501
        :type: str
        """

        self._title = title

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


        :return: The company of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._company

    @company.setter
    def company(self, company):
        """Sets the company of this CreateUser.


        :param company: The company of this CreateUser.  # noqa: E501
        :type: str
        """

        self._company = company

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


        :return: The organization_marketing_questions of this CreateUser.  # noqa: E501
        :rtype: OrganizationMarketingQuestions
        """
        return self._organization_marketing_questions

    @organization_marketing_questions.setter
    def organization_marketing_questions(self, organization_marketing_questions):
        """Sets the organization_marketing_questions of this CreateUser.


        :param organization_marketing_questions: The organization_marketing_questions of this CreateUser.  # noqa: E501
        :type: OrganizationMarketingQuestions
        """

        self._organization_marketing_questions = organization_marketing_questions

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


        :return: The is_oa of this CreateUser.  # noqa: E501
        :rtype: bool
        """
        return self._is_oa

    @is_oa.setter
    def is_oa(self, is_oa):
        """Sets the is_oa of this CreateUser.


        :param is_oa: The is_oa of this CreateUser.  # noqa: E501
        :type: bool
        """

        self._is_oa = is_oa

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


        :return: The captcha_token of this CreateUser.  # noqa: E501
        :rtype: str
        """
        return self._captcha_token

    @captcha_token.setter
    def captcha_token(self, captcha_token):
        """Sets the captcha_token of this CreateUser.


        :param captcha_token: The captcha_token of this CreateUser.  # noqa: E501
        :type: str
        """

        self._captcha_token = captcha_token

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

        for attr, _ in six.iteritems(self.openapi_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, CreateUser):
            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, CreateUser):
            return True

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