# coding: utf-8

"""
    Collibra Search API

    <p>The Search API allows you to create your own integration with the Collibra Search Engine.<br /> Find your data!</p>  # noqa: E501

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


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

    Do not edit the class manually.

    Details of a resource matching the search criteria.
    """


    class MetaOapg:
        
        class properties:
        
            @staticmethod
            def resource() -> typing.Type['SearchResultResource']:
                return SearchResultResource
            
            
            class highlights(
                schemas.ListBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneTupleMixin
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['SearchResultHighlight']:
                        return SearchResultHighlight
            
            
                def __new__(
                    cls,
                    *args: typing.Union[list, tuple, None, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'highlights':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            __annotations__ = {
                "resource": resource,
                "highlights": highlights,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["resource"]) -> 'SearchResultResource': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["highlights"]) -> MetaOapg.properties.highlights: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["resource", "highlights", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union['SearchResultResource', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["highlights"]) -> typing.Union[MetaOapg.properties.highlights, 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["resource", "highlights", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        resource: typing.Union['SearchResultResource', schemas.Unset] = schemas.unset,
        highlights: typing.Union[MetaOapg.properties.highlights, list, tuple, None, 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],
    ) -> 'SearchResult':
        return super().__new__(
            cls,
            *args,
            resource=resource,
            highlights=highlights,
            _configuration=_configuration,
            **kwargs,
        )

from collibra_search.model.search_result_highlight import SearchResultHighlight
from collibra_search.model.search_result_resource import SearchResultResource
