// This is a generated file - do not edit.
//
// Generated from alt/v1/live_trading.proto.

// @dart = 3.3

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_relative_imports

import 'dart:core' as $core;

import 'package:fixnum/fixnum.dart' as $fixnum;
import 'package:protobuf/protobuf.dart' as $pb;

import 'backtest.pb.dart' as $2;
import 'common.pb.dart' as $0;
import 'market.pb.dart' as $1;

export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;

/// GetLiveBrokerCapabilitiesRequest is a query sent to the worker to discover
/// what markets, venues, and order types the live broker adapter supports.
class GetLiveBrokerCapabilitiesRequest extends $pb.GeneratedMessage {
  factory GetLiveBrokerCapabilitiesRequest({
    $core.String? accountId,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    return result;
  }

  GetLiveBrokerCapabilitiesRequest._();

  factory GetLiveBrokerCapabilitiesRequest.fromBuffer(
          $core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveBrokerCapabilitiesRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveBrokerCapabilitiesRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveBrokerCapabilitiesRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveBrokerCapabilitiesRequest copyWith(
          void Function(GetLiveBrokerCapabilitiesRequest) updates) =>
      super.copyWith(
              (message) => updates(message as GetLiveBrokerCapabilitiesRequest))
          as GetLiveBrokerCapabilitiesRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveBrokerCapabilitiesRequest create() =>
      GetLiveBrokerCapabilitiesRequest._();
  @$core.override
  GetLiveBrokerCapabilitiesRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveBrokerCapabilitiesRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveBrokerCapabilitiesRequest>(
          create);
  static GetLiveBrokerCapabilitiesRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);
}

/// GetLiveBrokerCapabilitiesResponse wraps the broker capability report or an
/// error explaining why the probe failed.
class GetLiveBrokerCapabilitiesResponse extends $pb.GeneratedMessage {
  factory GetLiveBrokerCapabilitiesResponse({
    LiveBrokerCapability? brokerCapabilities,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (brokerCapabilities != null)
      result.brokerCapabilities = brokerCapabilities;
    if (error != null) result.error = error;
    return result;
  }

  GetLiveBrokerCapabilitiesResponse._();

  factory GetLiveBrokerCapabilitiesResponse.fromBuffer(
          $core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveBrokerCapabilitiesResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveBrokerCapabilitiesResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveBrokerCapability>(1, _omitFieldNames ? '' : 'brokerCapabilities',
        subBuilder: LiveBrokerCapability.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveBrokerCapabilitiesResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveBrokerCapabilitiesResponse copyWith(
          void Function(GetLiveBrokerCapabilitiesResponse) updates) =>
      super.copyWith((message) =>
              updates(message as GetLiveBrokerCapabilitiesResponse))
          as GetLiveBrokerCapabilitiesResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveBrokerCapabilitiesResponse create() =>
      GetLiveBrokerCapabilitiesResponse._();
  @$core.override
  GetLiveBrokerCapabilitiesResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveBrokerCapabilitiesResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveBrokerCapabilitiesResponse>(
          create);
  static GetLiveBrokerCapabilitiesResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveBrokerCapability get brokerCapabilities => $_getN(0);
  @$pb.TagNumber(1)
  set brokerCapabilities(LiveBrokerCapability value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasBrokerCapabilities() => $_has(0);
  @$pb.TagNumber(1)
  void clearBrokerCapabilities() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveBrokerCapability ensureBrokerCapabilities() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// LiveBrokerCapability describes what a live broker supports. It mirrors the
/// domain types in packages/domain/trading but is wire-format only so that
/// generated code stays minimal for this milestone.
class LiveBrokerCapability extends $pb.GeneratedMessage {
  factory LiveBrokerCapability({
    $core.String? broker,
    $core.Iterable<$0.Market>? markets,
    $core.Iterable<$0.Venue>? venues,
    $core.Iterable<$core.String>? orderTypes,
    $core.bool? supportsAmend,
    $core.bool? supportsCancel,
    $core.bool? supportsAccount,
    $core.bool? supportsAuditTags,
    $fixnum.Int64? checkedAtUnixMs,
  }) {
    final result = create();
    if (broker != null) result.broker = broker;
    if (markets != null) result.markets.addAll(markets);
    if (venues != null) result.venues.addAll(venues);
    if (orderTypes != null) result.orderTypes.addAll(orderTypes);
    if (supportsAmend != null) result.supportsAmend = supportsAmend;
    if (supportsCancel != null) result.supportsCancel = supportsCancel;
    if (supportsAccount != null) result.supportsAccount = supportsAccount;
    if (supportsAuditTags != null) result.supportsAuditTags = supportsAuditTags;
    if (checkedAtUnixMs != null) result.checkedAtUnixMs = checkedAtUnixMs;
    return result;
  }

  LiveBrokerCapability._();

  factory LiveBrokerCapability.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveBrokerCapability.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveBrokerCapability',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'broker')
    ..pc<$0.Market>(2, _omitFieldNames ? '' : 'markets', $pb.PbFieldType.KE,
        valueOf: $0.Market.valueOf,
        enumValues: $0.Market.values,
        defaultEnumValue: $0.Market.MARKET_UNSPECIFIED)
    ..pc<$0.Venue>(3, _omitFieldNames ? '' : 'venues', $pb.PbFieldType.KE,
        valueOf: $0.Venue.valueOf,
        enumValues: $0.Venue.values,
        defaultEnumValue: $0.Venue.VENUE_UNSPECIFIED)
    ..pPS(4, _omitFieldNames ? '' : 'orderTypes')
    ..aOB(5, _omitFieldNames ? '' : 'supportsAmend')
    ..aOB(6, _omitFieldNames ? '' : 'supportsCancel')
    ..aOB(7, _omitFieldNames ? '' : 'supportsAccount')
    ..aOB(8, _omitFieldNames ? '' : 'supportsAuditTags')
    ..aInt64(9, _omitFieldNames ? '' : 'checkedAtUnixMs')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveBrokerCapability clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveBrokerCapability copyWith(void Function(LiveBrokerCapability) updates) =>
      super.copyWith((message) => updates(message as LiveBrokerCapability))
          as LiveBrokerCapability;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveBrokerCapability create() => LiveBrokerCapability._();
  @$core.override
  LiveBrokerCapability createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveBrokerCapability getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveBrokerCapability>(create);
  static LiveBrokerCapability? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get broker => $_getSZ(0);
  @$pb.TagNumber(1)
  set broker($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasBroker() => $_has(0);
  @$pb.TagNumber(1)
  void clearBroker() => $_clearField(1);

  @$pb.TagNumber(2)
  $pb.PbList<$0.Market> get markets => $_getList(1);

  @$pb.TagNumber(3)
  $pb.PbList<$0.Venue> get venues => $_getList(2);

  @$pb.TagNumber(4)
  $pb.PbList<$core.String> get orderTypes => $_getList(3);

  @$pb.TagNumber(5)
  $core.bool get supportsAmend => $_getBF(4);
  @$pb.TagNumber(5)
  set supportsAmend($core.bool value) => $_setBool(4, value);
  @$pb.TagNumber(5)
  $core.bool hasSupportsAmend() => $_has(4);
  @$pb.TagNumber(5)
  void clearSupportsAmend() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.bool get supportsCancel => $_getBF(5);
  @$pb.TagNumber(6)
  set supportsCancel($core.bool value) => $_setBool(5, value);
  @$pb.TagNumber(6)
  $core.bool hasSupportsCancel() => $_has(5);
  @$pb.TagNumber(6)
  void clearSupportsCancel() => $_clearField(6);

  @$pb.TagNumber(7)
  $core.bool get supportsAccount => $_getBF(6);
  @$pb.TagNumber(7)
  set supportsAccount($core.bool value) => $_setBool(6, value);
  @$pb.TagNumber(7)
  $core.bool hasSupportsAccount() => $_has(6);
  @$pb.TagNumber(7)
  void clearSupportsAccount() => $_clearField(7);

  @$pb.TagNumber(8)
  $core.bool get supportsAuditTags => $_getBF(7);
  @$pb.TagNumber(8)
  set supportsAuditTags($core.bool value) => $_setBool(7, value);
  @$pb.TagNumber(8)
  $core.bool hasSupportsAuditTags() => $_has(7);
  @$pb.TagNumber(8)
  void clearSupportsAuditTags() => $_clearField(8);

  @$pb.TagNumber(9)
  $fixnum.Int64 get checkedAtUnixMs => $_getI64(8);
  @$pb.TagNumber(9)
  set checkedAtUnixMs($fixnum.Int64 value) => $_setInt64(8, value);
  @$pb.TagNumber(9)
  $core.bool hasCheckedAtUnixMs() => $_has(8);
  @$pb.TagNumber(9)
  void clearCheckedAtUnixMs() => $_clearField(9);
}

/// LiveOrderIntent mirrors the backtest/trading domain intent but belongs to
/// the live protobuf surface so live consumers can decode it without importing
/// backtest messages. Side/type/status stay string-typed to match the domain
/// vocabulary and to keep the lifecycle additive without new enums.
class LiveOrderIntent extends $pb.GeneratedMessage {
  factory LiveOrderIntent({
    $core.String? instrumentId,
    $core.String? side,
    $1.Quantity? quantity,
    $core.String? type,
    $core.String? timeInForce,
    $1.Price? limitPrice,
    $core.String? brokerClientId,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? customTags,
  }) {
    final result = create();
    if (instrumentId != null) result.instrumentId = instrumentId;
    if (side != null) result.side = side;
    if (quantity != null) result.quantity = quantity;
    if (type != null) result.type = type;
    if (timeInForce != null) result.timeInForce = timeInForce;
    if (limitPrice != null) result.limitPrice = limitPrice;
    if (brokerClientId != null) result.brokerClientId = brokerClientId;
    if (customTags != null) result.customTags.addEntries(customTags);
    return result;
  }

  LiveOrderIntent._();

  factory LiveOrderIntent.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveOrderIntent.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveOrderIntent',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'instrumentId')
    ..aOS(2, _omitFieldNames ? '' : 'side')
    ..aOM<$1.Quantity>(3, _omitFieldNames ? '' : 'quantity',
        subBuilder: $1.Quantity.create)
    ..aOS(4, _omitFieldNames ? '' : 'type')
    ..aOS(5, _omitFieldNames ? '' : 'timeInForce')
    ..aOM<$1.Price>(6, _omitFieldNames ? '' : 'limitPrice',
        subBuilder: $1.Price.create)
    ..aOS(7, _omitFieldNames ? '' : 'brokerClientId')
    ..m<$core.String, $core.String>(8, _omitFieldNames ? '' : 'customTags',
        entryClassName: 'LiveOrderIntent.CustomTagsEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('alt.v1'))
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveOrderIntent clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveOrderIntent copyWith(void Function(LiveOrderIntent) updates) =>
      super.copyWith((message) => updates(message as LiveOrderIntent))
          as LiveOrderIntent;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveOrderIntent create() => LiveOrderIntent._();
  @$core.override
  LiveOrderIntent createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveOrderIntent getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveOrderIntent>(create);
  static LiveOrderIntent? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get instrumentId => $_getSZ(0);
  @$pb.TagNumber(1)
  set instrumentId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasInstrumentId() => $_has(0);
  @$pb.TagNumber(1)
  void clearInstrumentId() => $_clearField(1);

  /// side is "buy" or "sell".
  @$pb.TagNumber(2)
  $core.String get side => $_getSZ(1);
  @$pb.TagNumber(2)
  set side($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasSide() => $_has(1);
  @$pb.TagNumber(2)
  void clearSide() => $_clearField(2);

  @$pb.TagNumber(3)
  $1.Quantity get quantity => $_getN(2);
  @$pb.TagNumber(3)
  set quantity($1.Quantity value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasQuantity() => $_has(2);
  @$pb.TagNumber(3)
  void clearQuantity() => $_clearField(3);
  @$pb.TagNumber(3)
  $1.Quantity ensureQuantity() => $_ensure(2);

  /// type is "market", "limit", or broker-specific (e.g. "kis_best_limit").
  @$pb.TagNumber(4)
  $core.String get type => $_getSZ(3);
  @$pb.TagNumber(4)
  set type($core.String value) => $_setString(3, value);
  @$pb.TagNumber(4)
  $core.bool hasType() => $_has(3);
  @$pb.TagNumber(4)
  void clearType() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.String get timeInForce => $_getSZ(4);
  @$pb.TagNumber(5)
  set timeInForce($core.String value) => $_setString(4, value);
  @$pb.TagNumber(5)
  $core.bool hasTimeInForce() => $_has(4);
  @$pb.TagNumber(5)
  void clearTimeInForce() => $_clearField(5);

  @$pb.TagNumber(6)
  $1.Price get limitPrice => $_getN(5);
  @$pb.TagNumber(6)
  set limitPrice($1.Price value) => $_setField(6, value);
  @$pb.TagNumber(6)
  $core.bool hasLimitPrice() => $_has(5);
  @$pb.TagNumber(6)
  void clearLimitPrice() => $_clearField(6);
  @$pb.TagNumber(6)
  $1.Price ensureLimitPrice() => $_ensure(5);

  @$pb.TagNumber(7)
  $core.String get brokerClientId => $_getSZ(6);
  @$pb.TagNumber(7)
  set brokerClientId($core.String value) => $_setString(6, value);
  @$pb.TagNumber(7)
  $core.bool hasBrokerClientId() => $_has(6);
  @$pb.TagNumber(7)
  void clearBrokerClientId() => $_clearField(7);

  @$pb.TagNumber(8)
  $pb.PbMap<$core.String, $core.String> get customTags => $_getMap(7);
}

/// LiveOrder is a broker-submitted order with execution status updates. It uses
/// string-typed side/type/status so unknown broker values are preserved.
class LiveOrder extends $pb.GeneratedMessage {
  factory LiveOrder({
    $core.String? id,
    $core.String? brokerId,
    $core.String? clientId,
    $core.String? accountId,
    $core.String? instrumentId,
    $core.String? side,
    $1.Quantity? quantity,
    $core.String? type,
    $core.String? timeInForce,
    $1.Price? limitPrice,
    $core.String? status,
    $core.String? brokerStatus,
    $2.BacktestTrade? fill,
    $core.String? rejectionReason,
    $fixnum.Int64? createdAtUnixMs,
    $fixnum.Int64? updatedAtUnixMs,
  }) {
    final result = create();
    if (id != null) result.id = id;
    if (brokerId != null) result.brokerId = brokerId;
    if (clientId != null) result.clientId = clientId;
    if (accountId != null) result.accountId = accountId;
    if (instrumentId != null) result.instrumentId = instrumentId;
    if (side != null) result.side = side;
    if (quantity != null) result.quantity = quantity;
    if (type != null) result.type = type;
    if (timeInForce != null) result.timeInForce = timeInForce;
    if (limitPrice != null) result.limitPrice = limitPrice;
    if (status != null) result.status = status;
    if (brokerStatus != null) result.brokerStatus = brokerStatus;
    if (fill != null) result.fill = fill;
    if (rejectionReason != null) result.rejectionReason = rejectionReason;
    if (createdAtUnixMs != null) result.createdAtUnixMs = createdAtUnixMs;
    if (updatedAtUnixMs != null) result.updatedAtUnixMs = updatedAtUnixMs;
    return result;
  }

  LiveOrder._();

  factory LiveOrder.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveOrder.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveOrder',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'id')
    ..aOS(2, _omitFieldNames ? '' : 'brokerId')
    ..aOS(3, _omitFieldNames ? '' : 'clientId')
    ..aOS(4, _omitFieldNames ? '' : 'accountId')
    ..aOS(5, _omitFieldNames ? '' : 'instrumentId')
    ..aOS(6, _omitFieldNames ? '' : 'side')
    ..aOM<$1.Quantity>(7, _omitFieldNames ? '' : 'quantity',
        subBuilder: $1.Quantity.create)
    ..aOS(8, _omitFieldNames ? '' : 'type')
    ..aOS(9, _omitFieldNames ? '' : 'timeInForce')
    ..aOM<$1.Price>(10, _omitFieldNames ? '' : 'limitPrice',
        subBuilder: $1.Price.create)
    ..aOS(11, _omitFieldNames ? '' : 'status')
    ..aOS(12, _omitFieldNames ? '' : 'brokerStatus')
    ..aOM<$2.BacktestTrade>(13, _omitFieldNames ? '' : 'fill',
        subBuilder: $2.BacktestTrade.create)
    ..aOS(14, _omitFieldNames ? '' : 'rejectionReason')
    ..aInt64(15, _omitFieldNames ? '' : 'createdAtUnixMs')
    ..aInt64(16, _omitFieldNames ? '' : 'updatedAtUnixMs')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveOrder clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveOrder copyWith(void Function(LiveOrder) updates) =>
      super.copyWith((message) => updates(message as LiveOrder)) as LiveOrder;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveOrder create() => LiveOrder._();
  @$core.override
  LiveOrder createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveOrder getDefault() =>
      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<LiveOrder>(create);
  static LiveOrder? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get id => $_getSZ(0);
  @$pb.TagNumber(1)
  set id($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasId() => $_has(0);
  @$pb.TagNumber(1)
  void clearId() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get brokerId => $_getSZ(1);
  @$pb.TagNumber(2)
  set brokerId($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasBrokerId() => $_has(1);
  @$pb.TagNumber(2)
  void clearBrokerId() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.String get clientId => $_getSZ(2);
  @$pb.TagNumber(3)
  set clientId($core.String value) => $_setString(2, value);
  @$pb.TagNumber(3)
  $core.bool hasClientId() => $_has(2);
  @$pb.TagNumber(3)
  void clearClientId() => $_clearField(3);

  @$pb.TagNumber(4)
  $core.String get accountId => $_getSZ(3);
  @$pb.TagNumber(4)
  set accountId($core.String value) => $_setString(3, value);
  @$pb.TagNumber(4)
  $core.bool hasAccountId() => $_has(3);
  @$pb.TagNumber(4)
  void clearAccountId() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.String get instrumentId => $_getSZ(4);
  @$pb.TagNumber(5)
  set instrumentId($core.String value) => $_setString(4, value);
  @$pb.TagNumber(5)
  $core.bool hasInstrumentId() => $_has(4);
  @$pb.TagNumber(5)
  void clearInstrumentId() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.String get side => $_getSZ(5);
  @$pb.TagNumber(6)
  set side($core.String value) => $_setString(5, value);
  @$pb.TagNumber(6)
  $core.bool hasSide() => $_has(5);
  @$pb.TagNumber(6)
  void clearSide() => $_clearField(6);

  @$pb.TagNumber(7)
  $1.Quantity get quantity => $_getN(6);
  @$pb.TagNumber(7)
  set quantity($1.Quantity value) => $_setField(7, value);
  @$pb.TagNumber(7)
  $core.bool hasQuantity() => $_has(6);
  @$pb.TagNumber(7)
  void clearQuantity() => $_clearField(7);
  @$pb.TagNumber(7)
  $1.Quantity ensureQuantity() => $_ensure(6);

  @$pb.TagNumber(8)
  $core.String get type => $_getSZ(7);
  @$pb.TagNumber(8)
  set type($core.String value) => $_setString(7, value);
  @$pb.TagNumber(8)
  $core.bool hasType() => $_has(7);
  @$pb.TagNumber(8)
  void clearType() => $_clearField(8);

  @$pb.TagNumber(9)
  $core.String get timeInForce => $_getSZ(8);
  @$pb.TagNumber(9)
  set timeInForce($core.String value) => $_setString(8, value);
  @$pb.TagNumber(9)
  $core.bool hasTimeInForce() => $_has(8);
  @$pb.TagNumber(9)
  void clearTimeInForce() => $_clearField(9);

  @$pb.TagNumber(10)
  $1.Price get limitPrice => $_getN(9);
  @$pb.TagNumber(10)
  set limitPrice($1.Price value) => $_setField(10, value);
  @$pb.TagNumber(10)
  $core.bool hasLimitPrice() => $_has(9);
  @$pb.TagNumber(10)
  void clearLimitPrice() => $_clearField(10);
  @$pb.TagNumber(10)
  $1.Price ensureLimitPrice() => $_ensure(9);

  @$pb.TagNumber(11)
  $core.String get status => $_getSZ(10);
  @$pb.TagNumber(11)
  set status($core.String value) => $_setString(10, value);
  @$pb.TagNumber(11)
  $core.bool hasStatus() => $_has(10);
  @$pb.TagNumber(11)
  void clearStatus() => $_clearField(11);

  /// broker_status mirrors the raw status reported by the broker.
  @$pb.TagNumber(12)
  $core.String get brokerStatus => $_getSZ(11);
  @$pb.TagNumber(12)
  set brokerStatus($core.String value) => $_setString(11, value);
  @$pb.TagNumber(12)
  $core.bool hasBrokerStatus() => $_has(11);
  @$pb.TagNumber(12)
  void clearBrokerStatus() => $_clearField(12);

  @$pb.TagNumber(13)
  $2.BacktestTrade get fill => $_getN(12);
  @$pb.TagNumber(13)
  set fill($2.BacktestTrade value) => $_setField(13, value);
  @$pb.TagNumber(13)
  $core.bool hasFill() => $_has(12);
  @$pb.TagNumber(13)
  void clearFill() => $_clearField(13);
  @$pb.TagNumber(13)
  $2.BacktestTrade ensureFill() => $_ensure(12);

  @$pb.TagNumber(14)
  $core.String get rejectionReason => $_getSZ(13);
  @$pb.TagNumber(14)
  set rejectionReason($core.String value) => $_setString(13, value);
  @$pb.TagNumber(14)
  $core.bool hasRejectionReason() => $_has(13);
  @$pb.TagNumber(14)
  void clearRejectionReason() => $_clearField(14);

  @$pb.TagNumber(15)
  $fixnum.Int64 get createdAtUnixMs => $_getI64(14);
  @$pb.TagNumber(15)
  set createdAtUnixMs($fixnum.Int64 value) => $_setInt64(14, value);
  @$pb.TagNumber(15)
  $core.bool hasCreatedAtUnixMs() => $_has(14);
  @$pb.TagNumber(15)
  void clearCreatedAtUnixMs() => $_clearField(15);

  @$pb.TagNumber(16)
  $fixnum.Int64 get updatedAtUnixMs => $_getI64(15);
  @$pb.TagNumber(16)
  set updatedAtUnixMs($fixnum.Int64 value) => $_setInt64(15, value);
  @$pb.TagNumber(16)
  $core.bool hasUpdatedAtUnixMs() => $_has(15);
  @$pb.TagNumber(16)
  void clearUpdatedAtUnixMs() => $_clearField(16);
}

/// LiveCashBalance is a single currency-denominated cash entry in a live account.
/// Raw account numbers and provider-specific identifiers are never included.
class LiveCashBalance extends $pb.GeneratedMessage {
  factory LiveCashBalance({
    $0.Currency? currency,
    $0.Decimal? amount,
  }) {
    final result = create();
    if (currency != null) result.currency = currency;
    if (amount != null) result.amount = amount;
    return result;
  }

  LiveCashBalance._();

  factory LiveCashBalance.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveCashBalance.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveCashBalance',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aE<$0.Currency>(1, _omitFieldNames ? '' : 'currency',
        enumValues: $0.Currency.values)
    ..aOM<$0.Decimal>(2, _omitFieldNames ? '' : 'amount',
        subBuilder: $0.Decimal.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveCashBalance clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveCashBalance copyWith(void Function(LiveCashBalance) updates) =>
      super.copyWith((message) => updates(message as LiveCashBalance))
          as LiveCashBalance;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveCashBalance create() => LiveCashBalance._();
  @$core.override
  LiveCashBalance createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveCashBalance getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveCashBalance>(create);
  static LiveCashBalance? _defaultInstance;

  @$pb.TagNumber(1)
  $0.Currency get currency => $_getN(0);
  @$pb.TagNumber(1)
  set currency($0.Currency value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasCurrency() => $_has(0);
  @$pb.TagNumber(1)
  void clearCurrency() => $_clearField(1);

  @$pb.TagNumber(2)
  $0.Decimal get amount => $_getN(1);
  @$pb.TagNumber(2)
  set amount($0.Decimal value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasAmount() => $_has(1);
  @$pb.TagNumber(2)
  void clearAmount() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.Decimal ensureAmount() => $_ensure(1);
}

/// LiveAccountSnapshot carries sanitized live account state from a broker.
/// Raw account numbers and provider payload are never exposed.
class LiveAccountSnapshot extends $pb.GeneratedMessage {
  factory LiveAccountSnapshot({
    $core.String? accountId,
    $core.String? broker,
    $core.Iterable<LiveCashBalance>? cash,
    $core.Iterable<LivePositionSnapshot>? positions,
    $fixnum.Int64? syncedAtUnixMs,
    $core.bool? stale,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    if (broker != null) result.broker = broker;
    if (cash != null) result.cash.addAll(cash);
    if (positions != null) result.positions.addAll(positions);
    if (syncedAtUnixMs != null) result.syncedAtUnixMs = syncedAtUnixMs;
    if (stale != null) result.stale = stale;
    return result;
  }

  LiveAccountSnapshot._();

  factory LiveAccountSnapshot.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveAccountSnapshot.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveAccountSnapshot',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..aOS(2, _omitFieldNames ? '' : 'broker')
    ..pPM<LiveCashBalance>(3, _omitFieldNames ? '' : 'cash',
        subBuilder: LiveCashBalance.create)
    ..pPM<LivePositionSnapshot>(4, _omitFieldNames ? '' : 'positions',
        subBuilder: LivePositionSnapshot.create)
    ..aInt64(5, _omitFieldNames ? '' : 'syncedAtUnixMs')
    ..aOB(6, _omitFieldNames ? '' : 'stale')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveAccountSnapshot clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveAccountSnapshot copyWith(void Function(LiveAccountSnapshot) updates) =>
      super.copyWith((message) => updates(message as LiveAccountSnapshot))
          as LiveAccountSnapshot;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveAccountSnapshot create() => LiveAccountSnapshot._();
  @$core.override
  LiveAccountSnapshot createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveAccountSnapshot getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveAccountSnapshot>(create);
  static LiveAccountSnapshot? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get broker => $_getSZ(1);
  @$pb.TagNumber(2)
  set broker($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasBroker() => $_has(1);
  @$pb.TagNumber(2)
  void clearBroker() => $_clearField(2);

  @$pb.TagNumber(3)
  $pb.PbList<LiveCashBalance> get cash => $_getList(2);

  @$pb.TagNumber(4)
  $pb.PbList<LivePositionSnapshot> get positions => $_getList(3);

  @$pb.TagNumber(5)
  $fixnum.Int64 get syncedAtUnixMs => $_getI64(4);
  @$pb.TagNumber(5)
  set syncedAtUnixMs($fixnum.Int64 value) => $_setInt64(4, value);
  @$pb.TagNumber(5)
  $core.bool hasSyncedAtUnixMs() => $_has(4);
  @$pb.TagNumber(5)
  void clearSyncedAtUnixMs() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.bool get stale => $_getBF(5);
  @$pb.TagNumber(6)
  set stale($core.bool value) => $_setBool(5, value);
  @$pb.TagNumber(6)
  $core.bool hasStale() => $_has(5);
  @$pb.TagNumber(6)
  void clearStale() => $_clearField(6);
}

/// SyncLiveAccountRequest triggers a fresh account snapshot fetch from the broker.
class SyncLiveAccountRequest extends $pb.GeneratedMessage {
  factory SyncLiveAccountRequest({
    $core.String? accountId,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    return result;
  }

  SyncLiveAccountRequest._();

  factory SyncLiveAccountRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory SyncLiveAccountRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SyncLiveAccountRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SyncLiveAccountRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SyncLiveAccountRequest copyWith(
          void Function(SyncLiveAccountRequest) updates) =>
      super.copyWith((message) => updates(message as SyncLiveAccountRequest))
          as SyncLiveAccountRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static SyncLiveAccountRequest create() => SyncLiveAccountRequest._();
  @$core.override
  SyncLiveAccountRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static SyncLiveAccountRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<SyncLiveAccountRequest>(create);
  static SyncLiveAccountRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);
}

/// SyncLiveAccountResponse returns the refreshed snapshot or a typed error.
class SyncLiveAccountResponse extends $pb.GeneratedMessage {
  factory SyncLiveAccountResponse({
    LiveAccountSnapshot? snapshot,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (snapshot != null) result.snapshot = snapshot;
    if (error != null) result.error = error;
    return result;
  }

  SyncLiveAccountResponse._();

  factory SyncLiveAccountResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory SyncLiveAccountResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SyncLiveAccountResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveAccountSnapshot>(1, _omitFieldNames ? '' : 'snapshot',
        subBuilder: LiveAccountSnapshot.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SyncLiveAccountResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SyncLiveAccountResponse copyWith(
          void Function(SyncLiveAccountResponse) updates) =>
      super.copyWith((message) => updates(message as SyncLiveAccountResponse))
          as SyncLiveAccountResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static SyncLiveAccountResponse create() => SyncLiveAccountResponse._();
  @$core.override
  SyncLiveAccountResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static SyncLiveAccountResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<SyncLiveAccountResponse>(create);
  static SyncLiveAccountResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveAccountSnapshot get snapshot => $_getN(0);
  @$pb.TagNumber(1)
  set snapshot(LiveAccountSnapshot value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasSnapshot() => $_has(0);
  @$pb.TagNumber(1)
  void clearSnapshot() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveAccountSnapshot ensureSnapshot() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// GetLiveAccountSnapshotRequest retrieves the last synced account snapshot.
class GetLiveAccountSnapshotRequest extends $pb.GeneratedMessage {
  factory GetLiveAccountSnapshotRequest({
    $core.String? accountId,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    return result;
  }

  GetLiveAccountSnapshotRequest._();

  factory GetLiveAccountSnapshotRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveAccountSnapshotRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveAccountSnapshotRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveAccountSnapshotRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveAccountSnapshotRequest copyWith(
          void Function(GetLiveAccountSnapshotRequest) updates) =>
      super.copyWith(
              (message) => updates(message as GetLiveAccountSnapshotRequest))
          as GetLiveAccountSnapshotRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveAccountSnapshotRequest create() =>
      GetLiveAccountSnapshotRequest._();
  @$core.override
  GetLiveAccountSnapshotRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveAccountSnapshotRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveAccountSnapshotRequest>(create);
  static GetLiveAccountSnapshotRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);
}

/// GetLiveAccountSnapshotResponse returns the cached snapshot or a typed error.
class GetLiveAccountSnapshotResponse extends $pb.GeneratedMessage {
  factory GetLiveAccountSnapshotResponse({
    LiveAccountSnapshot? snapshot,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (snapshot != null) result.snapshot = snapshot;
    if (error != null) result.error = error;
    return result;
  }

  GetLiveAccountSnapshotResponse._();

  factory GetLiveAccountSnapshotResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveAccountSnapshotResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveAccountSnapshotResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveAccountSnapshot>(1, _omitFieldNames ? '' : 'snapshot',
        subBuilder: LiveAccountSnapshot.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveAccountSnapshotResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveAccountSnapshotResponse copyWith(
          void Function(GetLiveAccountSnapshotResponse) updates) =>
      super.copyWith(
              (message) => updates(message as GetLiveAccountSnapshotResponse))
          as GetLiveAccountSnapshotResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveAccountSnapshotResponse create() =>
      GetLiveAccountSnapshotResponse._();
  @$core.override
  GetLiveAccountSnapshotResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveAccountSnapshotResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveAccountSnapshotResponse>(create);
  static GetLiveAccountSnapshotResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveAccountSnapshot get snapshot => $_getN(0);
  @$pb.TagNumber(1)
  set snapshot(LiveAccountSnapshot value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasSnapshot() => $_has(0);
  @$pb.TagNumber(1)
  void clearSnapshot() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveAccountSnapshot ensureSnapshot() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// LivePositionSnapshot is a single position inside a live account.
class LivePositionSnapshot extends $pb.GeneratedMessage {
  factory LivePositionSnapshot({
    $core.String? instrumentId,
    $core.String? side,
    $1.Quantity? quantity,
    $1.Price? avgPrice,
    $1.Price? currentPrice,
    $0.Decimal? marketValue,
    $0.Decimal? pnl,
  }) {
    final result = create();
    if (instrumentId != null) result.instrumentId = instrumentId;
    if (side != null) result.side = side;
    if (quantity != null) result.quantity = quantity;
    if (avgPrice != null) result.avgPrice = avgPrice;
    if (currentPrice != null) result.currentPrice = currentPrice;
    if (marketValue != null) result.marketValue = marketValue;
    if (pnl != null) result.pnl = pnl;
    return result;
  }

  LivePositionSnapshot._();

  factory LivePositionSnapshot.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LivePositionSnapshot.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LivePositionSnapshot',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'instrumentId')
    ..aOS(2, _omitFieldNames ? '' : 'side')
    ..aOM<$1.Quantity>(3, _omitFieldNames ? '' : 'quantity',
        subBuilder: $1.Quantity.create)
    ..aOM<$1.Price>(4, _omitFieldNames ? '' : 'avgPrice',
        subBuilder: $1.Price.create)
    ..aOM<$1.Price>(5, _omitFieldNames ? '' : 'currentPrice',
        subBuilder: $1.Price.create)
    ..aOM<$0.Decimal>(6, _omitFieldNames ? '' : 'marketValue',
        subBuilder: $0.Decimal.create)
    ..aOM<$0.Decimal>(7, _omitFieldNames ? '' : 'pnl',
        subBuilder: $0.Decimal.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LivePositionSnapshot clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LivePositionSnapshot copyWith(void Function(LivePositionSnapshot) updates) =>
      super.copyWith((message) => updates(message as LivePositionSnapshot))
          as LivePositionSnapshot;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LivePositionSnapshot create() => LivePositionSnapshot._();
  @$core.override
  LivePositionSnapshot createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LivePositionSnapshot getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LivePositionSnapshot>(create);
  static LivePositionSnapshot? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get instrumentId => $_getSZ(0);
  @$pb.TagNumber(1)
  set instrumentId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasInstrumentId() => $_has(0);
  @$pb.TagNumber(1)
  void clearInstrumentId() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get side => $_getSZ(1);
  @$pb.TagNumber(2)
  set side($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasSide() => $_has(1);
  @$pb.TagNumber(2)
  void clearSide() => $_clearField(2);

  @$pb.TagNumber(3)
  $1.Quantity get quantity => $_getN(2);
  @$pb.TagNumber(3)
  set quantity($1.Quantity value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasQuantity() => $_has(2);
  @$pb.TagNumber(3)
  void clearQuantity() => $_clearField(3);
  @$pb.TagNumber(3)
  $1.Quantity ensureQuantity() => $_ensure(2);

  @$pb.TagNumber(4)
  $1.Price get avgPrice => $_getN(3);
  @$pb.TagNumber(4)
  set avgPrice($1.Price value) => $_setField(4, value);
  @$pb.TagNumber(4)
  $core.bool hasAvgPrice() => $_has(3);
  @$pb.TagNumber(4)
  void clearAvgPrice() => $_clearField(4);
  @$pb.TagNumber(4)
  $1.Price ensureAvgPrice() => $_ensure(3);

  @$pb.TagNumber(5)
  $1.Price get currentPrice => $_getN(4);
  @$pb.TagNumber(5)
  set currentPrice($1.Price value) => $_setField(5, value);
  @$pb.TagNumber(5)
  $core.bool hasCurrentPrice() => $_has(4);
  @$pb.TagNumber(5)
  void clearCurrentPrice() => $_clearField(5);
  @$pb.TagNumber(5)
  $1.Price ensureCurrentPrice() => $_ensure(4);

  @$pb.TagNumber(6)
  $0.Decimal get marketValue => $_getN(5);
  @$pb.TagNumber(6)
  set marketValue($0.Decimal value) => $_setField(6, value);
  @$pb.TagNumber(6)
  $core.bool hasMarketValue() => $_has(5);
  @$pb.TagNumber(6)
  void clearMarketValue() => $_clearField(6);
  @$pb.TagNumber(6)
  $0.Decimal ensureMarketValue() => $_ensure(5);

  @$pb.TagNumber(7)
  $0.Decimal get pnl => $_getN(6);
  @$pb.TagNumber(7)
  set pnl($0.Decimal value) => $_setField(7, value);
  @$pb.TagNumber(7)
  $core.bool hasPnl() => $_has(6);
  @$pb.TagNumber(7)
  void clearPnl() => $_clearField(7);
  @$pb.TagNumber(7)
  $0.Decimal ensurePnl() => $_ensure(6);
}

/// LiveAuditEvent is a durable, broker-neutral record of a live operation event.
/// Payload must never carry raw tokens, account numbers, or provider bodies.
class LiveAuditEvent extends $pb.GeneratedMessage {
  factory LiveAuditEvent({
    $core.String? type,
    $fixnum.Int64? timestampUnixMs,
    $core.String? broker,
    $core.String? accountId,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? payload,
    $core.String? eventId,
    $core.String? orderId,
    $core.String? status,
    $core.String? reason,
    $core.String? actor,
    $core.String? correlationId,
  }) {
    final result = create();
    if (type != null) result.type = type;
    if (timestampUnixMs != null) result.timestampUnixMs = timestampUnixMs;
    if (broker != null) result.broker = broker;
    if (accountId != null) result.accountId = accountId;
    if (payload != null) result.payload.addEntries(payload);
    if (eventId != null) result.eventId = eventId;
    if (orderId != null) result.orderId = orderId;
    if (status != null) result.status = status;
    if (reason != null) result.reason = reason;
    if (actor != null) result.actor = actor;
    if (correlationId != null) result.correlationId = correlationId;
    return result;
  }

  LiveAuditEvent._();

  factory LiveAuditEvent.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveAuditEvent.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveAuditEvent',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'type')
    ..aInt64(2, _omitFieldNames ? '' : 'timestampUnixMs')
    ..aOS(3, _omitFieldNames ? '' : 'broker')
    ..aOS(4, _omitFieldNames ? '' : 'accountId')
    ..m<$core.String, $core.String>(5, _omitFieldNames ? '' : 'payload',
        entryClassName: 'LiveAuditEvent.PayloadEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('alt.v1'))
    ..aOS(6, _omitFieldNames ? '' : 'eventId')
    ..aOS(7, _omitFieldNames ? '' : 'orderId')
    ..aOS(8, _omitFieldNames ? '' : 'status')
    ..aOS(9, _omitFieldNames ? '' : 'reason')
    ..aOS(10, _omitFieldNames ? '' : 'actor')
    ..aOS(11, _omitFieldNames ? '' : 'correlationId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveAuditEvent clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveAuditEvent copyWith(void Function(LiveAuditEvent) updates) =>
      super.copyWith((message) => updates(message as LiveAuditEvent))
          as LiveAuditEvent;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveAuditEvent create() => LiveAuditEvent._();
  @$core.override
  LiveAuditEvent createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveAuditEvent getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveAuditEvent>(create);
  static LiveAuditEvent? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get type => $_getSZ(0);
  @$pb.TagNumber(1)
  set type($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasType() => $_has(0);
  @$pb.TagNumber(1)
  void clearType() => $_clearField(1);

  @$pb.TagNumber(2)
  $fixnum.Int64 get timestampUnixMs => $_getI64(1);
  @$pb.TagNumber(2)
  set timestampUnixMs($fixnum.Int64 value) => $_setInt64(1, value);
  @$pb.TagNumber(2)
  $core.bool hasTimestampUnixMs() => $_has(1);
  @$pb.TagNumber(2)
  void clearTimestampUnixMs() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.String get broker => $_getSZ(2);
  @$pb.TagNumber(3)
  set broker($core.String value) => $_setString(2, value);
  @$pb.TagNumber(3)
  $core.bool hasBroker() => $_has(2);
  @$pb.TagNumber(3)
  void clearBroker() => $_clearField(3);

  @$pb.TagNumber(4)
  $core.String get accountId => $_getSZ(3);
  @$pb.TagNumber(4)
  set accountId($core.String value) => $_setString(3, value);
  @$pb.TagNumber(4)
  $core.bool hasAccountId() => $_has(3);
  @$pb.TagNumber(4)
  void clearAccountId() => $_clearField(4);

  @$pb.TagNumber(5)
  $pb.PbMap<$core.String, $core.String> get payload => $_getMap(4);

  @$pb.TagNumber(6)
  $core.String get eventId => $_getSZ(5);
  @$pb.TagNumber(6)
  set eventId($core.String value) => $_setString(5, value);
  @$pb.TagNumber(6)
  $core.bool hasEventId() => $_has(5);
  @$pb.TagNumber(6)
  void clearEventId() => $_clearField(6);

  @$pb.TagNumber(7)
  $core.String get orderId => $_getSZ(6);
  @$pb.TagNumber(7)
  set orderId($core.String value) => $_setString(6, value);
  @$pb.TagNumber(7)
  $core.bool hasOrderId() => $_has(6);
  @$pb.TagNumber(7)
  void clearOrderId() => $_clearField(7);

  @$pb.TagNumber(8)
  $core.String get status => $_getSZ(7);
  @$pb.TagNumber(8)
  set status($core.String value) => $_setString(7, value);
  @$pb.TagNumber(8)
  $core.bool hasStatus() => $_has(7);
  @$pb.TagNumber(8)
  void clearStatus() => $_clearField(8);

  @$pb.TagNumber(9)
  $core.String get reason => $_getSZ(8);
  @$pb.TagNumber(9)
  set reason($core.String value) => $_setString(8, value);
  @$pb.TagNumber(9)
  $core.bool hasReason() => $_has(8);
  @$pb.TagNumber(9)
  void clearReason() => $_clearField(9);

  @$pb.TagNumber(10)
  $core.String get actor => $_getSZ(9);
  @$pb.TagNumber(10)
  set actor($core.String value) => $_setString(9, value);
  @$pb.TagNumber(10)
  $core.bool hasActor() => $_has(9);
  @$pb.TagNumber(10)
  void clearActor() => $_clearField(10);

  @$pb.TagNumber(11)
  $core.String get correlationId => $_getSZ(10);
  @$pb.TagNumber(11)
  set correlationId($core.String value) => $_setString(10, value);
  @$pb.TagNumber(11)
  $core.bool hasCorrelationId() => $_has(10);
  @$pb.TagNumber(11)
  void clearCorrelationId() => $_clearField(11);
}

/// ListLiveAuditEventsRequest queries the durable audit trail with optional
/// filters by account, order, and event type.
class ListLiveAuditEventsRequest extends $pb.GeneratedMessage {
  factory ListLiveAuditEventsRequest({
    $core.String? accountId,
    $core.String? orderId,
    $core.String? eventType,
    $core.int? limit,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    if (orderId != null) result.orderId = orderId;
    if (eventType != null) result.eventType = eventType;
    if (limit != null) result.limit = limit;
    return result;
  }

  ListLiveAuditEventsRequest._();

  factory ListLiveAuditEventsRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory ListLiveAuditEventsRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ListLiveAuditEventsRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..aOS(2, _omitFieldNames ? '' : 'orderId')
    ..aOS(3, _omitFieldNames ? '' : 'eventType')
    ..aI(4, _omitFieldNames ? '' : 'limit')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  ListLiveAuditEventsRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  ListLiveAuditEventsRequest copyWith(
          void Function(ListLiveAuditEventsRequest) updates) =>
      super.copyWith(
              (message) => updates(message as ListLiveAuditEventsRequest))
          as ListLiveAuditEventsRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static ListLiveAuditEventsRequest create() => ListLiveAuditEventsRequest._();
  @$core.override
  ListLiveAuditEventsRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static ListLiveAuditEventsRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<ListLiveAuditEventsRequest>(create);
  static ListLiveAuditEventsRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get orderId => $_getSZ(1);
  @$pb.TagNumber(2)
  set orderId($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasOrderId() => $_has(1);
  @$pb.TagNumber(2)
  void clearOrderId() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.String get eventType => $_getSZ(2);
  @$pb.TagNumber(3)
  set eventType($core.String value) => $_setString(2, value);
  @$pb.TagNumber(3)
  $core.bool hasEventType() => $_has(2);
  @$pb.TagNumber(3)
  void clearEventType() => $_clearField(3);

  @$pb.TagNumber(4)
  $core.int get limit => $_getIZ(3);
  @$pb.TagNumber(4)
  set limit($core.int value) => $_setSignedInt32(3, value);
  @$pb.TagNumber(4)
  $core.bool hasLimit() => $_has(3);
  @$pb.TagNumber(4)
  void clearLimit() => $_clearField(4);
}

/// ListLiveAuditEventsResponse returns the matching audit event records or a
/// typed error.
class ListLiveAuditEventsResponse extends $pb.GeneratedMessage {
  factory ListLiveAuditEventsResponse({
    $core.Iterable<LiveAuditEvent>? events,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (events != null) result.events.addAll(events);
    if (error != null) result.error = error;
    return result;
  }

  ListLiveAuditEventsResponse._();

  factory ListLiveAuditEventsResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory ListLiveAuditEventsResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ListLiveAuditEventsResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..pPM<LiveAuditEvent>(1, _omitFieldNames ? '' : 'events',
        subBuilder: LiveAuditEvent.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  ListLiveAuditEventsResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  ListLiveAuditEventsResponse copyWith(
          void Function(ListLiveAuditEventsResponse) updates) =>
      super.copyWith(
              (message) => updates(message as ListLiveAuditEventsResponse))
          as ListLiveAuditEventsResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static ListLiveAuditEventsResponse create() =>
      ListLiveAuditEventsResponse._();
  @$core.override
  ListLiveAuditEventsResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static ListLiveAuditEventsResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<ListLiveAuditEventsResponse>(create);
  static ListLiveAuditEventsResponse? _defaultInstance;

  @$pb.TagNumber(1)
  $pb.PbList<LiveAuditEvent> get events => $_getList(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// OperatorConfirmation is the explicit operator gate required before any live
/// order reaches the broker. A missing or unconfirmed field causes the worker to
/// return invalid_request without touching the broker.
class OperatorConfirmation extends $pb.GeneratedMessage {
  factory OperatorConfirmation({
    $core.bool? confirmed,
    $core.String? operatorId,
    $core.String? reason,
    $fixnum.Int64? confirmedAtUnixMs,
  }) {
    final result = create();
    if (confirmed != null) result.confirmed = confirmed;
    if (operatorId != null) result.operatorId = operatorId;
    if (reason != null) result.reason = reason;
    if (confirmedAtUnixMs != null) result.confirmedAtUnixMs = confirmedAtUnixMs;
    return result;
  }

  OperatorConfirmation._();

  factory OperatorConfirmation.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory OperatorConfirmation.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'OperatorConfirmation',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOB(1, _omitFieldNames ? '' : 'confirmed')
    ..aOS(2, _omitFieldNames ? '' : 'operatorId')
    ..aOS(3, _omitFieldNames ? '' : 'reason')
    ..aInt64(4, _omitFieldNames ? '' : 'confirmedAtUnixMs')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  OperatorConfirmation clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  OperatorConfirmation copyWith(void Function(OperatorConfirmation) updates) =>
      super.copyWith((message) => updates(message as OperatorConfirmation))
          as OperatorConfirmation;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static OperatorConfirmation create() => OperatorConfirmation._();
  @$core.override
  OperatorConfirmation createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static OperatorConfirmation getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<OperatorConfirmation>(create);
  static OperatorConfirmation? _defaultInstance;

  @$pb.TagNumber(1)
  $core.bool get confirmed => $_getBF(0);
  @$pb.TagNumber(1)
  set confirmed($core.bool value) => $_setBool(0, value);
  @$pb.TagNumber(1)
  $core.bool hasConfirmed() => $_has(0);
  @$pb.TagNumber(1)
  void clearConfirmed() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get operatorId => $_getSZ(1);
  @$pb.TagNumber(2)
  set operatorId($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasOperatorId() => $_has(1);
  @$pb.TagNumber(2)
  void clearOperatorId() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.String get reason => $_getSZ(2);
  @$pb.TagNumber(3)
  set reason($core.String value) => $_setString(2, value);
  @$pb.TagNumber(3)
  $core.bool hasReason() => $_has(2);
  @$pb.TagNumber(3)
  void clearReason() => $_clearField(3);

  @$pb.TagNumber(4)
  $fixnum.Int64 get confirmedAtUnixMs => $_getI64(3);
  @$pb.TagNumber(4)
  set confirmedAtUnixMs($fixnum.Int64 value) => $_setInt64(3, value);
  @$pb.TagNumber(4)
  $core.bool hasConfirmedAtUnixMs() => $_has(3);
  @$pb.TagNumber(4)
  void clearConfirmedAtUnixMs() => $_clearField(4);
}

/// SubmitLiveOrderRequest submits a live order through the broker. The
/// operator_confirmation gate must be present and confirmed=true or the worker
/// returns invalid_request.
class SubmitLiveOrderRequest extends $pb.GeneratedMessage {
  factory SubmitLiveOrderRequest({
    $core.String? accountId,
    LiveOrderIntent? intent,
    OperatorConfirmation? operatorConfirmation,
    $core.String? idempotencyKey,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    if (intent != null) result.intent = intent;
    if (operatorConfirmation != null)
      result.operatorConfirmation = operatorConfirmation;
    if (idempotencyKey != null) result.idempotencyKey = idempotencyKey;
    return result;
  }

  SubmitLiveOrderRequest._();

  factory SubmitLiveOrderRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory SubmitLiveOrderRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SubmitLiveOrderRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..aOM<LiveOrderIntent>(2, _omitFieldNames ? '' : 'intent',
        subBuilder: LiveOrderIntent.create)
    ..aOM<OperatorConfirmation>(
        3, _omitFieldNames ? '' : 'operatorConfirmation',
        subBuilder: OperatorConfirmation.create)
    ..aOS(4, _omitFieldNames ? '' : 'idempotencyKey')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SubmitLiveOrderRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SubmitLiveOrderRequest copyWith(
          void Function(SubmitLiveOrderRequest) updates) =>
      super.copyWith((message) => updates(message as SubmitLiveOrderRequest))
          as SubmitLiveOrderRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static SubmitLiveOrderRequest create() => SubmitLiveOrderRequest._();
  @$core.override
  SubmitLiveOrderRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static SubmitLiveOrderRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<SubmitLiveOrderRequest>(create);
  static SubmitLiveOrderRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);

  @$pb.TagNumber(2)
  LiveOrderIntent get intent => $_getN(1);
  @$pb.TagNumber(2)
  set intent(LiveOrderIntent value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasIntent() => $_has(1);
  @$pb.TagNumber(2)
  void clearIntent() => $_clearField(2);
  @$pb.TagNumber(2)
  LiveOrderIntent ensureIntent() => $_ensure(1);

  @$pb.TagNumber(3)
  OperatorConfirmation get operatorConfirmation => $_getN(2);
  @$pb.TagNumber(3)
  set operatorConfirmation(OperatorConfirmation value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasOperatorConfirmation() => $_has(2);
  @$pb.TagNumber(3)
  void clearOperatorConfirmation() => $_clearField(3);
  @$pb.TagNumber(3)
  OperatorConfirmation ensureOperatorConfirmation() => $_ensure(2);

  @$pb.TagNumber(4)
  $core.String get idempotencyKey => $_getSZ(3);
  @$pb.TagNumber(4)
  set idempotencyKey($core.String value) => $_setString(3, value);
  @$pb.TagNumber(4)
  $core.bool hasIdempotencyKey() => $_has(3);
  @$pb.TagNumber(4)
  void clearIdempotencyKey() => $_clearField(4);
}

/// LiveRiskDecision carries the outcome of a risk policy evaluation for a live
/// order submission. It is included in SubmitLiveOrderResponse when the risk
/// guard blocked the order so headless operators can surface the denial reason
/// alongside the rejected order record.
class LiveRiskDecision extends $pb.GeneratedMessage {
  factory LiveRiskDecision({
    $core.bool? allowed,
    $core.String? reason,
  }) {
    final result = create();
    if (allowed != null) result.allowed = allowed;
    if (reason != null) result.reason = reason;
    return result;
  }

  LiveRiskDecision._();

  factory LiveRiskDecision.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveRiskDecision.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveRiskDecision',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOB(1, _omitFieldNames ? '' : 'allowed')
    ..aOS(2, _omitFieldNames ? '' : 'reason')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveRiskDecision clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveRiskDecision copyWith(void Function(LiveRiskDecision) updates) =>
      super.copyWith((message) => updates(message as LiveRiskDecision))
          as LiveRiskDecision;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveRiskDecision create() => LiveRiskDecision._();
  @$core.override
  LiveRiskDecision createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveRiskDecision getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveRiskDecision>(create);
  static LiveRiskDecision? _defaultInstance;

  @$pb.TagNumber(1)
  $core.bool get allowed => $_getBF(0);
  @$pb.TagNumber(1)
  set allowed($core.bool value) => $_setBool(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAllowed() => $_has(0);
  @$pb.TagNumber(1)
  void clearAllowed() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get reason => $_getSZ(1);
  @$pb.TagNumber(2)
  set reason($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasReason() => $_has(1);
  @$pb.TagNumber(2)
  void clearReason() => $_clearField(2);
}

/// SubmitLiveOrderResponse carries the submitted live order or a typed error.
/// When the order was blocked by the risk policy, order carries the rejected
/// in-memory record and risk_decision carries the denial reason.
class SubmitLiveOrderResponse extends $pb.GeneratedMessage {
  factory SubmitLiveOrderResponse({
    LiveOrder? order,
    $0.ErrorInfo? error,
    LiveRiskDecision? riskDecision,
  }) {
    final result = create();
    if (order != null) result.order = order;
    if (error != null) result.error = error;
    if (riskDecision != null) result.riskDecision = riskDecision;
    return result;
  }

  SubmitLiveOrderResponse._();

  factory SubmitLiveOrderResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory SubmitLiveOrderResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SubmitLiveOrderResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveOrder>(1, _omitFieldNames ? '' : 'order',
        subBuilder: LiveOrder.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..aOM<LiveRiskDecision>(3, _omitFieldNames ? '' : 'riskDecision',
        subBuilder: LiveRiskDecision.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SubmitLiveOrderResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SubmitLiveOrderResponse copyWith(
          void Function(SubmitLiveOrderResponse) updates) =>
      super.copyWith((message) => updates(message as SubmitLiveOrderResponse))
          as SubmitLiveOrderResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static SubmitLiveOrderResponse create() => SubmitLiveOrderResponse._();
  @$core.override
  SubmitLiveOrderResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static SubmitLiveOrderResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<SubmitLiveOrderResponse>(create);
  static SubmitLiveOrderResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveOrder get order => $_getN(0);
  @$pb.TagNumber(1)
  set order(LiveOrder value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasOrder() => $_has(0);
  @$pb.TagNumber(1)
  void clearOrder() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveOrder ensureOrder() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);

  @$pb.TagNumber(3)
  LiveRiskDecision get riskDecision => $_getN(2);
  @$pb.TagNumber(3)
  set riskDecision(LiveRiskDecision value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasRiskDecision() => $_has(2);
  @$pb.TagNumber(3)
  void clearRiskDecision() => $_clearField(3);
  @$pb.TagNumber(3)
  LiveRiskDecision ensureRiskDecision() => $_ensure(2);
}

/// CancelLiveOrderRequest cancels a pending live order by its live order id.
class CancelLiveOrderRequest extends $pb.GeneratedMessage {
  factory CancelLiveOrderRequest({
    $core.String? accountId,
    $core.String? liveOrderId,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    if (liveOrderId != null) result.liveOrderId = liveOrderId;
    return result;
  }

  CancelLiveOrderRequest._();

  factory CancelLiveOrderRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory CancelLiveOrderRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'CancelLiveOrderRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..aOS(2, _omitFieldNames ? '' : 'liveOrderId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  CancelLiveOrderRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  CancelLiveOrderRequest copyWith(
          void Function(CancelLiveOrderRequest) updates) =>
      super.copyWith((message) => updates(message as CancelLiveOrderRequest))
          as CancelLiveOrderRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static CancelLiveOrderRequest create() => CancelLiveOrderRequest._();
  @$core.override
  CancelLiveOrderRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static CancelLiveOrderRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<CancelLiveOrderRequest>(create);
  static CancelLiveOrderRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get liveOrderId => $_getSZ(1);
  @$pb.TagNumber(2)
  set liveOrderId($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasLiveOrderId() => $_has(1);
  @$pb.TagNumber(2)
  void clearLiveOrderId() => $_clearField(2);
}

/// CancelLiveOrderResponse carries the cancelled order or a typed error.
class CancelLiveOrderResponse extends $pb.GeneratedMessage {
  factory CancelLiveOrderResponse({
    LiveOrder? order,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (order != null) result.order = order;
    if (error != null) result.error = error;
    return result;
  }

  CancelLiveOrderResponse._();

  factory CancelLiveOrderResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory CancelLiveOrderResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'CancelLiveOrderResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveOrder>(1, _omitFieldNames ? '' : 'order',
        subBuilder: LiveOrder.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  CancelLiveOrderResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  CancelLiveOrderResponse copyWith(
          void Function(CancelLiveOrderResponse) updates) =>
      super.copyWith((message) => updates(message as CancelLiveOrderResponse))
          as CancelLiveOrderResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static CancelLiveOrderResponse create() => CancelLiveOrderResponse._();
  @$core.override
  CancelLiveOrderResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static CancelLiveOrderResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<CancelLiveOrderResponse>(create);
  static CancelLiveOrderResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveOrder get order => $_getN(0);
  @$pb.TagNumber(1)
  set order(LiveOrder value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasOrder() => $_has(0);
  @$pb.TagNumber(1)
  void clearOrder() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveOrder ensureOrder() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// GetLiveOrderRequest retrieves the current state of a live order.
class GetLiveOrderRequest extends $pb.GeneratedMessage {
  factory GetLiveOrderRequest({
    $core.String? accountId,
    $core.String? liveOrderId,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    if (liveOrderId != null) result.liveOrderId = liveOrderId;
    return result;
  }

  GetLiveOrderRequest._();

  factory GetLiveOrderRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveOrderRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveOrderRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..aOS(2, _omitFieldNames ? '' : 'liveOrderId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveOrderRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveOrderRequest copyWith(void Function(GetLiveOrderRequest) updates) =>
      super.copyWith((message) => updates(message as GetLiveOrderRequest))
          as GetLiveOrderRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveOrderRequest create() => GetLiveOrderRequest._();
  @$core.override
  GetLiveOrderRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveOrderRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveOrderRequest>(create);
  static GetLiveOrderRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get liveOrderId => $_getSZ(1);
  @$pb.TagNumber(2)
  set liveOrderId($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasLiveOrderId() => $_has(1);
  @$pb.TagNumber(2)
  void clearLiveOrderId() => $_clearField(2);
}

/// GetLiveOrderResponse carries the retrieved live order or a typed error.
class GetLiveOrderResponse extends $pb.GeneratedMessage {
  factory GetLiveOrderResponse({
    LiveOrder? order,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (order != null) result.order = order;
    if (error != null) result.error = error;
    return result;
  }

  GetLiveOrderResponse._();

  factory GetLiveOrderResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveOrderResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveOrderResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveOrder>(1, _omitFieldNames ? '' : 'order',
        subBuilder: LiveOrder.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveOrderResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveOrderResponse copyWith(void Function(GetLiveOrderResponse) updates) =>
      super.copyWith((message) => updates(message as GetLiveOrderResponse))
          as GetLiveOrderResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveOrderResponse create() => GetLiveOrderResponse._();
  @$core.override
  GetLiveOrderResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveOrderResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveOrderResponse>(create);
  static GetLiveOrderResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveOrder get order => $_getN(0);
  @$pb.TagNumber(1)
  set order(LiveOrder value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasOrder() => $_has(0);
  @$pb.TagNumber(1)
  void clearOrder() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveOrder ensureOrder() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// LiveRiskPolicy describes the active risk limits applied before any live order
/// reaches the broker. All limits are adjustable at runtime; a zero value for
/// a numeric limit means the limit is not enforced.
class LiveRiskPolicy extends $pb.GeneratedMessage {
  factory LiveRiskPolicy({
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>?
        maxOrderNotionalByCurrency,
    $core.int? maxDailyOrders,
    $core.int? maxOpenOrders,
    $core.bool? allowShortSelling,
  }) {
    final result = create();
    if (maxOrderNotionalByCurrency != null)
      result.maxOrderNotionalByCurrency.addEntries(maxOrderNotionalByCurrency);
    if (maxDailyOrders != null) result.maxDailyOrders = maxDailyOrders;
    if (maxOpenOrders != null) result.maxOpenOrders = maxOpenOrders;
    if (allowShortSelling != null) result.allowShortSelling = allowShortSelling;
    return result;
  }

  LiveRiskPolicy._();

  factory LiveRiskPolicy.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveRiskPolicy.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveRiskPolicy',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..m<$core.String, $core.String>(
        1, _omitFieldNames ? '' : 'maxOrderNotionalByCurrency',
        entryClassName: 'LiveRiskPolicy.MaxOrderNotionalByCurrencyEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('alt.v1'))
    ..aI(2, _omitFieldNames ? '' : 'maxDailyOrders')
    ..aI(3, _omitFieldNames ? '' : 'maxOpenOrders')
    ..aOB(4, _omitFieldNames ? '' : 'allowShortSelling')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveRiskPolicy clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveRiskPolicy copyWith(void Function(LiveRiskPolicy) updates) =>
      super.copyWith((message) => updates(message as LiveRiskPolicy))
          as LiveRiskPolicy;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveRiskPolicy create() => LiveRiskPolicy._();
  @$core.override
  LiveRiskPolicy createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveRiskPolicy getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveRiskPolicy>(create);
  static LiveRiskPolicy? _defaultInstance;

  /// max_order_notional_by_currency maps a currency code (e.g. "KRW", "USD")
  /// to the maximum allowed notional value per order as a decimal string.
  @$pb.TagNumber(1)
  $pb.PbMap<$core.String, $core.String> get maxOrderNotionalByCurrency =>
      $_getMap(0);

  @$pb.TagNumber(2)
  $core.int get maxDailyOrders => $_getIZ(1);
  @$pb.TagNumber(2)
  set maxDailyOrders($core.int value) => $_setSignedInt32(1, value);
  @$pb.TagNumber(2)
  $core.bool hasMaxDailyOrders() => $_has(1);
  @$pb.TagNumber(2)
  void clearMaxDailyOrders() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.int get maxOpenOrders => $_getIZ(2);
  @$pb.TagNumber(3)
  set maxOpenOrders($core.int value) => $_setSignedInt32(2, value);
  @$pb.TagNumber(3)
  $core.bool hasMaxOpenOrders() => $_has(2);
  @$pb.TagNumber(3)
  void clearMaxOpenOrders() => $_clearField(3);

  @$pb.TagNumber(4)
  $core.bool get allowShortSelling => $_getBF(3);
  @$pb.TagNumber(4)
  set allowShortSelling($core.bool value) => $_setBool(3, value);
  @$pb.TagNumber(4)
  $core.bool hasAllowShortSelling() => $_has(3);
  @$pb.TagNumber(4)
  void clearAllowShortSelling() => $_clearField(4);
}

/// LiveKillSwitchState captures whether live order submission is globally halted.
/// The safe default is halted=true; operators must explicitly disable the kill
/// switch before any live order can reach the broker.
class LiveKillSwitchState extends $pb.GeneratedMessage {
  factory LiveKillSwitchState({
    $core.bool? halted,
    $core.String? reason,
  }) {
    final result = create();
    if (halted != null) result.halted = halted;
    if (reason != null) result.reason = reason;
    return result;
  }

  LiveKillSwitchState._();

  factory LiveKillSwitchState.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory LiveKillSwitchState.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'LiveKillSwitchState',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOB(1, _omitFieldNames ? '' : 'halted')
    ..aOS(2, _omitFieldNames ? '' : 'reason')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveKillSwitchState clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  LiveKillSwitchState copyWith(void Function(LiveKillSwitchState) updates) =>
      super.copyWith((message) => updates(message as LiveKillSwitchState))
          as LiveKillSwitchState;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static LiveKillSwitchState create() => LiveKillSwitchState._();
  @$core.override
  LiveKillSwitchState createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static LiveKillSwitchState getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<LiveKillSwitchState>(create);
  static LiveKillSwitchState? _defaultInstance;

  @$pb.TagNumber(1)
  $core.bool get halted => $_getBF(0);
  @$pb.TagNumber(1)
  set halted($core.bool value) => $_setBool(0, value);
  @$pb.TagNumber(1)
  $core.bool hasHalted() => $_has(0);
  @$pb.TagNumber(1)
  void clearHalted() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.String get reason => $_getSZ(1);
  @$pb.TagNumber(2)
  set reason($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasReason() => $_has(1);
  @$pb.TagNumber(2)
  void clearReason() => $_clearField(2);
}

/// GetLiveRiskPolicyRequest queries the active risk policy for a live account.
class GetLiveRiskPolicyRequest extends $pb.GeneratedMessage {
  factory GetLiveRiskPolicyRequest({
    $core.String? accountId,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    return result;
  }

  GetLiveRiskPolicyRequest._();

  factory GetLiveRiskPolicyRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveRiskPolicyRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveRiskPolicyRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveRiskPolicyRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveRiskPolicyRequest copyWith(
          void Function(GetLiveRiskPolicyRequest) updates) =>
      super.copyWith((message) => updates(message as GetLiveRiskPolicyRequest))
          as GetLiveRiskPolicyRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveRiskPolicyRequest create() => GetLiveRiskPolicyRequest._();
  @$core.override
  GetLiveRiskPolicyRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveRiskPolicyRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveRiskPolicyRequest>(create);
  static GetLiveRiskPolicyRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);
}

/// GetLiveRiskPolicyResponse returns the active risk policy or a typed error.
class GetLiveRiskPolicyResponse extends $pb.GeneratedMessage {
  factory GetLiveRiskPolicyResponse({
    LiveRiskPolicy? policy,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (policy != null) result.policy = policy;
    if (error != null) result.error = error;
    return result;
  }

  GetLiveRiskPolicyResponse._();

  factory GetLiveRiskPolicyResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveRiskPolicyResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveRiskPolicyResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveRiskPolicy>(1, _omitFieldNames ? '' : 'policy',
        subBuilder: LiveRiskPolicy.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveRiskPolicyResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveRiskPolicyResponse copyWith(
          void Function(GetLiveRiskPolicyResponse) updates) =>
      super.copyWith((message) => updates(message as GetLiveRiskPolicyResponse))
          as GetLiveRiskPolicyResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveRiskPolicyResponse create() => GetLiveRiskPolicyResponse._();
  @$core.override
  GetLiveRiskPolicyResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveRiskPolicyResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveRiskPolicyResponse>(create);
  static GetLiveRiskPolicyResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveRiskPolicy get policy => $_getN(0);
  @$pb.TagNumber(1)
  set policy(LiveRiskPolicy value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasPolicy() => $_has(0);
  @$pb.TagNumber(1)
  void clearPolicy() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveRiskPolicy ensurePolicy() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// GetLiveKillSwitchRequest queries the current kill switch state.
class GetLiveKillSwitchRequest extends $pb.GeneratedMessage {
  factory GetLiveKillSwitchRequest({
    $core.String? accountId,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    return result;
  }

  GetLiveKillSwitchRequest._();

  factory GetLiveKillSwitchRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveKillSwitchRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveKillSwitchRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveKillSwitchRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveKillSwitchRequest copyWith(
          void Function(GetLiveKillSwitchRequest) updates) =>
      super.copyWith((message) => updates(message as GetLiveKillSwitchRequest))
          as GetLiveKillSwitchRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveKillSwitchRequest create() => GetLiveKillSwitchRequest._();
  @$core.override
  GetLiveKillSwitchRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveKillSwitchRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveKillSwitchRequest>(create);
  static GetLiveKillSwitchRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);
}

/// GetLiveKillSwitchResponse returns the current kill switch state or a typed error.
class GetLiveKillSwitchResponse extends $pb.GeneratedMessage {
  factory GetLiveKillSwitchResponse({
    LiveKillSwitchState? state,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (state != null) result.state = state;
    if (error != null) result.error = error;
    return result;
  }

  GetLiveKillSwitchResponse._();

  factory GetLiveKillSwitchResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory GetLiveKillSwitchResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetLiveKillSwitchResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveKillSwitchState>(1, _omitFieldNames ? '' : 'state',
        subBuilder: LiveKillSwitchState.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveKillSwitchResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  GetLiveKillSwitchResponse copyWith(
          void Function(GetLiveKillSwitchResponse) updates) =>
      super.copyWith((message) => updates(message as GetLiveKillSwitchResponse))
          as GetLiveKillSwitchResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static GetLiveKillSwitchResponse create() => GetLiveKillSwitchResponse._();
  @$core.override
  GetLiveKillSwitchResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static GetLiveKillSwitchResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<GetLiveKillSwitchResponse>(create);
  static GetLiveKillSwitchResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveKillSwitchState get state => $_getN(0);
  @$pb.TagNumber(1)
  set state(LiveKillSwitchState value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasState() => $_has(0);
  @$pb.TagNumber(1)
  void clearState() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveKillSwitchState ensureState() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

/// SetLiveKillSwitchRequest sets the kill switch to halted or unhalted.
class SetLiveKillSwitchRequest extends $pb.GeneratedMessage {
  factory SetLiveKillSwitchRequest({
    $core.String? accountId,
    $core.bool? halted,
    $core.String? reason,
  }) {
    final result = create();
    if (accountId != null) result.accountId = accountId;
    if (halted != null) result.halted = halted;
    if (reason != null) result.reason = reason;
    return result;
  }

  SetLiveKillSwitchRequest._();

  factory SetLiveKillSwitchRequest.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory SetLiveKillSwitchRequest.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SetLiveKillSwitchRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'accountId')
    ..aOB(2, _omitFieldNames ? '' : 'halted')
    ..aOS(3, _omitFieldNames ? '' : 'reason')
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SetLiveKillSwitchRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SetLiveKillSwitchRequest copyWith(
          void Function(SetLiveKillSwitchRequest) updates) =>
      super.copyWith((message) => updates(message as SetLiveKillSwitchRequest))
          as SetLiveKillSwitchRequest;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static SetLiveKillSwitchRequest create() => SetLiveKillSwitchRequest._();
  @$core.override
  SetLiveKillSwitchRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static SetLiveKillSwitchRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<SetLiveKillSwitchRequest>(create);
  static SetLiveKillSwitchRequest? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get accountId => $_getSZ(0);
  @$pb.TagNumber(1)
  set accountId($core.String value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasAccountId() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccountId() => $_clearField(1);

  @$pb.TagNumber(2)
  $core.bool get halted => $_getBF(1);
  @$pb.TagNumber(2)
  set halted($core.bool value) => $_setBool(1, value);
  @$pb.TagNumber(2)
  $core.bool hasHalted() => $_has(1);
  @$pb.TagNumber(2)
  void clearHalted() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.String get reason => $_getSZ(2);
  @$pb.TagNumber(3)
  set reason($core.String value) => $_setString(2, value);
  @$pb.TagNumber(3)
  $core.bool hasReason() => $_has(2);
  @$pb.TagNumber(3)
  void clearReason() => $_clearField(3);
}

/// SetLiveKillSwitchResponse returns the new kill switch state or a typed error.
class SetLiveKillSwitchResponse extends $pb.GeneratedMessage {
  factory SetLiveKillSwitchResponse({
    LiveKillSwitchState? state,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (state != null) result.state = state;
    if (error != null) result.error = error;
    return result;
  }

  SetLiveKillSwitchResponse._();

  factory SetLiveKillSwitchResponse.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory SetLiveKillSwitchResponse.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SetLiveKillSwitchResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<LiveKillSwitchState>(1, _omitFieldNames ? '' : 'state',
        subBuilder: LiveKillSwitchState.create)
    ..aOM<$0.ErrorInfo>(2, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SetLiveKillSwitchResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  SetLiveKillSwitchResponse copyWith(
          void Function(SetLiveKillSwitchResponse) updates) =>
      super.copyWith((message) => updates(message as SetLiveKillSwitchResponse))
          as SetLiveKillSwitchResponse;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static SetLiveKillSwitchResponse create() => SetLiveKillSwitchResponse._();
  @$core.override
  SetLiveKillSwitchResponse createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static SetLiveKillSwitchResponse getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<SetLiveKillSwitchResponse>(create);
  static SetLiveKillSwitchResponse? _defaultInstance;

  @$pb.TagNumber(1)
  LiveKillSwitchState get state => $_getN(0);
  @$pb.TagNumber(1)
  set state(LiveKillSwitchState value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasState() => $_has(0);
  @$pb.TagNumber(1)
  void clearState() => $_clearField(1);
  @$pb.TagNumber(1)
  LiveKillSwitchState ensureState() => $_ensure(0);

  @$pb.TagNumber(2)
  $0.ErrorInfo get error => $_getN(1);
  @$pb.TagNumber(2)
  set error($0.ErrorInfo value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasError() => $_has(1);
  @$pb.TagNumber(2)
  void clearError() => $_clearField(2);
  @$pb.TagNumber(2)
  $0.ErrorInfo ensureError() => $_ensure(1);
}

const $core.bool _omitFieldNames =
    $core.bool.fromEnvironment('protobuf.omit_field_names');
const $core.bool _omitMessageNames =
    $core.bool.fromEnvironment('protobuf.omit_message_names');
