# 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 UserMigrationResult(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 = {
        'user_id': 'str',
        'user_email': 'str',
        'identity_id': 'str',
        'cloud_permissions_to_remove': 'list[CloudPermissionRemoval]',
        'project_permissions_to_remove': 'list[ProjectPermissionRemoval]',
        'readonly_overrides_to_remove': 'list[str]',
        'org_permission_changes': 'list[OrgPermissionChange]',
        'cloud_permissions_deleted': 'int',
        'project_permissions_deleted': 'int',
        'readonly_permissions_deleted': 'int',
        'org_owner_demoted': 'bool'
    }

    attribute_map = {
        'user_id': 'user_id',
        'user_email': 'user_email',
        'identity_id': 'identity_id',
        'cloud_permissions_to_remove': 'cloud_permissions_to_remove',
        'project_permissions_to_remove': 'project_permissions_to_remove',
        'readonly_overrides_to_remove': 'readonly_overrides_to_remove',
        'org_permission_changes': 'org_permission_changes',
        'cloud_permissions_deleted': 'cloud_permissions_deleted',
        'project_permissions_deleted': 'project_permissions_deleted',
        'readonly_permissions_deleted': 'readonly_permissions_deleted',
        'org_owner_demoted': 'org_owner_demoted'
    }

    def __init__(self, user_id=None, user_email=None, identity_id=None, cloud_permissions_to_remove=None, project_permissions_to_remove=None, readonly_overrides_to_remove=None, org_permission_changes=None, cloud_permissions_deleted=0, project_permissions_deleted=0, readonly_permissions_deleted=0, org_owner_demoted=None, local_vars_configuration=None):  # noqa: E501
        """UserMigrationResult - 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._user_id = None
        self._user_email = None
        self._identity_id = None
        self._cloud_permissions_to_remove = None
        self._project_permissions_to_remove = None
        self._readonly_overrides_to_remove = None
        self._org_permission_changes = None
        self._cloud_permissions_deleted = None
        self._project_permissions_deleted = None
        self._readonly_permissions_deleted = None
        self._org_owner_demoted = None
        self.discriminator = None

        self.user_id = user_id
        self.user_email = user_email
        self.identity_id = identity_id
        if cloud_permissions_to_remove is not None:
            self.cloud_permissions_to_remove = cloud_permissions_to_remove
        if project_permissions_to_remove is not None:
            self.project_permissions_to_remove = project_permissions_to_remove
        if readonly_overrides_to_remove is not None:
            self.readonly_overrides_to_remove = readonly_overrides_to_remove
        if org_permission_changes is not None:
            self.org_permission_changes = org_permission_changes
        if cloud_permissions_deleted is not None:
            self.cloud_permissions_deleted = cloud_permissions_deleted
        if project_permissions_deleted is not None:
            self.project_permissions_deleted = project_permissions_deleted
        if readonly_permissions_deleted is not None:
            self.readonly_permissions_deleted = readonly_permissions_deleted
        self.org_owner_demoted = org_owner_demoted

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


        :return: The user_id of this UserMigrationResult.  # noqa: E501
        :rtype: str
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this UserMigrationResult.


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

        self._user_id = user_id

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


        :return: The user_email of this UserMigrationResult.  # noqa: E501
        :rtype: str
        """
        return self._user_email

    @user_email.setter
    def user_email(self, user_email):
        """Sets the user_email of this UserMigrationResult.


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

        self._user_email = user_email

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


        :return: The identity_id of this UserMigrationResult.  # noqa: E501
        :rtype: str
        """
        return self._identity_id

    @identity_id.setter
    def identity_id(self, identity_id):
        """Sets the identity_id of this UserMigrationResult.


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

        self._identity_id = identity_id

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


        :return: The cloud_permissions_to_remove of this UserMigrationResult.  # noqa: E501
        :rtype: list[CloudPermissionRemoval]
        """
        return self._cloud_permissions_to_remove

    @cloud_permissions_to_remove.setter
    def cloud_permissions_to_remove(self, cloud_permissions_to_remove):
        """Sets the cloud_permissions_to_remove of this UserMigrationResult.


        :param cloud_permissions_to_remove: The cloud_permissions_to_remove of this UserMigrationResult.  # noqa: E501
        :type: list[CloudPermissionRemoval]
        """

        self._cloud_permissions_to_remove = cloud_permissions_to_remove

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


        :return: The project_permissions_to_remove of this UserMigrationResult.  # noqa: E501
        :rtype: list[ProjectPermissionRemoval]
        """
        return self._project_permissions_to_remove

    @project_permissions_to_remove.setter
    def project_permissions_to_remove(self, project_permissions_to_remove):
        """Sets the project_permissions_to_remove of this UserMigrationResult.


        :param project_permissions_to_remove: The project_permissions_to_remove of this UserMigrationResult.  # noqa: E501
        :type: list[ProjectPermissionRemoval]
        """

        self._project_permissions_to_remove = project_permissions_to_remove

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


        :return: The readonly_overrides_to_remove of this UserMigrationResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._readonly_overrides_to_remove

    @readonly_overrides_to_remove.setter
    def readonly_overrides_to_remove(self, readonly_overrides_to_remove):
        """Sets the readonly_overrides_to_remove of this UserMigrationResult.


        :param readonly_overrides_to_remove: The readonly_overrides_to_remove of this UserMigrationResult.  # noqa: E501
        :type: list[str]
        """

        self._readonly_overrides_to_remove = readonly_overrides_to_remove

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


        :return: The org_permission_changes of this UserMigrationResult.  # noqa: E501
        :rtype: list[OrgPermissionChange]
        """
        return self._org_permission_changes

    @org_permission_changes.setter
    def org_permission_changes(self, org_permission_changes):
        """Sets the org_permission_changes of this UserMigrationResult.


        :param org_permission_changes: The org_permission_changes of this UserMigrationResult.  # noqa: E501
        :type: list[OrgPermissionChange]
        """

        self._org_permission_changes = org_permission_changes

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


        :return: The cloud_permissions_deleted of this UserMigrationResult.  # noqa: E501
        :rtype: int
        """
        return self._cloud_permissions_deleted

    @cloud_permissions_deleted.setter
    def cloud_permissions_deleted(self, cloud_permissions_deleted):
        """Sets the cloud_permissions_deleted of this UserMigrationResult.


        :param cloud_permissions_deleted: The cloud_permissions_deleted of this UserMigrationResult.  # noqa: E501
        :type: int
        """

        self._cloud_permissions_deleted = cloud_permissions_deleted

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


        :return: The project_permissions_deleted of this UserMigrationResult.  # noqa: E501
        :rtype: int
        """
        return self._project_permissions_deleted

    @project_permissions_deleted.setter
    def project_permissions_deleted(self, project_permissions_deleted):
        """Sets the project_permissions_deleted of this UserMigrationResult.


        :param project_permissions_deleted: The project_permissions_deleted of this UserMigrationResult.  # noqa: E501
        :type: int
        """

        self._project_permissions_deleted = project_permissions_deleted

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


        :return: The readonly_permissions_deleted of this UserMigrationResult.  # noqa: E501
        :rtype: int
        """
        return self._readonly_permissions_deleted

    @readonly_permissions_deleted.setter
    def readonly_permissions_deleted(self, readonly_permissions_deleted):
        """Sets the readonly_permissions_deleted of this UserMigrationResult.


        :param readonly_permissions_deleted: The readonly_permissions_deleted of this UserMigrationResult.  # noqa: E501
        :type: int
        """

        self._readonly_permissions_deleted = readonly_permissions_deleted

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


        :return: The org_owner_demoted of this UserMigrationResult.  # noqa: E501
        :rtype: bool
        """
        return self._org_owner_demoted

    @org_owner_demoted.setter
    def org_owner_demoted(self, org_owner_demoted):
        """Sets the org_owner_demoted of this UserMigrationResult.


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

        self._org_owner_demoted = org_owner_demoted

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

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