# coding: utf-8

"""
    lakeFS API

    lakeFS HTTP API  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Contact: services@treeverse.io
    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 lakefs_client import schemas  # noqa: F401


class Commit(
    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 = {
            "committer",
            "creation_date",
            "id",
            "meta_range_id",
            "message",
            "parents",
        }
        
        class properties:
            id = schemas.StrSchema
            
            
            class parents(
                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,
                ) -> 'parents':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            committer = schemas.StrSchema
            message = schemas.StrSchema
            creation_date = schemas.Int64Schema
            meta_range_id = schemas.StrSchema
            
            
            class metadata(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    additional_properties = schemas.StrSchema
                
                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, str, ],
                ) -> 'metadata':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            __annotations__ = {
                "id": id,
                "parents": parents,
                "committer": committer,
                "message": message,
                "creation_date": creation_date,
                "meta_range_id": meta_range_id,
                "metadata": metadata,
            }
    
    committer: MetaOapg.properties.committer
    creation_date: MetaOapg.properties.creation_date
    id: MetaOapg.properties.id
    meta_range_id: MetaOapg.properties.meta_range_id
    message: MetaOapg.properties.message
    parents: MetaOapg.properties.parents
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["parents"]) -> MetaOapg.properties.parents: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["committer"]) -> MetaOapg.properties.committer: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["meta_range_id"]) -> MetaOapg.properties.meta_range_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "parents", "committer", "message", "creation_date", "meta_range_id", "metadata", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @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["parents"]) -> MetaOapg.properties.parents: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["committer"]) -> MetaOapg.properties.committer: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["meta_range_id"]) -> MetaOapg.properties.meta_range_id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, 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["id", "parents", "committer", "message", "creation_date", "meta_range_id", "metadata", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        committer: typing.Union[MetaOapg.properties.committer, str, ],
        creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ],
        id: typing.Union[MetaOapg.properties.id, str, ],
        meta_range_id: typing.Union[MetaOapg.properties.meta_range_id, str, ],
        message: typing.Union[MetaOapg.properties.message, str, ],
        parents: typing.Union[MetaOapg.properties.parents, list, tuple, ],
        metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, 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],
    ) -> 'Commit':
        return super().__new__(
            cls,
            *_args,
            committer=committer,
            creation_date=creation_date,
            id=id,
            meta_range_id=meta_range_id,
            message=message,
            parents=parents,
            metadata=metadata,
            _configuration=_configuration,
            **kwargs,
        )
