# 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 HookRun(
    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 = {
            "start_time",
            "hook_id",
            "action",
            "hook_run_id",
            "status",
        }
        
        class properties:
            hook_run_id = schemas.StrSchema
            action = schemas.StrSchema
            hook_id = schemas.StrSchema
            start_time = schemas.DateTimeSchema
            
            
            class status(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "failed": "FAILED",
                        "completed": "COMPLETED",
                    }
                
                @schemas.classproperty
                def FAILED(cls):
                    return cls("failed")
                
                @schemas.classproperty
                def COMPLETED(cls):
                    return cls("completed")
            end_time = schemas.DateTimeSchema
            __annotations__ = {
                "hook_run_id": hook_run_id,
                "action": action,
                "hook_id": hook_id,
                "start_time": start_time,
                "status": status,
                "end_time": end_time,
            }
    
    start_time: MetaOapg.properties.start_time
    hook_id: MetaOapg.properties.hook_id
    action: MetaOapg.properties.action
    hook_run_id: MetaOapg.properties.hook_run_id
    status: MetaOapg.properties.status
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["hook_run_id"]) -> MetaOapg.properties.hook_run_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["hook_id"]) -> MetaOapg.properties.hook_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["end_time"]) -> MetaOapg.properties.end_time: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["hook_run_id", "action", "hook_id", "start_time", "status", "end_time", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["hook_run_id"]) -> MetaOapg.properties.hook_run_id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["hook_id"]) -> MetaOapg.properties.hook_id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["end_time"]) -> typing.Union[MetaOapg.properties.end_time, 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["hook_run_id", "action", "hook_id", "start_time", "status", "end_time", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        start_time: typing.Union[MetaOapg.properties.start_time, str, datetime, ],
        hook_id: typing.Union[MetaOapg.properties.hook_id, str, ],
        action: typing.Union[MetaOapg.properties.action, str, ],
        hook_run_id: typing.Union[MetaOapg.properties.hook_run_id, str, ],
        status: typing.Union[MetaOapg.properties.status, str, ],
        end_time: typing.Union[MetaOapg.properties.end_time, str, datetime, 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],
    ) -> 'HookRun':
        return super().__new__(
            cls,
            *_args,
            start_time=start_time,
            hook_id=hook_id,
            action=action,
            hook_run_id=hook_run_id,
            status=status,
            end_time=end_time,
            _configuration=_configuration,
            **kwargs,
        )
