# coding: utf-8

"""
    Data Repository API

    <details><summary>This document defines the REST API for the Terra Data Repository.</summary> <p> **Status: design in progress** There are a few top-level endpoints (besides some used by swagger):  * / - generated by swagger: swagger API page that provides this documentation and a live UI for submitting REST requests  * /status - provides the operational status of the service  * /configuration - provides the basic configuration and information about the service  * /api - is the authenticated and authorized Data Repository API  * /ga4gh/drs/v1 - is a transcription of the Data Repository Service API  The API endpoints are organized by interface. Each interface is separately versioned. <p> **Notes on Naming** <p> All of the reference items are suffixed with \\\"Model\\\". Those names are used as the class names in the generated Java code. It is helpful to distinguish these model classes from other related classes, like the DAO classes and the operation classes. </details>   # noqa: E501

    The version of the OpenAPI document: 0.1.0
    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 data_repo_client import schemas  # noqa: F401


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

    Do not edit the class manually.

    Request for creating a snapshot. For now, the API only supports snapshots defined as a single dataset asset and row ids for the root table of that asset. The snapshot has exactly the tables and columns of the asset. An optional list of users can be provided to set as readers on the snapshot. In the future, we will need to extend this to handle cross-dataset snapshots from disparate assets, so we will need to support column and datatype mapping from asset tables to the target snapshot tables.

    """


    class MetaOapg:
        required = {
            "contents",
            "name",
        }
        
        class properties:
        
            @staticmethod
            def name() -> typing.Type['DatasetSnapshotNameProperty']:
                return DatasetSnapshotNameProperty
            
            
            class contents(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['SnapshotRequestContentsModel']:
                        return SnapshotRequestContentsModel
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['SnapshotRequestContentsModel'], typing.List['SnapshotRequestContentsModel']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'contents':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'SnapshotRequestContentsModel':
                    return super().__getitem__(i)
            description = schemas.StrSchema
            consentCode = schemas.StrSchema
            duosId = schemas.StrSchema
            
            
            class readers(
                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,
                ) -> 'readers':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            profileId = schemas.UUIDSchema
            properties = schemas.DictSchema
            
            
            class policies(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        
                        
                        class stewards(
                            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,
                            ) -> 'stewards':
                                return super().__new__(
                                    cls,
                                    _arg,
                                    _configuration=_configuration,
                                )
                        
                            def __getitem__(self, i: int) -> MetaOapg.items:
                                return super().__getitem__(i)
                        
                        
                        class readers(
                            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,
                            ) -> 'readers':
                                return super().__new__(
                                    cls,
                                    _arg,
                                    _configuration=_configuration,
                                )
                        
                            def __getitem__(self, i: int) -> MetaOapg.items:
                                return super().__getitem__(i)
                        
                        
                        class discoverers(
                            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,
                            ) -> 'discoverers':
                                return super().__new__(
                                    cls,
                                    _arg,
                                    _configuration=_configuration,
                                )
                        
                            def __getitem__(self, i: int) -> MetaOapg.items:
                                return super().__getitem__(i)
                        __annotations__ = {
                            "stewards": stewards,
                            "readers": readers,
                            "discoverers": discoverers,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["stewards"]) -> MetaOapg.properties.stewards: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["readers"]) -> MetaOapg.properties.readers: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["discoverers"]) -> MetaOapg.properties.discoverers: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["stewards", "readers", "discoverers", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["stewards"]) -> typing.Union[MetaOapg.properties.stewards, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["readers"]) -> typing.Union[MetaOapg.properties.readers, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["discoverers"]) -> typing.Union[MetaOapg.properties.discoverers, 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["stewards", "readers", "discoverers", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *_args: typing.Union[dict, frozendict.frozendict, ],
                    stewards: typing.Union[MetaOapg.properties.stewards, list, tuple, schemas.Unset] = schemas.unset,
                    readers: typing.Union[MetaOapg.properties.readers, list, tuple, schemas.Unset] = schemas.unset,
                    discoverers: typing.Union[MetaOapg.properties.discoverers, list, tuple, 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],
                ) -> 'policies':
                    return super().__new__(
                        cls,
                        *_args,
                        stewards=stewards,
                        readers=readers,
                        discoverers=discoverers,
                        _configuration=_configuration,
                        **kwargs,
                    )
            globalFileIds = schemas.BoolSchema
            compactIdPrefix = schemas.StrSchema
        
            @staticmethod
            def tags() -> typing.Type['ResourceCreateTags']:
                return ResourceCreateTags
            __annotations__ = {
                "name": name,
                "contents": contents,
                "description": description,
                "consentCode": consentCode,
                "duosId": duosId,
                "readers": readers,
                "profileId": profileId,
                "properties": properties,
                "policies": policies,
                "globalFileIds": globalFileIds,
                "compactIdPrefix": compactIdPrefix,
                "tags": tags,
            }
    
    contents: MetaOapg.properties.contents
    name: 'DatasetSnapshotNameProperty'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["name"]) -> 'DatasetSnapshotNameProperty': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["contents"]) -> MetaOapg.properties.contents: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["consentCode"]) -> MetaOapg.properties.consentCode: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["duosId"]) -> MetaOapg.properties.duosId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["readers"]) -> MetaOapg.properties.readers: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["profileId"]) -> MetaOapg.properties.profileId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["properties"]) -> MetaOapg.properties.properties: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["policies"]) -> MetaOapg.properties.policies: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["globalFileIds"]) -> MetaOapg.properties.globalFileIds: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["compactIdPrefix"]) -> MetaOapg.properties.compactIdPrefix: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["tags"]) -> 'ResourceCreateTags': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "contents", "description", "consentCode", "duosId", "readers", "profileId", "properties", "policies", "globalFileIds", "compactIdPrefix", "tags", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> 'DatasetSnapshotNameProperty': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["contents"]) -> MetaOapg.properties.contents: ...
    
    @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["consentCode"]) -> typing.Union[MetaOapg.properties.consentCode, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["duosId"]) -> typing.Union[MetaOapg.properties.duosId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["readers"]) -> typing.Union[MetaOapg.properties.readers, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["profileId"]) -> typing.Union[MetaOapg.properties.profileId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["properties"]) -> typing.Union[MetaOapg.properties.properties, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["policies"]) -> typing.Union[MetaOapg.properties.policies, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["globalFileIds"]) -> typing.Union[MetaOapg.properties.globalFileIds, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["compactIdPrefix"]) -> typing.Union[MetaOapg.properties.compactIdPrefix, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union['ResourceCreateTags', 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["name", "contents", "description", "consentCode", "duosId", "readers", "profileId", "properties", "policies", "globalFileIds", "compactIdPrefix", "tags", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        contents: typing.Union[MetaOapg.properties.contents, list, tuple, ],
        name: 'DatasetSnapshotNameProperty',
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        consentCode: typing.Union[MetaOapg.properties.consentCode, str, schemas.Unset] = schemas.unset,
        duosId: typing.Union[MetaOapg.properties.duosId, str, schemas.Unset] = schemas.unset,
        readers: typing.Union[MetaOapg.properties.readers, list, tuple, schemas.Unset] = schemas.unset,
        profileId: typing.Union[MetaOapg.properties.profileId, str, uuid.UUID, schemas.Unset] = schemas.unset,
        properties: typing.Union[MetaOapg.properties.properties, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        policies: typing.Union[MetaOapg.properties.policies, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        globalFileIds: typing.Union[MetaOapg.properties.globalFileIds, bool, schemas.Unset] = schemas.unset,
        compactIdPrefix: typing.Union[MetaOapg.properties.compactIdPrefix, str, schemas.Unset] = schemas.unset,
        tags: typing.Union['ResourceCreateTags', 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],
    ) -> 'SnapshotRequestModel':
        return super().__new__(
            cls,
            *_args,
            contents=contents,
            name=name,
            description=description,
            consentCode=consentCode,
            duosId=duosId,
            readers=readers,
            profileId=profileId,
            properties=properties,
            policies=policies,
            globalFileIds=globalFileIds,
            compactIdPrefix=compactIdPrefix,
            tags=tags,
            _configuration=_configuration,
            **kwargs,
        )

from data_repo_client.model.dataset_snapshot_name_property import DatasetSnapshotNameProperty
from data_repo_client.model.resource_create_tags import ResourceCreateTags
from data_repo_client.model.snapshot_request_contents_model import SnapshotRequestContentsModel
