# coding: utf-8

"""
    Domino Volumes for NetApp ONTAP Microservice API

    Microservice responsible for managing Domino Volumes for NetApp ONTAP feature  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: support@dominodatalab.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class RemotefsVolumeGrant(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 = {
        "is_organization": "bool",
        "target_id": "str",
        "target_name": "str",
        "target_role": "RemotefsVolumeRole",
    }

    attribute_map = {
        "is_organization": "isOrganization",
        "target_id": "targetId",
        "target_name": "targetName",
        "target_role": "targetRole",
    }

    def __init__(
        self, is_organization=None, target_id=None, target_name=None, target_role=None
    ):  # noqa: E501
        """RemotefsVolumeGrant - a model defined in Swagger"""  # noqa: E501
        self._is_organization = None
        self._target_id = None
        self._target_name = None
        self._target_role = None
        self.discriminator = None
        self.is_organization = is_organization
        self.target_id = target_id
        self.target_name = target_name
        self.target_role = target_role

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


        :return: The is_organization of this RemotefsVolumeGrant.  # noqa: E501
        :rtype: bool
        """
        return self._is_organization

    @is_organization.setter
    def is_organization(self, is_organization):
        """Sets the is_organization of this RemotefsVolumeGrant.


        :param is_organization: The is_organization of this RemotefsVolumeGrant.  # noqa: E501
        :type: bool
        """
        if is_organization is None:
            raise ValueError(
                "Invalid value for `is_organization`, must not be `None`"
            )  # noqa: E501

        self._is_organization = is_organization

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

        References Mongo user ID (including organizations)  # noqa: E501

        :return: The target_id of this RemotefsVolumeGrant.  # noqa: E501
        :rtype: str
        """
        return self._target_id

    @target_id.setter
    def target_id(self, target_id):
        """Sets the target_id of this RemotefsVolumeGrant.

        References Mongo user ID (including organizations)  # noqa: E501

        :param target_id: The target_id of this RemotefsVolumeGrant.  # noqa: E501
        :type: str
        """
        if target_id is None:
            raise ValueError("Invalid value for `target_id`, must not be `None`")  # noqa: E501

        self._target_id = target_id

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


        :return: The target_name of this RemotefsVolumeGrant.  # noqa: E501
        :rtype: str
        """
        return self._target_name

    @target_name.setter
    def target_name(self, target_name):
        """Sets the target_name of this RemotefsVolumeGrant.


        :param target_name: The target_name of this RemotefsVolumeGrant.  # noqa: E501
        :type: str
        """
        if target_name is None:
            raise ValueError("Invalid value for `target_name`, must not be `None`")  # noqa: E501

        self._target_name = target_name

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


        :return: The target_role of this RemotefsVolumeGrant.  # noqa: E501
        :rtype: RemotefsVolumeRole
        """
        return self._target_role

    @target_role.setter
    def target_role(self, target_role):
        """Sets the target_role of this RemotefsVolumeGrant.


        :param target_role: The target_role of this RemotefsVolumeGrant.  # noqa: E501
        :type: RemotefsVolumeRole
        """
        if target_role is None:
            raise ValueError("Invalid value for `target_role`, must not be `None`")  # noqa: E501

        self._target_role = target_role

    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
        if issubclass(RemotefsVolumeGrant, dict):
            for key, value in self.items():
                result[key] = 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, RemotefsVolumeGrant):
            return False

        return self.__dict__ == other.__dict__

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