# 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.13
    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 Team(
    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 = {
            "equipment_resources",
            "cyclertest_resources",
            "cellfamily_resources",
            "equipmentfamily_resources",
            "experiment_resources",
            "monitored_paths",
            "lab",
            "url",
            "permissions",
            "schedule_resources",
            "name",
            "cell_resources",
            "id",
            "schedulefamily_resources",
        }
        
        class properties:
            url = schemas.StrSchema
            id = schemas.IntSchema
            
            
            class monitored_paths(
                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,
                ) -> 'monitored_paths':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class cellfamily_resources(
                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,
                ) -> 'cellfamily_resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class cell_resources(
                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,
                ) -> 'cell_resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class equipmentfamily_resources(
                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,
                ) -> 'equipmentfamily_resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class equipment_resources(
                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,
                ) -> 'equipment_resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class schedulefamily_resources(
                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,
                ) -> 'schedulefamily_resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class schedule_resources(
                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,
                ) -> 'schedule_resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class cyclertest_resources(
                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,
                ) -> 'cyclertest_resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class experiment_resources(
                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,
                ) -> 'experiment_resources':
                    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,
                    )
            name = schemas.StrSchema
            lab = schemas.StrSchema
            
            
            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 member_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],
                ) -> 'member_group':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            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,
                    )
            __annotations__ = {
                "url": url,
                "id": id,
                "monitored_paths": monitored_paths,
                "cellfamily_resources": cellfamily_resources,
                "cell_resources": cell_resources,
                "equipmentfamily_resources": equipmentfamily_resources,
                "equipment_resources": equipment_resources,
                "schedulefamily_resources": schedulefamily_resources,
                "schedule_resources": schedule_resources,
                "cyclertest_resources": cyclertest_resources,
                "experiment_resources": experiment_resources,
                "permissions": permissions,
                "name": name,
                "lab": lab,
                "description": description,
                "member_group": member_group,
                "admin_group": admin_group,
            }
    
    equipment_resources: MetaOapg.properties.equipment_resources
    cyclertest_resources: MetaOapg.properties.cyclertest_resources
    cellfamily_resources: MetaOapg.properties.cellfamily_resources
    equipmentfamily_resources: MetaOapg.properties.equipmentfamily_resources
    experiment_resources: MetaOapg.properties.experiment_resources
    monitored_paths: MetaOapg.properties.monitored_paths
    lab: MetaOapg.properties.lab
    url: MetaOapg.properties.url
    permissions: MetaOapg.properties.permissions
    schedule_resources: MetaOapg.properties.schedule_resources
    name: MetaOapg.properties.name
    cell_resources: MetaOapg.properties.cell_resources
    id: MetaOapg.properties.id
    schedulefamily_resources: MetaOapg.properties.schedulefamily_resources
    
    @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["monitored_paths"]) -> MetaOapg.properties.monitored_paths: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["cellfamily_resources"]) -> MetaOapg.properties.cellfamily_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["cell_resources"]) -> MetaOapg.properties.cell_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["equipmentfamily_resources"]) -> MetaOapg.properties.equipmentfamily_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["equipment_resources"]) -> MetaOapg.properties.equipment_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["schedulefamily_resources"]) -> MetaOapg.properties.schedulefamily_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["schedule_resources"]) -> MetaOapg.properties.schedule_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["cyclertest_resources"]) -> MetaOapg.properties.cyclertest_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["experiment_resources"]) -> MetaOapg.properties.experiment_resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["permissions"]) -> MetaOapg.properties.permissions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["lab"]) -> MetaOapg.properties.lab: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["member_group"]) -> MetaOapg.properties.member_group: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["admin_group"]) -> MetaOapg.properties.admin_group: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "id", "monitored_paths", "cellfamily_resources", "cell_resources", "equipmentfamily_resources", "equipment_resources", "schedulefamily_resources", "schedule_resources", "cyclertest_resources", "experiment_resources", "permissions", "name", "lab", "description", "member_group", "admin_group", ], 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["monitored_paths"]) -> MetaOapg.properties.monitored_paths: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["cellfamily_resources"]) -> MetaOapg.properties.cellfamily_resources: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["cell_resources"]) -> MetaOapg.properties.cell_resources: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["equipmentfamily_resources"]) -> MetaOapg.properties.equipmentfamily_resources: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["equipment_resources"]) -> MetaOapg.properties.equipment_resources: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["schedulefamily_resources"]) -> MetaOapg.properties.schedulefamily_resources: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["schedule_resources"]) -> MetaOapg.properties.schedule_resources: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["cyclertest_resources"]) -> MetaOapg.properties.cyclertest_resources: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["experiment_resources"]) -> MetaOapg.properties.experiment_resources: ...
    
    @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["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["lab"]) -> MetaOapg.properties.lab: ...
    
    @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["member_group"]) -> typing.Union[MetaOapg.properties.member_group, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["admin_group"]) -> typing.Union[MetaOapg.properties.admin_group, 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", "monitored_paths", "cellfamily_resources", "cell_resources", "equipmentfamily_resources", "equipment_resources", "schedulefamily_resources", "schedule_resources", "cyclertest_resources", "experiment_resources", "permissions", "name", "lab", "description", "member_group", "admin_group", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        equipment_resources: typing.Union[MetaOapg.properties.equipment_resources, list, tuple, ],
        cyclertest_resources: typing.Union[MetaOapg.properties.cyclertest_resources, list, tuple, ],
        cellfamily_resources: typing.Union[MetaOapg.properties.cellfamily_resources, list, tuple, ],
        equipmentfamily_resources: typing.Union[MetaOapg.properties.equipmentfamily_resources, list, tuple, ],
        experiment_resources: typing.Union[MetaOapg.properties.experiment_resources, list, tuple, ],
        monitored_paths: typing.Union[MetaOapg.properties.monitored_paths, list, tuple, ],
        lab: typing.Union[MetaOapg.properties.lab, str, ],
        url: typing.Union[MetaOapg.properties.url, str, ],
        permissions: typing.Union[MetaOapg.properties.permissions, dict, frozendict.frozendict, ],
        schedule_resources: typing.Union[MetaOapg.properties.schedule_resources, list, tuple, ],
        name: typing.Union[MetaOapg.properties.name, str, ],
        cell_resources: typing.Union[MetaOapg.properties.cell_resources, list, tuple, ],
        id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, ],
        schedulefamily_resources: typing.Union[MetaOapg.properties.schedulefamily_resources, list, tuple, ],
        description: typing.Union[MetaOapg.properties.description, None, str, schemas.Unset] = schemas.unset,
        member_group: typing.Union[MetaOapg.properties.member_group, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset,
        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, 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],
    ) -> 'Team':
        return super().__new__(
            cls,
            *_args,
            equipment_resources=equipment_resources,
            cyclertest_resources=cyclertest_resources,
            cellfamily_resources=cellfamily_resources,
            equipmentfamily_resources=equipmentfamily_resources,
            experiment_resources=experiment_resources,
            monitored_paths=monitored_paths,
            lab=lab,
            url=url,
            permissions=permissions,
            schedule_resources=schedule_resources,
            name=name,
            cell_resources=cell_resources,
            id=id,
            schedulefamily_resources=schedulefamily_resources,
            description=description,
            member_group=member_group,
            admin_group=admin_group,
            _configuration=_configuration,
            **kwargs,
        )

from galv.model.transparent_group import TransparentGroup
