# coding: utf-8

"""
    Agilicus API

    Agilicus is API-first. Modern software is controlled by other software, is open, is available for you to use the way you want, securely, simply.  A rendered, online viewable and usable version of this specification is available at [api](https://www.agilicus.com/api). You may try the API inline directly in the web page. To do so, first obtain an Authentication Token (the simplest way is to install the Python SDK, and then run `agilicus-cli --issuer https://MYISSUER get-token`). You will need an org-id for most calls (and can obtain from `agilicus-cli --issuer https://MYISSUER list-orgs`). The `MYISSUER` will typically be `auth.MYDOMAIN`, and you will see it as you sign-in to the administrative UI.  This API releases on Bearer-Token authentication. To obtain a valid bearer token you will need to Authenticate to an Issuer with OpenID Connect (a superset of OAUTH2).  Your \"issuer\" will look like https://auth.MYDOMAIN. For example, when you signed-up, if you said \"use my own domain name\" and assigned a CNAME of cloud.example.com, then your issuer would be https://auth.cloud.example.com.  If you selected \"use an Agilicus supplied domain name\", your issuer would look like https://auth.myorg.agilicus.cloud.  For test purposes you can use our [Python SDK](https://pypi.org/project/agilicus/) and run `agilicus-cli --issuer https://auth.MYDOMAIN get-token`.  This API may be used in any language runtime that supports OpenAPI 3.0, or, you may use our [Python SDK](https://pypi.org/project/agilicus/), our [Typescript SDK](https://www.npmjs.com/package/@agilicus/angular), or our [Golang SDK](https://git.agilicus.com/pub/sdk-go).  100% of the activities in our system our API-driven, from our web-admin, through our progressive web applications, to all internals: there is nothing that is not accessible.  For more information, see [developer resources](https://www.agilicus.com/developer).   # noqa: E501

    The version of the OpenAPI document: 2021.05.06
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class UserFileShareAccessInfoStatus(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',
        'org_id': 'str',
        'org_name': 'str',
        'parent_org_id': 'str',
        'parent_org_name': 'str',
        'share_id': 'str',
        'share_name': 'str',
        'share_url': 'str',
        'access_level': 'str',
        'roles': 'list[str]'
    }

    attribute_map = {
        'user_id': 'user_id',
        'org_id': 'org_id',
        'org_name': 'org_name',
        'parent_org_id': 'parent_org_id',
        'parent_org_name': 'parent_org_name',
        'share_id': 'share_id',
        'share_name': 'share_name',
        'share_url': 'share_url',
        'access_level': 'access_level',
        'roles': 'roles'
    }

    def __init__(self, user_id=None, org_id=None, org_name=None, parent_org_id=None, parent_org_name=None, share_id=None, share_name=None, share_url=None, access_level=None, roles=None, local_vars_configuration=None):  # noqa: E501
        """UserFileShareAccessInfoStatus - 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._org_id = None
        self._org_name = None
        self._parent_org_id = None
        self._parent_org_name = None
        self._share_id = None
        self._share_name = None
        self._share_url = None
        self._access_level = None
        self._roles = None
        self.discriminator = None

        self.user_id = user_id
        self.org_id = org_id
        self.org_name = org_name
        if parent_org_id is not None:
            self.parent_org_id = parent_org_id
        if parent_org_name is not None:
            self.parent_org_name = parent_org_name
        self.share_id = share_id
        self.share_name = share_name
        self.share_url = share_url
        self.access_level = access_level
        if roles is not None:
            self.roles = roles

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

        The unique id of the User to which this record applies.   # noqa: E501

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

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

        The unique id of the User to which this record applies.   # noqa: E501

        :param user_id: The user_id of this UserFileShareAccessInfoStatus.  # 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
        if (self.local_vars_configuration.client_side_validation and
                user_id is not None and len(user_id) > 40):
            raise ValueError("Invalid value for `user_id`, length must be less than or equal to `40`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                user_id is not None and len(user_id) < 1):
            raise ValueError("Invalid value for `user_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._user_id = user_id

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

        The unique id of the Organisation to which this record applies.   # noqa: E501

        :return: The org_id of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._org_id

    @org_id.setter
    def org_id(self, org_id):
        """Sets the org_id of this UserFileShareAccessInfoStatus.

        The unique id of the Organisation to which this record applies.   # noqa: E501

        :param org_id: The org_id of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and org_id is None:  # noqa: E501
            raise ValueError("Invalid value for `org_id`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                org_id is not None and len(org_id) > 40):
            raise ValueError("Invalid value for `org_id`, length must be less than or equal to `40`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                org_id is not None and len(org_id) < 1):
            raise ValueError("Invalid value for `org_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._org_id = org_id

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

        The name of Organisation to which this record applies.   # noqa: E501

        :return: The org_name of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._org_name

    @org_name.setter
    def org_name(self, org_name):
        """Sets the org_name of this UserFileShareAccessInfoStatus.

        The name of Organisation to which this record applies.   # noqa: E501

        :param org_name: The org_name of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and org_name is None:  # noqa: E501
            raise ValueError("Invalid value for `org_name`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                org_name is not None and len(org_name) > 100):
            raise ValueError("Invalid value for `org_name`, length must be less than or equal to `100`")  # noqa: E501

        self._org_name = org_name

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

        The unique id of the parent of the Organisation to which this record applies. Omitted if the Organisation has no parent.   # noqa: E501

        :return: The parent_org_id of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._parent_org_id

    @parent_org_id.setter
    def parent_org_id(self, parent_org_id):
        """Sets the parent_org_id of this UserFileShareAccessInfoStatus.

        The unique id of the parent of the Organisation to which this record applies. Omitted if the Organisation has no parent.   # noqa: E501

        :param parent_org_id: The parent_org_id of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                parent_org_id is not None and len(parent_org_id) > 40):
            raise ValueError("Invalid value for `parent_org_id`, length must be less than or equal to `40`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                parent_org_id is not None and len(parent_org_id) < 1):
            raise ValueError("Invalid value for `parent_org_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._parent_org_id = parent_org_id

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

        The name of the parent of the Organisation to which this record applies. Omitted if the Organisation has no parent.   # noqa: E501

        :return: The parent_org_name of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._parent_org_name

    @parent_org_name.setter
    def parent_org_name(self, parent_org_name):
        """Sets the parent_org_name of this UserFileShareAccessInfoStatus.

        The name of the parent of the Organisation to which this record applies. Omitted if the Organisation has no parent.   # noqa: E501

        :param parent_org_name: The parent_org_name of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                parent_org_name is not None and len(parent_org_name) > 100):
            raise ValueError("Invalid value for `parent_org_name`, length must be less than or equal to `100`")  # noqa: E501

        self._parent_org_name = parent_org_name

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

        Unique identifier  # noqa: E501

        :return: The share_id of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._share_id

    @share_id.setter
    def share_id(self, share_id):
        """Sets the share_id of this UserFileShareAccessInfoStatus.

        Unique identifier  # noqa: E501

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

        self._share_id = share_id

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

        The file share name.   # noqa: E501

        :return: The share_name of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._share_name

    @share_name.setter
    def share_name(self, share_name):
        """Sets the share_name of this UserFileShareAccessInfoStatus.

        The file share name.   # noqa: E501

        :param share_name: The share_name of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and share_name is None:  # noqa: E501
            raise ValueError("Invalid value for `share_name`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                share_name is not None and len(share_name) > 128):
            raise ValueError("Invalid value for `share_name`, length must be less than or equal to `128`")  # noqa: E501

        self._share_name = share_name

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

        The url of the share   # noqa: E501

        :return: The share_url of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._share_url

    @share_url.setter
    def share_url(self, share_url):
        """Sets the share_url of this UserFileShareAccessInfoStatus.

        The url of the share   # noqa: E501

        :param share_url: The share_url of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and share_url is None:  # noqa: E501
            raise ValueError("Invalid value for `share_url`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                share_url is not None and len(share_url) > 1024):
            raise ValueError("Invalid value for `share_url`, length must be less than or equal to `1024`")  # noqa: E501

        self._share_url = share_url

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

        Whether the user has access, has requested access, etc. The possible values have the following meanings:   - requested: the user has requested access to this instance.   - granted: the user has access to this instance.   - none: the user has no relation to this application.   # noqa: E501

        :return: The access_level of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: str
        """
        return self._access_level

    @access_level.setter
    def access_level(self, access_level):
        """Sets the access_level of this UserFileShareAccessInfoStatus.

        Whether the user has access, has requested access, etc. The possible values have the following meanings:   - requested: the user has requested access to this instance.   - granted: the user has access to this instance.   - none: the user has no relation to this application.   # noqa: E501

        :param access_level: The access_level of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and access_level is None:  # noqa: E501
            raise ValueError("Invalid value for `access_level`, must not be `None`")  # noqa: E501
        allowed_values = ["requested", "granted", "none"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and access_level not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `access_level` ({0}), must be one of {1}"  # noqa: E501
                .format(access_level, allowed_values)
            )

        self._access_level = access_level

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

        The list of roles held by the user for the given share  # noqa: E501

        :return: The roles of this UserFileShareAccessInfoStatus.  # noqa: E501
        :rtype: list[str]
        """
        return self._roles

    @roles.setter
    def roles(self, roles):
        """Sets the roles of this UserFileShareAccessInfoStatus.

        The list of roles held by the user for the given share  # noqa: E501

        :param roles: The roles of this UserFileShareAccessInfoStatus.  # noqa: E501
        :type: list[str]
        """

        self._roles = roles

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

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