// This is a generated file - do not edit.
//
// Generated from alt/v1/backtest.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.pbenum.dart';
import 'common.pb.dart' as $0;
import 'market.pb.dart' as $1;

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

export 'backtest.pbenum.dart';

class BacktestRunSpec extends $pb.GeneratedMessage {
  factory BacktestRunSpec({
    $core.String? strategyId,
    $0.Market? market,
    $0.Timeframe? timeframe,
    $fixnum.Int64? fromUnixMs,
    $fixnum.Int64? toUnixMs,
  }) {
    final result = create();
    if (strategyId != null) result.strategyId = strategyId;
    if (market != null) result.market = market;
    if (timeframe != null) result.timeframe = timeframe;
    if (fromUnixMs != null) result.fromUnixMs = fromUnixMs;
    if (toUnixMs != null) result.toUnixMs = toUnixMs;
    return result;
  }

  BacktestRunSpec._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'BacktestRunSpec',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'strategyId')
    ..aE<$0.Market>(2, _omitFieldNames ? '' : 'market',
        enumValues: $0.Market.values)
    ..aE<$0.Timeframe>(3, _omitFieldNames ? '' : 'timeframe',
        enumValues: $0.Timeframe.values)
    ..aInt64(4, _omitFieldNames ? '' : 'fromUnixMs')
    ..aInt64(5, _omitFieldNames ? '' : 'toUnixMs')
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  $0.Market get market => $_getN(1);
  @$pb.TagNumber(2)
  set market($0.Market value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasMarket() => $_has(1);
  @$pb.TagNumber(2)
  void clearMarket() => $_clearField(2);

  @$pb.TagNumber(3)
  $0.Timeframe get timeframe => $_getN(2);
  @$pb.TagNumber(3)
  set timeframe($0.Timeframe value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasTimeframe() => $_has(2);
  @$pb.TagNumber(3)
  void clearTimeframe() => $_clearField(3);

  @$pb.TagNumber(4)
  $fixnum.Int64 get fromUnixMs => $_getI64(3);
  @$pb.TagNumber(4)
  set fromUnixMs($fixnum.Int64 value) => $_setInt64(3, value);
  @$pb.TagNumber(4)
  $core.bool hasFromUnixMs() => $_has(3);
  @$pb.TagNumber(4)
  void clearFromUnixMs() => $_clearField(4);

  @$pb.TagNumber(5)
  $fixnum.Int64 get toUnixMs => $_getI64(4);
  @$pb.TagNumber(5)
  set toUnixMs($fixnum.Int64 value) => $_setInt64(4, value);
  @$pb.TagNumber(5)
  $core.bool hasToUnixMs() => $_has(4);
  @$pb.TagNumber(5)
  void clearToUnixMs() => $_clearField(5);
}

class BacktestRun extends $pb.GeneratedMessage {
  factory BacktestRun({
    $core.String? id,
    BacktestRunSpec? spec,
    BacktestRunStatus? status,
    $fixnum.Int64? createdAtUnixMs,
    $fixnum.Int64? updatedAtUnixMs,
  }) {
    final result = create();
    if (id != null) result.id = id;
    if (spec != null) result.spec = spec;
    if (status != null) result.status = status;
    if (createdAtUnixMs != null) result.createdAtUnixMs = createdAtUnixMs;
    if (updatedAtUnixMs != null) result.updatedAtUnixMs = updatedAtUnixMs;
    return result;
  }

  BacktestRun._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'BacktestRun',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'id')
    ..aOM<BacktestRunSpec>(2, _omitFieldNames ? '' : 'spec',
        subBuilder: BacktestRunSpec.create)
    ..aE<BacktestRunStatus>(3, _omitFieldNames ? '' : 'status',
        enumValues: BacktestRunStatus.values)
    ..aInt64(4, _omitFieldNames ? '' : 'createdAtUnixMs')
    ..aInt64(5, _omitFieldNames ? '' : 'updatedAtUnixMs')
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static BacktestRun create() => BacktestRun._();
  @$core.override
  BacktestRun createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static BacktestRun getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<BacktestRun>(create);
  static BacktestRun? _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)
  BacktestRunSpec get spec => $_getN(1);
  @$pb.TagNumber(2)
  set spec(BacktestRunSpec value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasSpec() => $_has(1);
  @$pb.TagNumber(2)
  void clearSpec() => $_clearField(2);
  @$pb.TagNumber(2)
  BacktestRunSpec ensureSpec() => $_ensure(1);

  @$pb.TagNumber(3)
  BacktestRunStatus get status => $_getN(2);
  @$pb.TagNumber(3)
  set status(BacktestRunStatus value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasStatus() => $_has(2);
  @$pb.TagNumber(3)
  void clearStatus() => $_clearField(3);

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

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

class StartBacktestRequest extends $pb.GeneratedMessage {
  factory StartBacktestRequest({
    BacktestRunSpec? spec,
  }) {
    final result = create();
    if (spec != null) result.spec = spec;
    return result;
  }

  StartBacktestRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'StartBacktestRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<BacktestRunSpec>(1, _omitFieldNames ? '' : 'spec',
        subBuilder: BacktestRunSpec.create)
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(1)
  BacktestRunSpec get spec => $_getN(0);
  @$pb.TagNumber(1)
  set spec(BacktestRunSpec value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasSpec() => $_has(0);
  @$pb.TagNumber(1)
  void clearSpec() => $_clearField(1);
  @$pb.TagNumber(1)
  BacktestRunSpec ensureSpec() => $_ensure(0);
}

class StartBacktestResponse extends $pb.GeneratedMessage {
  factory StartBacktestResponse({
    BacktestRun? run,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (run != null) result.run = run;
    if (error != null) result.error = error;
    return result;
  }

  StartBacktestResponse._();

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

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

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

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

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

  @$pb.TagNumber(1)
  BacktestRun get run => $_getN(0);
  @$pb.TagNumber(1)
  set run(BacktestRun value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasRun() => $_has(0);
  @$pb.TagNumber(1)
  void clearRun() => $_clearField(1);
  @$pb.TagNumber(1)
  BacktestRun ensureRun() => $_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);
}

class GetBacktestRunRequest extends $pb.GeneratedMessage {
  factory GetBacktestRunRequest({
    $core.String? runId,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    return result;
  }

  GetBacktestRunRequest._();

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

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

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

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

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

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

class GetBacktestRunResponse extends $pb.GeneratedMessage {
  factory GetBacktestRunResponse({
    BacktestRun? run,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (run != null) result.run = run;
    if (error != null) result.error = error;
    return result;
  }

  GetBacktestRunResponse._();

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

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

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

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

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

  @$pb.TagNumber(1)
  BacktestRun get run => $_getN(0);
  @$pb.TagNumber(1)
  set run(BacktestRun value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasRun() => $_has(0);
  @$pb.TagNumber(1)
  void clearRun() => $_clearField(1);
  @$pb.TagNumber(1)
  BacktestRun ensureRun() => $_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);
}

class BacktestTrade extends $pb.GeneratedMessage {
  factory BacktestTrade({
    $core.String? instrumentId,
    $core.String? side,
    $1.Quantity? quantity,
    $1.Price? price,
    $fixnum.Int64? timestampUnixMs,
  }) {
    final result = create();
    if (instrumentId != null) result.instrumentId = instrumentId;
    if (side != null) result.side = side;
    if (quantity != null) result.quantity = quantity;
    if (price != null) result.price = price;
    if (timestampUnixMs != null) result.timestampUnixMs = timestampUnixMs;
    return result;
  }

  BacktestTrade._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'BacktestTrade',
      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 ? '' : 'price',
        subBuilder: $1.Price.create)
    ..aInt64(5, _omitFieldNames ? '' : 'timestampUnixMs')
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static BacktestTrade create() => BacktestTrade._();
  @$core.override
  BacktestTrade createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static BacktestTrade getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<BacktestTrade>(create);
  static BacktestTrade? _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 price => $_getN(3);
  @$pb.TagNumber(4)
  set price($1.Price value) => $_setField(4, value);
  @$pb.TagNumber(4)
  $core.bool hasPrice() => $_has(3);
  @$pb.TagNumber(4)
  void clearPrice() => $_clearField(4);
  @$pb.TagNumber(4)
  $1.Price ensurePrice() => $_ensure(3);

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

class BacktestPosition extends $pb.GeneratedMessage {
  factory BacktestPosition({
    $core.String? instrumentId,
    $1.Quantity? quantity,
    $1.Price? lastPrice,
  }) {
    final result = create();
    if (instrumentId != null) result.instrumentId = instrumentId;
    if (quantity != null) result.quantity = quantity;
    if (lastPrice != null) result.lastPrice = lastPrice;
    return result;
  }

  BacktestPosition._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'BacktestPosition',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'instrumentId')
    ..aOM<$1.Quantity>(2, _omitFieldNames ? '' : 'quantity',
        subBuilder: $1.Quantity.create)
    ..aOM<$1.Price>(3, _omitFieldNames ? '' : 'lastPrice',
        subBuilder: $1.Price.create)
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static BacktestPosition create() => BacktestPosition._();
  @$core.override
  BacktestPosition createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static BacktestPosition getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<BacktestPosition>(create);
  static BacktestPosition? _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)
  $1.Quantity get quantity => $_getN(1);
  @$pb.TagNumber(2)
  set quantity($1.Quantity value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasQuantity() => $_has(1);
  @$pb.TagNumber(2)
  void clearQuantity() => $_clearField(2);
  @$pb.TagNumber(2)
  $1.Quantity ensureQuantity() => $_ensure(1);

  @$pb.TagNumber(3)
  $1.Price get lastPrice => $_getN(2);
  @$pb.TagNumber(3)
  set lastPrice($1.Price value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasLastPrice() => $_has(2);
  @$pb.TagNumber(3)
  void clearLastPrice() => $_clearField(3);
  @$pb.TagNumber(3)
  $1.Price ensureLastPrice() => $_ensure(2);
}

class BacktestSummaryMetrics extends $pb.GeneratedMessage {
  factory BacktestSummaryMetrics({
    $1.Price? startingCash,
    $1.Price? endingEquity,
    $0.Decimal? totalReturn,
    $core.int? tradeCount,
  }) {
    final result = create();
    if (startingCash != null) result.startingCash = startingCash;
    if (endingEquity != null) result.endingEquity = endingEquity;
    if (totalReturn != null) result.totalReturn = totalReturn;
    if (tradeCount != null) result.tradeCount = tradeCount;
    return result;
  }

  BacktestSummaryMetrics._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'BacktestSummaryMetrics',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<$1.Price>(1, _omitFieldNames ? '' : 'startingCash',
        subBuilder: $1.Price.create)
    ..aOM<$1.Price>(2, _omitFieldNames ? '' : 'endingEquity',
        subBuilder: $1.Price.create)
    ..aOM<$0.Decimal>(3, _omitFieldNames ? '' : 'totalReturn',
        subBuilder: $0.Decimal.create)
    ..aI(4, _omitFieldNames ? '' : 'tradeCount')
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(1)
  $1.Price get startingCash => $_getN(0);
  @$pb.TagNumber(1)
  set startingCash($1.Price value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasStartingCash() => $_has(0);
  @$pb.TagNumber(1)
  void clearStartingCash() => $_clearField(1);
  @$pb.TagNumber(1)
  $1.Price ensureStartingCash() => $_ensure(0);

  @$pb.TagNumber(2)
  $1.Price get endingEquity => $_getN(1);
  @$pb.TagNumber(2)
  set endingEquity($1.Price value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasEndingEquity() => $_has(1);
  @$pb.TagNumber(2)
  void clearEndingEquity() => $_clearField(2);
  @$pb.TagNumber(2)
  $1.Price ensureEndingEquity() => $_ensure(1);

  @$pb.TagNumber(3)
  $0.Decimal get totalReturn => $_getN(2);
  @$pb.TagNumber(3)
  set totalReturn($0.Decimal value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasTotalReturn() => $_has(2);
  @$pb.TagNumber(3)
  void clearTotalReturn() => $_clearField(3);
  @$pb.TagNumber(3)
  $0.Decimal ensureTotalReturn() => $_ensure(2);

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

class BacktestEquityPoint extends $pb.GeneratedMessage {
  factory BacktestEquityPoint({
    $fixnum.Int64? timestampUnixMs,
    $1.Price? equity,
  }) {
    final result = create();
    if (timestampUnixMs != null) result.timestampUnixMs = timestampUnixMs;
    if (equity != null) result.equity = equity;
    return result;
  }

  BacktestEquityPoint._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'BacktestEquityPoint',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aInt64(1, _omitFieldNames ? '' : 'timestampUnixMs')
    ..aOM<$1.Price>(2, _omitFieldNames ? '' : 'equity',
        subBuilder: $1.Price.create)
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  $1.Price get equity => $_getN(1);
  @$pb.TagNumber(2)
  set equity($1.Price value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasEquity() => $_has(1);
  @$pb.TagNumber(2)
  void clearEquity() => $_clearField(2);
  @$pb.TagNumber(2)
  $1.Price ensureEquity() => $_ensure(1);
}

class BacktestResult extends $pb.GeneratedMessage {
  factory BacktestResult({
    $core.String? runId,
    $1.Price? startingCash,
    $1.Price? endingEquity,
    $core.Iterable<BacktestTrade>? trades,
    $core.Iterable<BacktestPosition>? positions,
    BacktestSummaryMetrics? summary,
    $core.Iterable<BacktestEquityPoint>? equityCurve,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    if (startingCash != null) result.startingCash = startingCash;
    if (endingEquity != null) result.endingEquity = endingEquity;
    if (trades != null) result.trades.addAll(trades);
    if (positions != null) result.positions.addAll(positions);
    if (summary != null) result.summary = summary;
    if (equityCurve != null) result.equityCurve.addAll(equityCurve);
    return result;
  }

  BacktestResult._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'BacktestResult',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'runId')
    ..aOM<$1.Price>(2, _omitFieldNames ? '' : 'startingCash',
        subBuilder: $1.Price.create)
    ..aOM<$1.Price>(3, _omitFieldNames ? '' : 'endingEquity',
        subBuilder: $1.Price.create)
    ..pPM<BacktestTrade>(4, _omitFieldNames ? '' : 'trades',
        subBuilder: BacktestTrade.create)
    ..pPM<BacktestPosition>(5, _omitFieldNames ? '' : 'positions',
        subBuilder: BacktestPosition.create)
    ..aOM<BacktestSummaryMetrics>(6, _omitFieldNames ? '' : 'summary',
        subBuilder: BacktestSummaryMetrics.create)
    ..pPM<BacktestEquityPoint>(7, _omitFieldNames ? '' : 'equityCurve',
        subBuilder: BacktestEquityPoint.create)
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  $1.Price get startingCash => $_getN(1);
  @$pb.TagNumber(2)
  set startingCash($1.Price value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasStartingCash() => $_has(1);
  @$pb.TagNumber(2)
  void clearStartingCash() => $_clearField(2);
  @$pb.TagNumber(2)
  $1.Price ensureStartingCash() => $_ensure(1);

  @$pb.TagNumber(3)
  $1.Price get endingEquity => $_getN(2);
  @$pb.TagNumber(3)
  set endingEquity($1.Price value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasEndingEquity() => $_has(2);
  @$pb.TagNumber(3)
  void clearEndingEquity() => $_clearField(3);
  @$pb.TagNumber(3)
  $1.Price ensureEndingEquity() => $_ensure(2);

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

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

  @$pb.TagNumber(6)
  BacktestSummaryMetrics get summary => $_getN(5);
  @$pb.TagNumber(6)
  set summary(BacktestSummaryMetrics value) => $_setField(6, value);
  @$pb.TagNumber(6)
  $core.bool hasSummary() => $_has(5);
  @$pb.TagNumber(6)
  void clearSummary() => $_clearField(6);
  @$pb.TagNumber(6)
  BacktestSummaryMetrics ensureSummary() => $_ensure(5);

  @$pb.TagNumber(7)
  $pb.PbList<BacktestEquityPoint> get equityCurve => $_getList(6);
}

class GetBacktestResultRequest extends $pb.GeneratedMessage {
  factory GetBacktestResultRequest({
    $core.String? runId,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    return result;
  }

  GetBacktestResultRequest._();

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

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

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

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

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

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

class GetBacktestResultResponse extends $pb.GeneratedMessage {
  factory GetBacktestResultResponse({
    BacktestResult? result,
    $0.ErrorInfo? error,
  }) {
    final result$ = create();
    if (result != null) result$.result = result;
    if (error != null) result$.error = error;
    return result$;
  }

  GetBacktestResultResponse._();

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

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

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

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

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

  @$pb.TagNumber(1)
  BacktestResult get result => $_getN(0);
  @$pb.TagNumber(1)
  set result(BacktestResult value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasResult() => $_has(0);
  @$pb.TagNumber(1)
  void clearResult() => $_clearField(1);
  @$pb.TagNumber(1)
  BacktestResult ensureResult() => $_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);
}

class ListBacktestRunsRequest extends $pb.GeneratedMessage {
  factory ListBacktestRunsRequest({
    BacktestRunStatus? status,
  }) {
    final result = create();
    if (status != null) result.status = status;
    return result;
  }

  ListBacktestRunsRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ListBacktestRunsRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aE<BacktestRunStatus>(1, _omitFieldNames ? '' : 'status',
        enumValues: BacktestRunStatus.values)
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(1)
  BacktestRunStatus get status => $_getN(0);
  @$pb.TagNumber(1)
  set status(BacktestRunStatus value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasStatus() => $_has(0);
  @$pb.TagNumber(1)
  void clearStatus() => $_clearField(1);
}

class ListBacktestRunsResponse extends $pb.GeneratedMessage {
  factory ListBacktestRunsResponse({
    $core.Iterable<BacktestRun>? runs,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (runs != null) result.runs.addAll(runs);
    if (error != null) result.error = error;
    return result;
  }

  ListBacktestRunsResponse._();

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

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

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

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

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

  @$pb.TagNumber(1)
  $pb.PbList<BacktestRun> get runs => $_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);
}

class GetBacktestRunDetailRequest extends $pb.GeneratedMessage {
  factory GetBacktestRunDetailRequest({
    $core.String? runId,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    return result;
  }

  GetBacktestRunDetailRequest._();

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

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

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

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

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

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

class GetBacktestRunDetailResponse extends $pb.GeneratedMessage {
  factory GetBacktestRunDetailResponse({
    BacktestRun? run,
    BacktestResult? result,
    $0.ErrorInfo? error,
  }) {
    final result$ = create();
    if (run != null) result$.run = run;
    if (result != null) result$.result = result;
    if (error != null) result$.error = error;
    return result$;
  }

  GetBacktestRunDetailResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'GetBacktestRunDetailResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'alt.v1'),
      createEmptyInstance: create)
    ..aOM<BacktestRun>(1, _omitFieldNames ? '' : 'run',
        subBuilder: BacktestRun.create)
    ..aOM<BacktestResult>(2, _omitFieldNames ? '' : 'result',
        subBuilder: BacktestResult.create)
    ..aOM<$0.ErrorInfo>(3, _omitFieldNames ? '' : 'error',
        subBuilder: $0.ErrorInfo.create)
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(1)
  BacktestRun get run => $_getN(0);
  @$pb.TagNumber(1)
  set run(BacktestRun value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasRun() => $_has(0);
  @$pb.TagNumber(1)
  void clearRun() => $_clearField(1);
  @$pb.TagNumber(1)
  BacktestRun ensureRun() => $_ensure(0);

  @$pb.TagNumber(2)
  BacktestResult get result => $_getN(1);
  @$pb.TagNumber(2)
  set result(BacktestResult value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasResult() => $_has(1);
  @$pb.TagNumber(2)
  void clearResult() => $_clearField(2);
  @$pb.TagNumber(2)
  BacktestResult ensureResult() => $_ensure(1);

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

class CompareBacktestRunsRequest extends $pb.GeneratedMessage {
  factory CompareBacktestRunsRequest({
    $core.Iterable<$core.String>? runIds,
  }) {
    final result = create();
    if (runIds != null) result.runIds.addAll(runIds);
    return result;
  }

  CompareBacktestRunsRequest._();

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

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

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

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

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

  @$pb.TagNumber(1)
  $pb.PbList<$core.String> get runIds => $_getList(0);
}

class CompareBacktestRunsResponse extends $pb.GeneratedMessage {
  factory CompareBacktestRunsResponse({
    $core.Iterable<BacktestResult>? results,
    $0.ErrorInfo? error,
  }) {
    final result = create();
    if (results != null) result.results.addAll(results);
    if (error != null) result.error = error;
    return result;
  }

  CompareBacktestRunsResponse._();

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

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

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

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

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

  @$pb.TagNumber(1)
  $pb.PbList<BacktestResult> get results => $_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);
}

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