# coding: utf-8

"""
    SnapTrade

    Connect brokerage accounts to your app for live positions and trading  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Contact: api@snaptrade.com
    Generated by: https://konfigthis.com
"""

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 snaptrade_client import schemas  # noqa: F401


class PortfolioGroupInfo(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by Konfig.
    Ref: https://konfigthis.com

    Do not edit the class manually.

    Summary of all relevant information about a portfolio group.
    """


    class MetaOapg:
        
        class properties:
            
            
            class symbols(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['UniversalSymbol']:
                        return UniversalSymbol
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['UniversalSymbol'], typing.List['UniversalSymbol']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'symbols':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'UniversalSymbol':
                    return super().__getitem__(i)
            
            
            class quotable_symbols(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['UniversalSymbol']:
                        return UniversalSymbol
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['UniversalSymbol'], typing.List['UniversalSymbol']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'quotable_symbols':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'UniversalSymbol':
                    return super().__getitem__(i)
            
            
            class balances(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['Balance']:
                        return Balance
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['Balance'], typing.List['Balance']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'balances':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'Balance':
                    return super().__getitem__(i)
            
            
            class positions(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['Position']:
                        return Position
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['Position'], typing.List['Position']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'positions':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'Position':
                    return super().__getitem__(i)
            
            
            class target_positions(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['TargetAsset']:
                        return TargetAsset
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['TargetAsset'], typing.List['TargetAsset']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'target_positions':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'TargetAsset':
                    return super().__getitem__(i)
            
            
            class ideal_positions(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['Position']:
                        return Position
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['Position'], typing.List['Position']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'ideal_positions':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'Position':
                    return super().__getitem__(i)
            
            
            class excluded_positions(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['ExcludedAsset']:
                        return ExcludedAsset
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['ExcludedAsset'], typing.List['ExcludedAsset']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'excluded_positions':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'ExcludedAsset':
                    return super().__getitem__(i)
            
            
            class calculated_trades(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['CalculatedTrade']:
                        return CalculatedTrade
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['CalculatedTrade'], typing.List['CalculatedTrade']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'calculated_trades':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'CalculatedTrade':
                    return super().__getitem__(i)
            
            
            class brokerage_authorizations(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['BrokerageAuthorization']:
                        return BrokerageAuthorization
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['BrokerageAuthorization'], typing.List['BrokerageAuthorization']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'brokerage_authorizations':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'BrokerageAuthorization':
                    return super().__getitem__(i)
            accuracy = schemas.NumberSchema
        
            @staticmethod
            def settings() -> typing.Type['PortfolioGroupSettings']:
                return PortfolioGroupSettings
            __annotations__ = {
                "symbols": symbols,
                "quotable_symbols": quotable_symbols,
                "balances": balances,
                "positions": positions,
                "target_positions": target_positions,
                "ideal_positions": ideal_positions,
                "excluded_positions": excluded_positions,
                "calculated_trades": calculated_trades,
                "brokerage_authorizations": brokerage_authorizations,
                "accuracy": accuracy,
                "settings": settings,
            }
        additional_properties = schemas.AnyTypeSchema
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["symbols"]) -> MetaOapg.properties.symbols: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["quotable_symbols"]) -> MetaOapg.properties.quotable_symbols: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["balances"]) -> MetaOapg.properties.balances: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["positions"]) -> MetaOapg.properties.positions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["target_positions"]) -> MetaOapg.properties.target_positions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ideal_positions"]) -> MetaOapg.properties.ideal_positions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["excluded_positions"]) -> MetaOapg.properties.excluded_positions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["calculated_trades"]) -> MetaOapg.properties.calculated_trades: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["brokerage_authorizations"]) -> MetaOapg.properties.brokerage_authorizations: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["accuracy"]) -> MetaOapg.properties.accuracy: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["settings"]) -> 'PortfolioGroupSettings': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["symbols"], typing_extensions.Literal["quotable_symbols"], typing_extensions.Literal["balances"], typing_extensions.Literal["positions"], typing_extensions.Literal["target_positions"], typing_extensions.Literal["ideal_positions"], typing_extensions.Literal["excluded_positions"], typing_extensions.Literal["calculated_trades"], typing_extensions.Literal["brokerage_authorizations"], typing_extensions.Literal["accuracy"], typing_extensions.Literal["settings"], str, ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["symbols"]) -> typing.Union[MetaOapg.properties.symbols, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["quotable_symbols"]) -> typing.Union[MetaOapg.properties.quotable_symbols, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["balances"]) -> typing.Union[MetaOapg.properties.balances, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["positions"]) -> typing.Union[MetaOapg.properties.positions, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["target_positions"]) -> typing.Union[MetaOapg.properties.target_positions, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ideal_positions"]) -> typing.Union[MetaOapg.properties.ideal_positions, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["excluded_positions"]) -> typing.Union[MetaOapg.properties.excluded_positions, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["calculated_trades"]) -> typing.Union[MetaOapg.properties.calculated_trades, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["brokerage_authorizations"]) -> typing.Union[MetaOapg.properties.brokerage_authorizations, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["accuracy"]) -> typing.Union[MetaOapg.properties.accuracy, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["settings"]) -> typing.Union['PortfolioGroupSettings', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["symbols"], typing_extensions.Literal["quotable_symbols"], typing_extensions.Literal["balances"], typing_extensions.Literal["positions"], typing_extensions.Literal["target_positions"], typing_extensions.Literal["ideal_positions"], typing_extensions.Literal["excluded_positions"], typing_extensions.Literal["calculated_trades"], typing_extensions.Literal["brokerage_authorizations"], typing_extensions.Literal["accuracy"], typing_extensions.Literal["settings"], str, ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        symbols: typing.Union[MetaOapg.properties.symbols, list, tuple, schemas.Unset] = schemas.unset,
        quotable_symbols: typing.Union[MetaOapg.properties.quotable_symbols, list, tuple, schemas.Unset] = schemas.unset,
        balances: typing.Union[MetaOapg.properties.balances, list, tuple, schemas.Unset] = schemas.unset,
        positions: typing.Union[MetaOapg.properties.positions, list, tuple, schemas.Unset] = schemas.unset,
        target_positions: typing.Union[MetaOapg.properties.target_positions, list, tuple, schemas.Unset] = schemas.unset,
        ideal_positions: typing.Union[MetaOapg.properties.ideal_positions, list, tuple, schemas.Unset] = schemas.unset,
        excluded_positions: typing.Union[MetaOapg.properties.excluded_positions, list, tuple, schemas.Unset] = schemas.unset,
        calculated_trades: typing.Union[MetaOapg.properties.calculated_trades, list, tuple, schemas.Unset] = schemas.unset,
        brokerage_authorizations: typing.Union[MetaOapg.properties.brokerage_authorizations, list, tuple, schemas.Unset] = schemas.unset,
        accuracy: typing.Union[MetaOapg.properties.accuracy, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        settings: typing.Union['PortfolioGroupSettings', schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
    ) -> 'PortfolioGroupInfo':
        return super().__new__(
            cls,
            *args,
            symbols=symbols,
            quotable_symbols=quotable_symbols,
            balances=balances,
            positions=positions,
            target_positions=target_positions,
            ideal_positions=ideal_positions,
            excluded_positions=excluded_positions,
            calculated_trades=calculated_trades,
            brokerage_authorizations=brokerage_authorizations,
            accuracy=accuracy,
            settings=settings,
            _configuration=_configuration,
            **kwargs,
        )

from snaptrade_client.model.balance import Balance
from snaptrade_client.model.brokerage_authorization import BrokerageAuthorization
from snaptrade_client.model.calculated_trade import CalculatedTrade
from snaptrade_client.model.excluded_asset import ExcludedAsset
from snaptrade_client.model.portfolio_group_settings import PortfolioGroupSettings
from snaptrade_client.model.position import Position
from snaptrade_client.model.target_asset import TargetAsset
from snaptrade_client.model.universal_symbol import UniversalSymbol
