from datetime import date, datetime  # noqa: F401
from typing import List, Dict  # noqa: F401

from capif_security import util
from capif_security.models.base_model import Model


class AccessTokenErr1(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, error=None, error_description=None, error_uri=None):  # noqa: E501
        """AccessTokenErr1 - a model defined in OpenAPI

        :param error: The error of this AccessTokenErr1.  # noqa: E501
        :type error: str
        :param error_description: The error_description of this AccessTokenErr1.  # noqa: E501
        :type error_description: str
        :param error_uri: The error_uri of this AccessTokenErr1.  # noqa: E501
        :type error_uri: str
        """
        self.openapi_types = {
            'error': str,
            'error_description': str,
            'error_uri': str
        }

        self.attribute_map = {
            'error': 'error',
            'error_description': 'error_description',
            'error_uri': 'error_uri'
        }

        self._error = error
        self._error_description = error_description
        self._error_uri = error_uri

    @classmethod
    def from_dict(cls, dikt) -> 'AccessTokenErr1':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The AccessTokenErr_1 of this AccessTokenErr1.  # noqa: E501
        :rtype: AccessTokenErr1
        """
        return util.deserialize_model(dikt, cls)

    @property
    def error(self) -> str:
        """Gets the error of this AccessTokenErr1.


        :return: The error of this AccessTokenErr1.
        :rtype: str
        """
        return self._error

    @error.setter
    def error(self, error: str):
        """Sets the error of this AccessTokenErr1.


        :param error: The error of this AccessTokenErr1.
        :type error: str
        """
        allowed_values = ["invalid_request", "invalid_client", "invalid_grant", "unauthorized_client", "unsupported_grant_type", "invalid_scope"]  # noqa: E501
        if error not in allowed_values:
            raise ValueError(
                "Invalid value for `error` ({0}), must be one of {1}"
                .format(error, allowed_values)
            )

        self._error = error

    @property
    def error_description(self) -> str:
        """Gets the error_description of this AccessTokenErr1.


        :return: The error_description of this AccessTokenErr1.
        :rtype: str
        """
        return self._error_description

    @error_description.setter
    def error_description(self, error_description: str):
        """Sets the error_description of this AccessTokenErr1.


        :param error_description: The error_description of this AccessTokenErr1.
        :type error_description: str
        """

        self._error_description = error_description

    @property
    def error_uri(self) -> str:
        """Gets the error_uri of this AccessTokenErr1.


        :return: The error_uri of this AccessTokenErr1.
        :rtype: str
        """
        return self._error_uri

    @error_uri.setter
    def error_uri(self, error_uri: str):
        """Sets the error_uri of this AccessTokenErr1.


        :param error_uri: The error_uri of this AccessTokenErr1.
        :type error_uri: str
        """

        self._error_uri = error_uri
