# 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.30
    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 Lab(
    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 = {
            "harvesters",
            "s3_secret_key",
            "s3_access_key",
            "teams",
            "permissions",
            "name",
            "s3_configuration_status",
            "id",
            "admin_group",
            "url",
        }
        
        class properties:
            url = schemas.StrSchema
            id = schemas.IntSchema
            name = schemas.StrSchema
            
            
            class admin_group(
                schemas.ComposedSchema,
            ):
            
            
                class MetaOapg:
                    
                    @classmethod
                    @functools.lru_cache()
                    def all_of(cls):
                        # we need this here to make our import statements work
                        # we must store _composed_schemas in here so the code is only run
                        # when we invoke this method. If we kept this at the class
                        # level we would get an error because the class level
                        # code would be run when this module is imported, and these composed
                        # classes don't exist yet because their module has not finished
                        # loading
                        return [
                            TransparentGroup,
                        ]
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
                    _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],
                ) -> 'admin_group':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class harvesters(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.StrSchema
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'harvesters':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class s3_access_key(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 's3_access_key':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            
            
            class s3_secret_key(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 's3_secret_key':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            
            
            class s3_configuration_status(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    additional_properties = schemas.AnyTypeSchema
                
                def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    return super().get_item_oapg(name)
            
                def __new__(
                    cls,
                    *_args: typing.Union[dict, frozendict.frozendict, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                    **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
                ) -> 's3_configuration_status':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class teams(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.StrSchema
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'teams':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            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,
                    )
            
            
            class description(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'description':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            
            
            class s3_bucket_name(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 's3_bucket_name':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            
            
            class s3_location(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 's3_location':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            
            
            class s3_custom_domain(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 's3_custom_domain':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            __annotations__ = {
                "url": url,
                "id": id,
                "name": name,
                "admin_group": admin_group,
                "harvesters": harvesters,
                "s3_access_key": s3_access_key,
                "s3_secret_key": s3_secret_key,
                "s3_configuration_status": s3_configuration_status,
                "teams": teams,
                "permissions": permissions,
                "description": description,
                "s3_bucket_name": s3_bucket_name,
                "s3_location": s3_location,
                "s3_custom_domain": s3_custom_domain,
            }
    
    harvesters: MetaOapg.properties.harvesters
    s3_secret_key: MetaOapg.properties.s3_secret_key
    s3_access_key: MetaOapg.properties.s3_access_key
    teams: MetaOapg.properties.teams
    permissions: MetaOapg.properties.permissions
    name: MetaOapg.properties.name
    s3_configuration_status: MetaOapg.properties.s3_configuration_status
    id: MetaOapg.properties.id
    admin_group: MetaOapg.properties.admin_group
    url: MetaOapg.properties.url
    
    @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["admin_group"]) -> MetaOapg.properties.admin_group: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["harvesters"]) -> MetaOapg.properties.harvesters: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["s3_access_key"]) -> MetaOapg.properties.s3_access_key: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["s3_secret_key"]) -> MetaOapg.properties.s3_secret_key: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["s3_configuration_status"]) -> MetaOapg.properties.s3_configuration_status: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["teams"]) -> MetaOapg.properties.teams: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["permissions"]) -> MetaOapg.properties.permissions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["s3_bucket_name"]) -> MetaOapg.properties.s3_bucket_name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["s3_location"]) -> MetaOapg.properties.s3_location: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["s3_custom_domain"]) -> MetaOapg.properties.s3_custom_domain: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "id", "name", "admin_group", "harvesters", "s3_access_key", "s3_secret_key", "s3_configuration_status", "teams", "permissions", "description", "s3_bucket_name", "s3_location", "s3_custom_domain", ], 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["admin_group"]) -> MetaOapg.properties.admin_group: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["harvesters"]) -> MetaOapg.properties.harvesters: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["s3_access_key"]) -> MetaOapg.properties.s3_access_key: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["s3_secret_key"]) -> MetaOapg.properties.s3_secret_key: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["s3_configuration_status"]) -> MetaOapg.properties.s3_configuration_status: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["teams"]) -> MetaOapg.properties.teams: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["permissions"]) -> MetaOapg.properties.permissions: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["s3_bucket_name"]) -> typing.Union[MetaOapg.properties.s3_bucket_name, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["s3_location"]) -> typing.Union[MetaOapg.properties.s3_location, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["s3_custom_domain"]) -> typing.Union[MetaOapg.properties.s3_custom_domain, 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["url", "id", "name", "admin_group", "harvesters", "s3_access_key", "s3_secret_key", "s3_configuration_status", "teams", "permissions", "description", "s3_bucket_name", "s3_location", "s3_custom_domain", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        harvesters: typing.Union[MetaOapg.properties.harvesters, list, tuple, ],
        s3_secret_key: typing.Union[MetaOapg.properties.s3_secret_key, None, str, ],
        s3_access_key: typing.Union[MetaOapg.properties.s3_access_key, None, str, ],
        teams: typing.Union[MetaOapg.properties.teams, list, tuple, ],
        permissions: typing.Union[MetaOapg.properties.permissions, dict, frozendict.frozendict, ],
        name: typing.Union[MetaOapg.properties.name, str, ],
        s3_configuration_status: typing.Union[MetaOapg.properties.s3_configuration_status, dict, frozendict.frozendict, ],
        id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, ],
        admin_group: typing.Union[MetaOapg.properties.admin_group, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
        url: typing.Union[MetaOapg.properties.url, str, ],
        description: typing.Union[MetaOapg.properties.description, None, str, schemas.Unset] = schemas.unset,
        s3_bucket_name: typing.Union[MetaOapg.properties.s3_bucket_name, None, str, schemas.Unset] = schemas.unset,
        s3_location: typing.Union[MetaOapg.properties.s3_location, None, str, schemas.Unset] = schemas.unset,
        s3_custom_domain: typing.Union[MetaOapg.properties.s3_custom_domain, None, str, 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],
    ) -> 'Lab':
        return super().__new__(
            cls,
            *_args,
            harvesters=harvesters,
            s3_secret_key=s3_secret_key,
            s3_access_key=s3_access_key,
            teams=teams,
            permissions=permissions,
            name=name,
            s3_configuration_status=s3_configuration_status,
            id=id,
            admin_group=admin_group,
            url=url,
            description=description,
            s3_bucket_name=s3_bucket_name,
            s3_location=s3_location,
            s3_custom_domain=s3_custom_domain,
            _configuration=_configuration,
            **kwargs,
        )

from galv.model.transparent_group import TransparentGroup
