# coding: utf-8
"""
   Python SDK for OpenFGA

   API version: 0.1
   Website: https://openfga.dev
   Documentation: https://openfga.dev/docs
   Support: https://discord.gg/8naAwJfWN6
   License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE)

   NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
"""

from openfga_sdk.client.models.check_request import ClientCheckRequest
from openfga_sdk.models.check_response import CheckResponse


class BatchCheckResponse():
    """
    BatchCheckResponse encapsulates the response for a single batch check
    """

    def __init__(self, allowed: bool, request: ClientCheckRequest, response: CheckResponse, error: Exception = None):
        self._allowed = allowed
        self._request = request
        self._response = response
        self._error = error

    @property
    def allowed(self):
        """
        Return whether request is allowed
        """
        return self._allowed

    @property
    def request(self):
        """
        Return original request
        """
        return self._request

    @property
    def response(self):
        """
        Return original request
        """
        return self._response

    @property
    def error(self):
        """
        Return error associated with batch request (if any)
        """
        return self._error

    def __str__(self):
        """
        Return the class string
        """
        return "allowed %s request %s error %s" % (self._allowed, self._request, self._error)
