# 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 TradeImpact(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by Konfig.
    Ref: https://konfigthis.com

    Do not edit the class manually.

    Impact of a group of trade
    """


    class MetaOapg:
        
        class properties:
        
            @staticmethod
            def account() -> typing.Type['Account']:
                return Account
        
            @staticmethod
            def currency() -> typing.Type['Currency']:
                return Currency
            remaining_cash = schemas.NumberSchema
            estimated_commissions = schemas.NumberSchema
            forex_fees = schemas.NumberSchema
            __annotations__ = {
                "account": account,
                "currency": currency,
                "remaining_cash": remaining_cash,
                "estimated_commissions": estimated_commissions,
                "forex_fees": forex_fees,
            }
        additional_properties = schemas.AnyTypeSchema
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["account"]) -> 'Account': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["currency"]) -> 'Currency': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["remaining_cash"]) -> MetaOapg.properties.remaining_cash: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["estimated_commissions"]) -> MetaOapg.properties.estimated_commissions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["forex_fees"]) -> MetaOapg.properties.forex_fees: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["account"], typing_extensions.Literal["currency"], typing_extensions.Literal["remaining_cash"], typing_extensions.Literal["estimated_commissions"], typing_extensions.Literal["forex_fees"], str, ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["account"]) -> typing.Union['Account', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["currency"]) -> typing.Union['Currency', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["remaining_cash"]) -> typing.Union[MetaOapg.properties.remaining_cash, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["estimated_commissions"]) -> typing.Union[MetaOapg.properties.estimated_commissions, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["forex_fees"]) -> typing.Union[MetaOapg.properties.forex_fees, 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["account"], typing_extensions.Literal["currency"], typing_extensions.Literal["remaining_cash"], typing_extensions.Literal["estimated_commissions"], typing_extensions.Literal["forex_fees"], str, ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        account: typing.Union['Account', schemas.Unset] = schemas.unset,
        currency: typing.Union['Currency', schemas.Unset] = schemas.unset,
        remaining_cash: typing.Union[MetaOapg.properties.remaining_cash, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        estimated_commissions: typing.Union[MetaOapg.properties.estimated_commissions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        forex_fees: typing.Union[MetaOapg.properties.forex_fees, decimal.Decimal, int, float, 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, ],
    ) -> 'TradeImpact':
        return super().__new__(
            cls,
            *args,
            account=account,
            currency=currency,
            remaining_cash=remaining_cash,
            estimated_commissions=estimated_commissions,
            forex_fees=forex_fees,
            _configuration=_configuration,
            **kwargs,
        )

from snaptrade_client.model.account import Account
from snaptrade_client.model.currency import Currency
