import 'package:protobuf/protobuf.dart';
import 'package:alt_client/src/generated/alt/v1/common.pb.dart';
import 'package:alt_client/src/generated/alt/v1/market.pb.dart';
import 'package:alt_client/src/generated/alt/v1/backtest.pb.dart';
import 'package:alt_client/src/generated/alt/v1/paper_trading.pb.dart';
import 'package:alt_client/src/generated/alt/v1/live_trading.pb.dart';

/// Returns the map of ALT Protobuf message qualified names to their respective parser functions.
Map<String, GeneratedMessage Function(List<int>)> altParserMap() {
  return {
    HelloRequest.getDefault().info_.qualifiedMessageName:
        HelloRequest.fromBuffer,
    HelloResponse.getDefault().info_.qualifiedMessageName:
        HelloResponse.fromBuffer,
    ListInstrumentsRequest.getDefault().info_.qualifiedMessageName:
        ListInstrumentsRequest.fromBuffer,
    ListInstrumentsResponse.getDefault().info_.qualifiedMessageName:
        ListInstrumentsResponse.fromBuffer,
    ListBarsRequest.getDefault().info_.qualifiedMessageName:
        ListBarsRequest.fromBuffer,
    ListBarsResponse.getDefault().info_.qualifiedMessageName:
        ListBarsResponse.fromBuffer,
    AggregateMonthlyBarsRequest.getDefault().info_.qualifiedMessageName:
        AggregateMonthlyBarsRequest.fromBuffer,
    AggregateMonthlyBarsResponse.getDefault().info_.qualifiedMessageName:
        AggregateMonthlyBarsResponse.fromBuffer,
    MonthlyProvenance.getDefault().info_.qualifiedMessageName:
        MonthlyProvenance.fromBuffer,
    StartBacktestRequest.getDefault().info_.qualifiedMessageName:
        StartBacktestRequest.fromBuffer,
    StartBacktestResponse.getDefault().info_.qualifiedMessageName:
        StartBacktestResponse.fromBuffer,
    GetBacktestRunRequest.getDefault().info_.qualifiedMessageName:
        GetBacktestRunRequest.fromBuffer,
    GetBacktestRunResponse.getDefault().info_.qualifiedMessageName:
        GetBacktestRunResponse.fromBuffer,
    GetBacktestResultRequest.getDefault().info_.qualifiedMessageName:
        GetBacktestResultRequest.fromBuffer,
    GetBacktestResultResponse.getDefault().info_.qualifiedMessageName:
        GetBacktestResultResponse.fromBuffer,
    BacktestResult.getDefault().info_.qualifiedMessageName:
        BacktestResult.fromBuffer,
    ListBacktestRunsRequest.getDefault().info_.qualifiedMessageName:
        ListBacktestRunsRequest.fromBuffer,
    ListBacktestRunsResponse.getDefault().info_.qualifiedMessageName:
        ListBacktestRunsResponse.fromBuffer,
    GetBacktestRunDetailRequest.getDefault().info_.qualifiedMessageName:
        GetBacktestRunDetailRequest.fromBuffer,
    GetBacktestRunDetailResponse.getDefault().info_.qualifiedMessageName:
        GetBacktestRunDetailResponse.fromBuffer,
    CompareBacktestRunsRequest.getDefault().info_.qualifiedMessageName:
        CompareBacktestRunsRequest.fromBuffer,
    CompareBacktestRunsResponse.getDefault().info_.qualifiedMessageName:
        CompareBacktestRunsResponse.fromBuffer,
    StartPaperTradingRequest.getDefault().info_.qualifiedMessageName:
        StartPaperTradingRequest.fromBuffer,
    StartPaperTradingResponse.getDefault().info_.qualifiedMessageName:
        StartPaperTradingResponse.fromBuffer,
    GetPaperTradingStateRequest.getDefault().info_.qualifiedMessageName:
        GetPaperTradingStateRequest.fromBuffer,
    GetPaperTradingStateResponse.getDefault().info_.qualifiedMessageName:
        GetPaperTradingStateResponse.fromBuffer,
    PaperTradingState.getDefault().info_.qualifiedMessageName:
        PaperTradingState.fromBuffer,
    GetLiveBrokerCapabilitiesRequest.getDefault().info_.qualifiedMessageName:
        GetLiveBrokerCapabilitiesRequest.fromBuffer,
    GetLiveBrokerCapabilitiesResponse.getDefault().info_.qualifiedMessageName:
        GetLiveBrokerCapabilitiesResponse.fromBuffer,
    LiveBrokerCapability.getDefault().info_.qualifiedMessageName:
        LiveBrokerCapability.fromBuffer,
    SubmitLiveOrderRequest.getDefault().info_.qualifiedMessageName:
        SubmitLiveOrderRequest.fromBuffer,
    SubmitLiveOrderResponse.getDefault().info_.qualifiedMessageName:
        SubmitLiveOrderResponse.fromBuffer,
    CancelLiveOrderRequest.getDefault().info_.qualifiedMessageName:
        CancelLiveOrderRequest.fromBuffer,
    CancelLiveOrderResponse.getDefault().info_.qualifiedMessageName:
        CancelLiveOrderResponse.fromBuffer,
    GetLiveOrderRequest.getDefault().info_.qualifiedMessageName:
        GetLiveOrderRequest.fromBuffer,
    GetLiveOrderResponse.getDefault().info_.qualifiedMessageName:
        GetLiveOrderResponse.fromBuffer,
    GetLiveRiskPolicyRequest.getDefault().info_.qualifiedMessageName:
        GetLiveRiskPolicyRequest.fromBuffer,
    GetLiveRiskPolicyResponse.getDefault().info_.qualifiedMessageName:
        GetLiveRiskPolicyResponse.fromBuffer,
    LiveRiskPolicy.getDefault().info_.qualifiedMessageName:
        LiveRiskPolicy.fromBuffer,
    GetLiveKillSwitchRequest.getDefault().info_.qualifiedMessageName:
        GetLiveKillSwitchRequest.fromBuffer,
    GetLiveKillSwitchResponse.getDefault().info_.qualifiedMessageName:
        GetLiveKillSwitchResponse.fromBuffer,
    SetLiveKillSwitchRequest.getDefault().info_.qualifiedMessageName:
        SetLiveKillSwitchRequest.fromBuffer,
    SetLiveKillSwitchResponse.getDefault().info_.qualifiedMessageName:
        SetLiveKillSwitchResponse.fromBuffer,
    LiveKillSwitchState.getDefault().info_.qualifiedMessageName:
        LiveKillSwitchState.fromBuffer,
    LiveRiskDecision.getDefault().info_.qualifiedMessageName:
        LiveRiskDecision.fromBuffer,
    SyncLiveAccountRequest.getDefault().info_.qualifiedMessageName:
        SyncLiveAccountRequest.fromBuffer,
    SyncLiveAccountResponse.getDefault().info_.qualifiedMessageName:
        SyncLiveAccountResponse.fromBuffer,
    GetLiveAccountSnapshotRequest.getDefault().info_.qualifiedMessageName:
        GetLiveAccountSnapshotRequest.fromBuffer,
    GetLiveAccountSnapshotResponse.getDefault().info_.qualifiedMessageName:
        GetLiveAccountSnapshotResponse.fromBuffer,
    LiveAccountSnapshot.getDefault().info_.qualifiedMessageName:
        LiveAccountSnapshot.fromBuffer,
    LiveCashBalance.getDefault().info_.qualifiedMessageName:
        LiveCashBalance.fromBuffer,
    LivePositionSnapshot.getDefault().info_.qualifiedMessageName:
        LivePositionSnapshot.fromBuffer,
  };
}
