# coding: utf-8

"""
    Battery Data API

    A standard API for accessing battery experiment datasets and metadata  # noqa: E501

    The version of the OpenAPI document: 2.1.37
    Contact: martin.robinson@cs.ox.ac.uk
    Generated by: https://openapi-generator.tech
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from galv import schemas  # noqa: F401


class KnoxTokenFull(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """


    class MetaOapg:
        required = {
            "created",
            "permissions",
            "name",
            "expiry",
            "id",
            "url",
            "token",
        }
        
        class properties:
            url = schemas.StrSchema
            id = schemas.IntSchema
            name = schemas.StrSchema
            created = schemas.DateTimeSchema
            
            
            class expiry(
                schemas.DateTimeBase,
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                class MetaOapg:
                    format = 'date-time'
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, datetime, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'expiry':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            token = schemas.StrSchema
            
            
            class permissions(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        read = schemas.BoolSchema
                        write = schemas.BoolSchema
                        create = schemas.BoolSchema
                        __annotations__ = {
                            "read": read,
                            "write": write,
                            "create": create,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["read"]) -> MetaOapg.properties.read: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["write"]) -> MetaOapg.properties.write: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["create"]) -> MetaOapg.properties.create: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["read", "write", "create", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["read"]) -> typing.Union[MetaOapg.properties.read, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["write"]) -> typing.Union[MetaOapg.properties.write, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["create"]) -> typing.Union[MetaOapg.properties.create, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                
                def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["read", "write", "create", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *_args: typing.Union[dict, frozendict.frozendict, ],
                    read: typing.Union[MetaOapg.properties.read, bool, schemas.Unset] = schemas.unset,
                    write: typing.Union[MetaOapg.properties.write, bool, schemas.Unset] = schemas.unset,
                    create: typing.Union[MetaOapg.properties.create, bool, schemas.Unset] = schemas.unset,
                    _configuration: typing.Optional[schemas.Configuration] = None,
                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                ) -> 'permissions':
                    return super().__new__(
                        cls,
                        *_args,
                        read=read,
                        write=write,
                        create=create,
                        _configuration=_configuration,
                        **kwargs,
                    )
            __annotations__ = {
                "url": url,
                "id": id,
                "name": name,
                "created": created,
                "expiry": expiry,
                "token": token,
                "permissions": permissions,
            }
    
    created: MetaOapg.properties.created
    permissions: MetaOapg.properties.permissions
    name: MetaOapg.properties.name
    expiry: MetaOapg.properties.expiry
    id: MetaOapg.properties.id
    url: MetaOapg.properties.url
    token: MetaOapg.properties.token
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["created"]) -> MetaOapg.properties.created: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expiry"]) -> MetaOapg.properties.expiry: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["permissions"]) -> MetaOapg.properties.permissions: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "id", "name", "created", "expiry", "token", "permissions", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["created"]) -> MetaOapg.properties.created: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expiry"]) -> MetaOapg.properties.expiry: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["permissions"]) -> MetaOapg.properties.permissions: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "id", "name", "created", "expiry", "token", "permissions", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        created: typing.Union[MetaOapg.properties.created, str, datetime, ],
        permissions: typing.Union[MetaOapg.properties.permissions, dict, frozendict.frozendict, ],
        name: typing.Union[MetaOapg.properties.name, str, ],
        expiry: typing.Union[MetaOapg.properties.expiry, None, str, datetime, ],
        id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, ],
        url: typing.Union[MetaOapg.properties.url, str, ],
        token: typing.Union[MetaOapg.properties.token, str, ],
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
    ) -> 'KnoxTokenFull':
        return super().__new__(
            cls,
            *_args,
            created=created,
            permissions=permissions,
            name=name,
            expiry=expiry,
            id=id,
            url=url,
            token=token,
            _configuration=_configuration,
            **kwargs,
        )
