"""
   Python SDK for OpenFGA

   API version: 1.x
   Website: https://openfga.dev
   Documentation: https://openfga.dev/docs
   Support: https://openfga.dev/community
   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.tuple import ClientTuple
from openfga_sdk.models.check_error import CheckError


class ClientBatchCheckSingleResponse:
    def __init__(
        self,
        allowed: bool,
        request: ClientTuple,
        correlation_id: str,
        error: CheckError = None,
    ):
        self._allowed = allowed
        self._request = request
        self._correlation_id = correlation_id
        self._error = error
        # Set "false" if there was an error and allowed isn't set
        if error is not None and allowed is None:
            self._allowed = False

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

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

    @property
    def correlation_id(self):
        """
        Return correlation_id
        """
        return self._correlation_id

    @property
    def error(self):
        """
        Return error
        """
        return self._error

    @allowed.setter
    def allowed(self, allowed):
        """
        Set allowed
        """
        self._allowed = allowed

    @request.setter
    def request(self, request):
        """
        Set request
        """
        self._request = request

    @correlation_id.setter
    def correlation_id(self, correlation_id):
        """
        Set correlation_id
        """
        self._correlation_id = correlation_id

    @error.setter
    def error(self, error):
        """
        Set error
        """
        self._error = error
