# 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 Statement(
    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 = {
            "resource",
            "effect",
            "action",
        }
        
        class properties:
            
            
            class effect(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "allow": "ALLOW",
                        "deny": "DENY",
                    }
                
                @schemas.classproperty
                def ALLOW(cls):
                    return cls("allow")
                
                @schemas.classproperty
                def DENY(cls):
                    return cls("deny")
            resource = schemas.StrSchema
            
            
            class action(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    min_items = 1
                    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,
                ) -> 'action':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            __annotations__ = {
                "effect": effect,
                "resource": resource,
                "action": action,
            }
    
    resource: MetaOapg.properties.resource
    effect: MetaOapg.properties.effect
    action: MetaOapg.properties.action
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["effect"]) -> MetaOapg.properties.effect: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["effect", "resource", "action", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["effect"]) -> MetaOapg.properties.effect: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
    
    @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["effect", "resource", "action", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        resource: typing.Union[MetaOapg.properties.resource, str, ],
        effect: typing.Union[MetaOapg.properties.effect, str, ],
        action: typing.Union[MetaOapg.properties.action, list, tuple, ],
        _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],
    ) -> 'Statement':
        return super().__new__(
            cls,
            *_args,
            resource=resource,
            effect=effect,
            action=action,
            _configuration=_configuration,
            **kwargs,
        )
