# coding: utf-8

"""
    id

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: common-version
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class CheckPermissionRequest(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 = {
        'namespace_name': 'str',
        'operation': 'OperationForCheckPermissionInput',
        'original_callers': 'list[OriginalCallerForCheckPermissionInput]',
        'principal': 'PrincipalForCheckPermissionInput',
        'references': 'list[ReferenceForCheckPermissionInput]',
        'resource': 'ResourceForCheckPermissionInput'
    }

    attribute_map = {
        'namespace_name': 'NamespaceName',
        'operation': 'Operation',
        'original_callers': 'OriginalCallers',
        'principal': 'Principal',
        'references': 'References',
        'resource': 'Resource'
    }

    def __init__(self, namespace_name=None, operation=None, original_callers=None, principal=None, references=None, resource=None, _configuration=None):  # noqa: E501
        """CheckPermissionRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._namespace_name = None
        self._operation = None
        self._original_callers = None
        self._principal = None
        self._references = None
        self._resource = None
        self.discriminator = None

        self.namespace_name = namespace_name
        if operation is not None:
            self.operation = operation
        if original_callers is not None:
            self.original_callers = original_callers
        if principal is not None:
            self.principal = principal
        if references is not None:
            self.references = references
        if resource is not None:
            self.resource = resource

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


        :return: The namespace_name of this CheckPermissionRequest.  # noqa: E501
        :rtype: str
        """
        return self._namespace_name

    @namespace_name.setter
    def namespace_name(self, namespace_name):
        """Sets the namespace_name of this CheckPermissionRequest.


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

        self._namespace_name = namespace_name

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


        :return: The operation of this CheckPermissionRequest.  # noqa: E501
        :rtype: OperationForCheckPermissionInput
        """
        return self._operation

    @operation.setter
    def operation(self, operation):
        """Sets the operation of this CheckPermissionRequest.


        :param operation: The operation of this CheckPermissionRequest.  # noqa: E501
        :type: OperationForCheckPermissionInput
        """

        self._operation = operation

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


        :return: The original_callers of this CheckPermissionRequest.  # noqa: E501
        :rtype: list[OriginalCallerForCheckPermissionInput]
        """
        return self._original_callers

    @original_callers.setter
    def original_callers(self, original_callers):
        """Sets the original_callers of this CheckPermissionRequest.


        :param original_callers: The original_callers of this CheckPermissionRequest.  # noqa: E501
        :type: list[OriginalCallerForCheckPermissionInput]
        """

        self._original_callers = original_callers

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


        :return: The principal of this CheckPermissionRequest.  # noqa: E501
        :rtype: PrincipalForCheckPermissionInput
        """
        return self._principal

    @principal.setter
    def principal(self, principal):
        """Sets the principal of this CheckPermissionRequest.


        :param principal: The principal of this CheckPermissionRequest.  # noqa: E501
        :type: PrincipalForCheckPermissionInput
        """

        self._principal = principal

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


        :return: The references of this CheckPermissionRequest.  # noqa: E501
        :rtype: list[ReferenceForCheckPermissionInput]
        """
        return self._references

    @references.setter
    def references(self, references):
        """Sets the references of this CheckPermissionRequest.


        :param references: The references of this CheckPermissionRequest.  # noqa: E501
        :type: list[ReferenceForCheckPermissionInput]
        """

        self._references = references

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


        :return: The resource of this CheckPermissionRequest.  # noqa: E501
        :rtype: ResourceForCheckPermissionInput
        """
        return self._resource

    @resource.setter
    def resource(self, resource):
        """Sets the resource of this CheckPermissionRequest.


        :param resource: The resource of this CheckPermissionRequest.  # noqa: E501
        :type: ResourceForCheckPermissionInput
        """

        self._resource = resource

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

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