//
//  Generated code. Do not modify.
//  source: iop/runtime.proto
//
// @dart = 2.12

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

import 'dart:core' as $core;

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

import '../google/protobuf/struct.pb.dart' as $0;
import 'runtime.pbenum.dart';

export 'runtime.pbenum.dart';

/// RunRequest initiates an adapter execution on a node.
class RunRequest extends $pb.GeneratedMessage {
  factory RunRequest({
    $core.String? runId,
    $core.String? adapter,
    $core.String? target,
    $core.String? workspace,
    $0.Struct? policy,
    $0.Struct? input,
    $core.int? timeoutSec,
    $core.Map<$core.String, $core.String>? metadata,
    $core.String? sessionId,
    RunSessionMode? sessionMode,
    $core.bool? background,
  }) {
    final $result = create();
    if (runId != null) {
      $result.runId = runId;
    }
    if (adapter != null) {
      $result.adapter = adapter;
    }
    if (target != null) {
      $result.target = target;
    }
    if (workspace != null) {
      $result.workspace = workspace;
    }
    if (policy != null) {
      $result.policy = policy;
    }
    if (input != null) {
      $result.input = input;
    }
    if (timeoutSec != null) {
      $result.timeoutSec = timeoutSec;
    }
    if (metadata != null) {
      $result.metadata.addAll(metadata);
    }
    if (sessionId != null) {
      $result.sessionId = sessionId;
    }
    if (sessionMode != null) {
      $result.sessionMode = sessionMode;
    }
    if (background != null) {
      $result.background = background;
    }
    return $result;
  }
  RunRequest._() : super();
  factory RunRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory RunRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RunRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'runId')
    ..aOS(2, _omitFieldNames ? '' : 'adapter')
    ..aOS(3, _omitFieldNames ? '' : 'target')
    ..aOS(4, _omitFieldNames ? '' : 'workspace')
    ..aOM<$0.Struct>(5, _omitFieldNames ? '' : 'policy', subBuilder: $0.Struct.create)
    ..aOM<$0.Struct>(6, _omitFieldNames ? '' : 'input', subBuilder: $0.Struct.create)
    ..a<$core.int>(7, _omitFieldNames ? '' : 'timeoutSec', $pb.PbFieldType.O3)
    ..m<$core.String, $core.String>(8, _omitFieldNames ? '' : 'metadata', entryClassName: 'RunRequest.MetadataEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('iop'))
    ..aOS(9, _omitFieldNames ? '' : 'sessionId')
    ..e<RunSessionMode>(10, _omitFieldNames ? '' : 'sessionMode', $pb.PbFieldType.OE, defaultOrMaker: RunSessionMode.RUN_SESSION_MODE_UNSPECIFIED, valueOf: RunSessionMode.valueOf, enumValues: RunSessionMode.values)
    ..aOB(11, _omitFieldNames ? '' : 'background')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  RunRequest clone() => RunRequest()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  RunRequest copyWith(void Function(RunRequest) updates) => super.copyWith((message) => updates(message as RunRequest)) as RunRequest;

  $pb.BuilderInfo get info_ => _i;

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

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

  @$pb.TagNumber(2)
  $core.String get adapter => $_getSZ(1);
  @$pb.TagNumber(2)
  set adapter($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasAdapter() => $_has(1);
  @$pb.TagNumber(2)
  void clearAdapter() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get target => $_getSZ(2);
  @$pb.TagNumber(3)
  set target($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasTarget() => $_has(2);
  @$pb.TagNumber(3)
  void clearTarget() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get workspace => $_getSZ(3);
  @$pb.TagNumber(4)
  set workspace($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasWorkspace() => $_has(3);
  @$pb.TagNumber(4)
  void clearWorkspace() => clearField(4);

  @$pb.TagNumber(5)
  $0.Struct get policy => $_getN(4);
  @$pb.TagNumber(5)
  set policy($0.Struct v) { setField(5, v); }
  @$pb.TagNumber(5)
  $core.bool hasPolicy() => $_has(4);
  @$pb.TagNumber(5)
  void clearPolicy() => clearField(5);
  @$pb.TagNumber(5)
  $0.Struct ensurePolicy() => $_ensure(4);

  @$pb.TagNumber(6)
  $0.Struct get input => $_getN(5);
  @$pb.TagNumber(6)
  set input($0.Struct v) { setField(6, v); }
  @$pb.TagNumber(6)
  $core.bool hasInput() => $_has(5);
  @$pb.TagNumber(6)
  void clearInput() => clearField(6);
  @$pb.TagNumber(6)
  $0.Struct ensureInput() => $_ensure(5);

  @$pb.TagNumber(7)
  $core.int get timeoutSec => $_getIZ(6);
  @$pb.TagNumber(7)
  set timeoutSec($core.int v) { $_setSignedInt32(6, v); }
  @$pb.TagNumber(7)
  $core.bool hasTimeoutSec() => $_has(6);
  @$pb.TagNumber(7)
  void clearTimeoutSec() => clearField(7);

  @$pb.TagNumber(8)
  $core.Map<$core.String, $core.String> get metadata => $_getMap(7);

  @$pb.TagNumber(9)
  $core.String get sessionId => $_getSZ(8);
  @$pb.TagNumber(9)
  set sessionId($core.String v) { $_setString(8, v); }
  @$pb.TagNumber(9)
  $core.bool hasSessionId() => $_has(8);
  @$pb.TagNumber(9)
  void clearSessionId() => clearField(9);

  @$pb.TagNumber(10)
  RunSessionMode get sessionMode => $_getN(9);
  @$pb.TagNumber(10)
  set sessionMode(RunSessionMode v) { setField(10, v); }
  @$pb.TagNumber(10)
  $core.bool hasSessionMode() => $_has(9);
  @$pb.TagNumber(10)
  void clearSessionMode() => clearField(10);

  @$pb.TagNumber(11)
  $core.bool get background => $_getBF(10);
  @$pb.TagNumber(11)
  set background($core.bool v) { $_setBool(10, v); }
  @$pb.TagNumber(11)
  $core.bool hasBackground() => $_has(10);
  @$pb.TagNumber(11)
  void clearBackground() => clearField(11);
}

/// RunEvent is a streaming execution event.
class RunEvent extends $pb.GeneratedMessage {
  factory RunEvent({
    $core.String? runId,
    $core.String? type,
    $core.String? delta,
    $core.String? message,
    $core.String? error,
    Usage? usage,
    $core.Map<$core.String, $core.String>? metadata,
    $fixnum.Int64? timestamp,
    $core.String? sessionId,
    $core.bool? background,
    $core.String? nodeId,
    $core.String? nodeAlias,
  }) {
    final $result = create();
    if (runId != null) {
      $result.runId = runId;
    }
    if (type != null) {
      $result.type = type;
    }
    if (delta != null) {
      $result.delta = delta;
    }
    if (message != null) {
      $result.message = message;
    }
    if (error != null) {
      $result.error = error;
    }
    if (usage != null) {
      $result.usage = usage;
    }
    if (metadata != null) {
      $result.metadata.addAll(metadata);
    }
    if (timestamp != null) {
      $result.timestamp = timestamp;
    }
    if (sessionId != null) {
      $result.sessionId = sessionId;
    }
    if (background != null) {
      $result.background = background;
    }
    if (nodeId != null) {
      $result.nodeId = nodeId;
    }
    if (nodeAlias != null) {
      $result.nodeAlias = nodeAlias;
    }
    return $result;
  }
  RunEvent._() : super();
  factory RunEvent.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory RunEvent.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RunEvent', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'runId')
    ..aOS(2, _omitFieldNames ? '' : 'type')
    ..aOS(3, _omitFieldNames ? '' : 'delta')
    ..aOS(4, _omitFieldNames ? '' : 'message')
    ..aOS(5, _omitFieldNames ? '' : 'error')
    ..aOM<Usage>(6, _omitFieldNames ? '' : 'usage', subBuilder: Usage.create)
    ..m<$core.String, $core.String>(7, _omitFieldNames ? '' : 'metadata', entryClassName: 'RunEvent.MetadataEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('iop'))
    ..aInt64(8, _omitFieldNames ? '' : 'timestamp')
    ..aOS(9, _omitFieldNames ? '' : 'sessionId')
    ..aOB(10, _omitFieldNames ? '' : 'background')
    ..aOS(11, _omitFieldNames ? '' : 'nodeId')
    ..aOS(12, _omitFieldNames ? '' : 'nodeAlias')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  RunEvent clone() => RunEvent()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  RunEvent copyWith(void Function(RunEvent) updates) => super.copyWith((message) => updates(message as RunEvent)) as RunEvent;

  $pb.BuilderInfo get info_ => _i;

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

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

  @$pb.TagNumber(2)
  $core.String get type => $_getSZ(1);
  @$pb.TagNumber(2)
  set type($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasType() => $_has(1);
  @$pb.TagNumber(2)
  void clearType() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get delta => $_getSZ(2);
  @$pb.TagNumber(3)
  set delta($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasDelta() => $_has(2);
  @$pb.TagNumber(3)
  void clearDelta() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get message => $_getSZ(3);
  @$pb.TagNumber(4)
  set message($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasMessage() => $_has(3);
  @$pb.TagNumber(4)
  void clearMessage() => clearField(4);

  @$pb.TagNumber(5)
  $core.String get error => $_getSZ(4);
  @$pb.TagNumber(5)
  set error($core.String v) { $_setString(4, v); }
  @$pb.TagNumber(5)
  $core.bool hasError() => $_has(4);
  @$pb.TagNumber(5)
  void clearError() => clearField(5);

  @$pb.TagNumber(6)
  Usage get usage => $_getN(5);
  @$pb.TagNumber(6)
  set usage(Usage v) { setField(6, v); }
  @$pb.TagNumber(6)
  $core.bool hasUsage() => $_has(5);
  @$pb.TagNumber(6)
  void clearUsage() => clearField(6);
  @$pb.TagNumber(6)
  Usage ensureUsage() => $_ensure(5);

  @$pb.TagNumber(7)
  $core.Map<$core.String, $core.String> get metadata => $_getMap(6);

  @$pb.TagNumber(8)
  $fixnum.Int64 get timestamp => $_getI64(7);
  @$pb.TagNumber(8)
  set timestamp($fixnum.Int64 v) { $_setInt64(7, v); }
  @$pb.TagNumber(8)
  $core.bool hasTimestamp() => $_has(7);
  @$pb.TagNumber(8)
  void clearTimestamp() => clearField(8);

  @$pb.TagNumber(9)
  $core.String get sessionId => $_getSZ(8);
  @$pb.TagNumber(9)
  set sessionId($core.String v) { $_setString(8, v); }
  @$pb.TagNumber(9)
  $core.bool hasSessionId() => $_has(8);
  @$pb.TagNumber(9)
  void clearSessionId() => clearField(9);

  @$pb.TagNumber(10)
  $core.bool get background => $_getBF(9);
  @$pb.TagNumber(10)
  set background($core.bool v) { $_setBool(9, v); }
  @$pb.TagNumber(10)
  $core.bool hasBackground() => $_has(9);
  @$pb.TagNumber(10)
  void clearBackground() => clearField(10);

  @$pb.TagNumber(11)
  $core.String get nodeId => $_getSZ(10);
  @$pb.TagNumber(11)
  set nodeId($core.String v) { $_setString(10, v); }
  @$pb.TagNumber(11)
  $core.bool hasNodeId() => $_has(10);
  @$pb.TagNumber(11)
  void clearNodeId() => clearField(11);

  @$pb.TagNumber(12)
  $core.String get nodeAlias => $_getSZ(11);
  @$pb.TagNumber(12)
  set nodeAlias($core.String v) { $_setString(11, v); }
  @$pb.TagNumber(12)
  $core.bool hasNodeAlias() => $_has(11);
  @$pb.TagNumber(12)
  void clearNodeAlias() => clearField(12);
}

/// EdgeNodeEvent is a general edge-node lifecycle/control event envelope.
/// It is separate from RunEvent, which is reserved for adapter execution streams.
class EdgeNodeEvent extends $pb.GeneratedMessage {
  factory EdgeNodeEvent({
    $core.String? eventId,
    $core.String? type,
    $core.String? source,
    $core.String? nodeId,
    $core.String? alias,
    $core.String? reason,
    $core.Map<$core.String, $core.String>? metadata,
    $fixnum.Int64? timestamp,
  }) {
    final $result = create();
    if (eventId != null) {
      $result.eventId = eventId;
    }
    if (type != null) {
      $result.type = type;
    }
    if (source != null) {
      $result.source = source;
    }
    if (nodeId != null) {
      $result.nodeId = nodeId;
    }
    if (alias != null) {
      $result.alias = alias;
    }
    if (reason != null) {
      $result.reason = reason;
    }
    if (metadata != null) {
      $result.metadata.addAll(metadata);
    }
    if (timestamp != null) {
      $result.timestamp = timestamp;
    }
    return $result;
  }
  EdgeNodeEvent._() : super();
  factory EdgeNodeEvent.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory EdgeNodeEvent.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EdgeNodeEvent', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'eventId')
    ..aOS(2, _omitFieldNames ? '' : 'type')
    ..aOS(3, _omitFieldNames ? '' : 'source')
    ..aOS(4, _omitFieldNames ? '' : 'nodeId')
    ..aOS(5, _omitFieldNames ? '' : 'alias')
    ..aOS(6, _omitFieldNames ? '' : 'reason')
    ..m<$core.String, $core.String>(7, _omitFieldNames ? '' : 'metadata', entryClassName: 'EdgeNodeEvent.MetadataEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('iop'))
    ..aInt64(8, _omitFieldNames ? '' : 'timestamp')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  EdgeNodeEvent clone() => EdgeNodeEvent()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  EdgeNodeEvent copyWith(void Function(EdgeNodeEvent) updates) => super.copyWith((message) => updates(message as EdgeNodeEvent)) as EdgeNodeEvent;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get eventId => $_getSZ(0);
  @$pb.TagNumber(1)
  set eventId($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasEventId() => $_has(0);
  @$pb.TagNumber(1)
  void clearEventId() => clearField(1);

  @$pb.TagNumber(2)
  $core.String get type => $_getSZ(1);
  @$pb.TagNumber(2)
  set type($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasType() => $_has(1);
  @$pb.TagNumber(2)
  void clearType() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get source => $_getSZ(2);
  @$pb.TagNumber(3)
  set source($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasSource() => $_has(2);
  @$pb.TagNumber(3)
  void clearSource() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get nodeId => $_getSZ(3);
  @$pb.TagNumber(4)
  set nodeId($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasNodeId() => $_has(3);
  @$pb.TagNumber(4)
  void clearNodeId() => clearField(4);

  @$pb.TagNumber(5)
  $core.String get alias => $_getSZ(4);
  @$pb.TagNumber(5)
  set alias($core.String v) { $_setString(4, v); }
  @$pb.TagNumber(5)
  $core.bool hasAlias() => $_has(4);
  @$pb.TagNumber(5)
  void clearAlias() => clearField(5);

  @$pb.TagNumber(6)
  $core.String get reason => $_getSZ(5);
  @$pb.TagNumber(6)
  set reason($core.String v) { $_setString(5, v); }
  @$pb.TagNumber(6)
  $core.bool hasReason() => $_has(5);
  @$pb.TagNumber(6)
  void clearReason() => clearField(6);

  @$pb.TagNumber(7)
  $core.Map<$core.String, $core.String> get metadata => $_getMap(6);

  @$pb.TagNumber(8)
  $fixnum.Int64 get timestamp => $_getI64(7);
  @$pb.TagNumber(8)
  set timestamp($fixnum.Int64 v) { $_setInt64(7, v); }
  @$pb.TagNumber(8)
  $core.bool hasTimestamp() => $_has(7);
  @$pb.TagNumber(8)
  void clearTimestamp() => clearField(8);
}

class Usage extends $pb.GeneratedMessage {
  factory Usage({
    $core.int? inputTokens,
    $core.int? outputTokens,
  }) {
    final $result = create();
    if (inputTokens != null) {
      $result.inputTokens = inputTokens;
    }
    if (outputTokens != null) {
      $result.outputTokens = outputTokens;
    }
    return $result;
  }
  Usage._() : super();
  factory Usage.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory Usage.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Usage', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..a<$core.int>(1, _omitFieldNames ? '' : 'inputTokens', $pb.PbFieldType.O3)
    ..a<$core.int>(2, _omitFieldNames ? '' : 'outputTokens', $pb.PbFieldType.O3)
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  Usage clone() => Usage()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  Usage copyWith(void Function(Usage) updates) => super.copyWith((message) => updates(message as Usage)) as Usage;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.int get inputTokens => $_getIZ(0);
  @$pb.TagNumber(1)
  set inputTokens($core.int v) { $_setSignedInt32(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasInputTokens() => $_has(0);
  @$pb.TagNumber(1)
  void clearInputTokens() => clearField(1);

  @$pb.TagNumber(2)
  $core.int get outputTokens => $_getIZ(1);
  @$pb.TagNumber(2)
  set outputTokens($core.int v) { $_setSignedInt32(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasOutputTokens() => $_has(1);
  @$pb.TagNumber(2)
  void clearOutputTokens() => clearField(2);
}

/// Heartbeat is sent by both sides to keep the connection alive.
class Heartbeat extends $pb.GeneratedMessage {
  factory Heartbeat({
    $fixnum.Int64? timestamp,
  }) {
    final $result = create();
    if (timestamp != null) {
      $result.timestamp = timestamp;
    }
    return $result;
  }
  Heartbeat._() : super();
  factory Heartbeat.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory Heartbeat.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Heartbeat', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aInt64(1, _omitFieldNames ? '' : 'timestamp')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  Heartbeat clone() => Heartbeat()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  Heartbeat copyWith(void Function(Heartbeat) updates) => super.copyWith((message) => updates(message as Heartbeat)) as Heartbeat;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $fixnum.Int64 get timestamp => $_getI64(0);
  @$pb.TagNumber(1)
  set timestamp($fixnum.Int64 v) { $_setInt64(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasTimestamp() => $_has(0);
  @$pb.TagNumber(1)
  void clearTimestamp() => clearField(1);
}

/// CancelRequest asks the node to cancel a running execution.
class CancelRequest extends $pb.GeneratedMessage {
  factory CancelRequest({
    $core.String? runId,
    $core.String? adapter,
    $core.String? target,
    $core.String? sessionId,
    CancelAction? action,
  }) {
    final $result = create();
    if (runId != null) {
      $result.runId = runId;
    }
    if (adapter != null) {
      $result.adapter = adapter;
    }
    if (target != null) {
      $result.target = target;
    }
    if (sessionId != null) {
      $result.sessionId = sessionId;
    }
    if (action != null) {
      $result.action = action;
    }
    return $result;
  }
  CancelRequest._() : super();
  factory CancelRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory CancelRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CancelRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'runId')
    ..aOS(2, _omitFieldNames ? '' : 'adapter')
    ..aOS(3, _omitFieldNames ? '' : 'target')
    ..aOS(4, _omitFieldNames ? '' : 'sessionId')
    ..e<CancelAction>(5, _omitFieldNames ? '' : 'action', $pb.PbFieldType.OE, defaultOrMaker: CancelAction.CANCEL_ACTION_UNSPECIFIED, valueOf: CancelAction.valueOf, enumValues: CancelAction.values)
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  CancelRequest clone() => CancelRequest()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  CancelRequest copyWith(void Function(CancelRequest) updates) => super.copyWith((message) => updates(message as CancelRequest)) as CancelRequest;

  $pb.BuilderInfo get info_ => _i;

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

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

  @$pb.TagNumber(2)
  $core.String get adapter => $_getSZ(1);
  @$pb.TagNumber(2)
  set adapter($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasAdapter() => $_has(1);
  @$pb.TagNumber(2)
  void clearAdapter() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get target => $_getSZ(2);
  @$pb.TagNumber(3)
  set target($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasTarget() => $_has(2);
  @$pb.TagNumber(3)
  void clearTarget() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get sessionId => $_getSZ(3);
  @$pb.TagNumber(4)
  set sessionId($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasSessionId() => $_has(3);
  @$pb.TagNumber(4)
  void clearSessionId() => clearField(4);

  @$pb.TagNumber(5)
  CancelAction get action => $_getN(4);
  @$pb.TagNumber(5)
  set action(CancelAction v) { setField(5, v); }
  @$pb.TagNumber(5)
  $core.bool hasAction() => $_has(4);
  @$pb.TagNumber(5)
  void clearAction() => clearField(5);
}

class NodeCommandRequest extends $pb.GeneratedMessage {
  factory NodeCommandRequest({
    $core.String? requestId,
    NodeCommandType? type,
    $core.String? adapter,
    $core.String? target,
    $core.String? sessionId,
    $core.int? timeoutSec,
    $core.Map<$core.String, $core.String>? metadata,
  }) {
    final $result = create();
    if (requestId != null) {
      $result.requestId = requestId;
    }
    if (type != null) {
      $result.type = type;
    }
    if (adapter != null) {
      $result.adapter = adapter;
    }
    if (target != null) {
      $result.target = target;
    }
    if (sessionId != null) {
      $result.sessionId = sessionId;
    }
    if (timeoutSec != null) {
      $result.timeoutSec = timeoutSec;
    }
    if (metadata != null) {
      $result.metadata.addAll(metadata);
    }
    return $result;
  }
  NodeCommandRequest._() : super();
  factory NodeCommandRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory NodeCommandRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NodeCommandRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..e<NodeCommandType>(2, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: NodeCommandType.NODE_COMMAND_TYPE_UNSPECIFIED, valueOf: NodeCommandType.valueOf, enumValues: NodeCommandType.values)
    ..aOS(3, _omitFieldNames ? '' : 'adapter')
    ..aOS(4, _omitFieldNames ? '' : 'target')
    ..aOS(5, _omitFieldNames ? '' : 'sessionId')
    ..a<$core.int>(6, _omitFieldNames ? '' : 'timeoutSec', $pb.PbFieldType.O3)
    ..m<$core.String, $core.String>(7, _omitFieldNames ? '' : 'metadata', entryClassName: 'NodeCommandRequest.MetadataEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('iop'))
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  NodeCommandRequest clone() => NodeCommandRequest()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  NodeCommandRequest copyWith(void Function(NodeCommandRequest) updates) => super.copyWith((message) => updates(message as NodeCommandRequest)) as NodeCommandRequest;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get requestId => $_getSZ(0);
  @$pb.TagNumber(1)
  set requestId($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasRequestId() => $_has(0);
  @$pb.TagNumber(1)
  void clearRequestId() => clearField(1);

  @$pb.TagNumber(2)
  NodeCommandType get type => $_getN(1);
  @$pb.TagNumber(2)
  set type(NodeCommandType v) { setField(2, v); }
  @$pb.TagNumber(2)
  $core.bool hasType() => $_has(1);
  @$pb.TagNumber(2)
  void clearType() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get adapter => $_getSZ(2);
  @$pb.TagNumber(3)
  set adapter($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasAdapter() => $_has(2);
  @$pb.TagNumber(3)
  void clearAdapter() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get target => $_getSZ(3);
  @$pb.TagNumber(4)
  set target($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasTarget() => $_has(3);
  @$pb.TagNumber(4)
  void clearTarget() => clearField(4);

  @$pb.TagNumber(5)
  $core.String get sessionId => $_getSZ(4);
  @$pb.TagNumber(5)
  set sessionId($core.String v) { $_setString(4, v); }
  @$pb.TagNumber(5)
  $core.bool hasSessionId() => $_has(4);
  @$pb.TagNumber(5)
  void clearSessionId() => clearField(5);

  @$pb.TagNumber(6)
  $core.int get timeoutSec => $_getIZ(5);
  @$pb.TagNumber(6)
  set timeoutSec($core.int v) { $_setSignedInt32(5, v); }
  @$pb.TagNumber(6)
  $core.bool hasTimeoutSec() => $_has(5);
  @$pb.TagNumber(6)
  void clearTimeoutSec() => clearField(6);

  @$pb.TagNumber(7)
  $core.Map<$core.String, $core.String> get metadata => $_getMap(6);
}

class NodeCommandResponse extends $pb.GeneratedMessage {
  factory NodeCommandResponse({
    $core.String? requestId,
    NodeCommandType? type,
    $core.String? adapter,
    $core.String? target,
    $core.String? sessionId,
    AgentUsageStatus? usageStatus,
    $core.String? error,
    $core.Map<$core.String, $core.String>? result,
  }) {
    final $result = create();
    if (requestId != null) {
      $result.requestId = requestId;
    }
    if (type != null) {
      $result.type = type;
    }
    if (adapter != null) {
      $result.adapter = adapter;
    }
    if (target != null) {
      $result.target = target;
    }
    if (sessionId != null) {
      $result.sessionId = sessionId;
    }
    if (usageStatus != null) {
      $result.usageStatus = usageStatus;
    }
    if (error != null) {
      $result.error = error;
    }
    if (result != null) {
      $result.result.addAll(result);
    }
    return $result;
  }
  NodeCommandResponse._() : super();
  factory NodeCommandResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory NodeCommandResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NodeCommandResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..e<NodeCommandType>(2, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: NodeCommandType.NODE_COMMAND_TYPE_UNSPECIFIED, valueOf: NodeCommandType.valueOf, enumValues: NodeCommandType.values)
    ..aOS(3, _omitFieldNames ? '' : 'adapter')
    ..aOS(4, _omitFieldNames ? '' : 'target')
    ..aOS(5, _omitFieldNames ? '' : 'sessionId')
    ..aOM<AgentUsageStatus>(6, _omitFieldNames ? '' : 'usageStatus', subBuilder: AgentUsageStatus.create)
    ..aOS(7, _omitFieldNames ? '' : 'error')
    ..m<$core.String, $core.String>(8, _omitFieldNames ? '' : 'result', entryClassName: 'NodeCommandResponse.ResultEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('iop'))
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  NodeCommandResponse clone() => NodeCommandResponse()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  NodeCommandResponse copyWith(void Function(NodeCommandResponse) updates) => super.copyWith((message) => updates(message as NodeCommandResponse)) as NodeCommandResponse;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get requestId => $_getSZ(0);
  @$pb.TagNumber(1)
  set requestId($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasRequestId() => $_has(0);
  @$pb.TagNumber(1)
  void clearRequestId() => clearField(1);

  @$pb.TagNumber(2)
  NodeCommandType get type => $_getN(1);
  @$pb.TagNumber(2)
  set type(NodeCommandType v) { setField(2, v); }
  @$pb.TagNumber(2)
  $core.bool hasType() => $_has(1);
  @$pb.TagNumber(2)
  void clearType() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get adapter => $_getSZ(2);
  @$pb.TagNumber(3)
  set adapter($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasAdapter() => $_has(2);
  @$pb.TagNumber(3)
  void clearAdapter() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get target => $_getSZ(3);
  @$pb.TagNumber(4)
  set target($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasTarget() => $_has(3);
  @$pb.TagNumber(4)
  void clearTarget() => clearField(4);

  @$pb.TagNumber(5)
  $core.String get sessionId => $_getSZ(4);
  @$pb.TagNumber(5)
  set sessionId($core.String v) { $_setString(4, v); }
  @$pb.TagNumber(5)
  $core.bool hasSessionId() => $_has(4);
  @$pb.TagNumber(5)
  void clearSessionId() => clearField(5);

  @$pb.TagNumber(6)
  AgentUsageStatus get usageStatus => $_getN(5);
  @$pb.TagNumber(6)
  set usageStatus(AgentUsageStatus v) { setField(6, v); }
  @$pb.TagNumber(6)
  $core.bool hasUsageStatus() => $_has(5);
  @$pb.TagNumber(6)
  void clearUsageStatus() => clearField(6);
  @$pb.TagNumber(6)
  AgentUsageStatus ensureUsageStatus() => $_ensure(5);

  @$pb.TagNumber(7)
  $core.String get error => $_getSZ(6);
  @$pb.TagNumber(7)
  set error($core.String v) { $_setString(6, v); }
  @$pb.TagNumber(7)
  $core.bool hasError() => $_has(6);
  @$pb.TagNumber(7)
  void clearError() => clearField(7);

  /// result carries free-form key/value data for non-usage-status command types
  /// (capabilities, session_list, transport_status). usage_status keeps its
  /// dedicated typed payload.
  @$pb.TagNumber(8)
  $core.Map<$core.String, $core.String> get result => $_getMap(7);
}

class AgentUsageStatus extends $pb.GeneratedMessage {
  factory AgentUsageStatus({
    $core.String? rawOutput,
    $core.String? dailyLimit,
    $core.String? dailyResetTime,
    $core.String? weeklyLimit,
    $core.String? weeklyResetTime,
    $core.Map<$core.String, $core.String>? metadata,
  }) {
    final $result = create();
    if (rawOutput != null) {
      $result.rawOutput = rawOutput;
    }
    if (dailyLimit != null) {
      $result.dailyLimit = dailyLimit;
    }
    if (dailyResetTime != null) {
      $result.dailyResetTime = dailyResetTime;
    }
    if (weeklyLimit != null) {
      $result.weeklyLimit = weeklyLimit;
    }
    if (weeklyResetTime != null) {
      $result.weeklyResetTime = weeklyResetTime;
    }
    if (metadata != null) {
      $result.metadata.addAll(metadata);
    }
    return $result;
  }
  AgentUsageStatus._() : super();
  factory AgentUsageStatus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory AgentUsageStatus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AgentUsageStatus', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'rawOutput')
    ..aOS(2, _omitFieldNames ? '' : 'dailyLimit')
    ..aOS(3, _omitFieldNames ? '' : 'dailyResetTime')
    ..aOS(4, _omitFieldNames ? '' : 'weeklyLimit')
    ..aOS(5, _omitFieldNames ? '' : 'weeklyResetTime')
    ..m<$core.String, $core.String>(6, _omitFieldNames ? '' : 'metadata', entryClassName: 'AgentUsageStatus.MetadataEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('iop'))
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  AgentUsageStatus clone() => AgentUsageStatus()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  AgentUsageStatus copyWith(void Function(AgentUsageStatus) updates) => super.copyWith((message) => updates(message as AgentUsageStatus)) as AgentUsageStatus;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get rawOutput => $_getSZ(0);
  @$pb.TagNumber(1)
  set rawOutput($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasRawOutput() => $_has(0);
  @$pb.TagNumber(1)
  void clearRawOutput() => clearField(1);

  @$pb.TagNumber(2)
  $core.String get dailyLimit => $_getSZ(1);
  @$pb.TagNumber(2)
  set dailyLimit($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasDailyLimit() => $_has(1);
  @$pb.TagNumber(2)
  void clearDailyLimit() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get dailyResetTime => $_getSZ(2);
  @$pb.TagNumber(3)
  set dailyResetTime($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasDailyResetTime() => $_has(2);
  @$pb.TagNumber(3)
  void clearDailyResetTime() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get weeklyLimit => $_getSZ(3);
  @$pb.TagNumber(4)
  set weeklyLimit($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasWeeklyLimit() => $_has(3);
  @$pb.TagNumber(4)
  void clearWeeklyLimit() => clearField(4);

  @$pb.TagNumber(5)
  $core.String get weeklyResetTime => $_getSZ(4);
  @$pb.TagNumber(5)
  set weeklyResetTime($core.String v) { $_setString(4, v); }
  @$pb.TagNumber(5)
  $core.bool hasWeeklyResetTime() => $_has(4);
  @$pb.TagNumber(5)
  void clearWeeklyResetTime() => clearField(5);

  @$pb.TagNumber(6)
  $core.Map<$core.String, $core.String> get metadata => $_getMap(5);
}

/// Error is returned when a request fails at the transport layer.
class Error extends $pb.GeneratedMessage {
  factory Error({
    $core.String? code,
    $core.String? message,
  }) {
    final $result = create();
    if (code != null) {
      $result.code = code;
    }
    if (message != null) {
      $result.message = message;
    }
    return $result;
  }
  Error._() : super();
  factory Error.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory Error.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Error', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'code')
    ..aOS(2, _omitFieldNames ? '' : 'message')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  Error clone() => Error()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  Error copyWith(void Function(Error) updates) => super.copyWith((message) => updates(message as Error)) as Error;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get code => $_getSZ(0);
  @$pb.TagNumber(1)
  set code($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasCode() => $_has(0);
  @$pb.TagNumber(1)
  void clearCode() => clearField(1);

  @$pb.TagNumber(2)
  $core.String get message => $_getSZ(1);
  @$pb.TagNumber(2)
  set message($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasMessage() => $_has(1);
  @$pb.TagNumber(2)
  void clearMessage() => clearField(2);
}

/// RegisterRequest is sent by node to edge immediately on connect.
class RegisterRequest extends $pb.GeneratedMessage {
  factory RegisterRequest({
    $core.String? token,
  }) {
    final $result = create();
    if (token != null) {
      $result.token = token;
    }
    return $result;
  }
  RegisterRequest._() : super();
  factory RegisterRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory RegisterRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RegisterRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'token')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  RegisterRequest clone() => RegisterRequest()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  RegisterRequest copyWith(void Function(RegisterRequest) updates) => super.copyWith((message) => updates(message as RegisterRequest)) as RegisterRequest;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get token => $_getSZ(0);
  @$pb.TagNumber(1)
  set token($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasToken() => $_has(0);
  @$pb.TagNumber(1)
  void clearToken() => clearField(1);
}

/// RegisterResponse is sent by edge to node in response to RegisterRequest.
class RegisterResponse extends $pb.GeneratedMessage {
  factory RegisterResponse({
    $core.bool? accepted,
    $core.String? nodeId,
    $core.String? alias,
    $core.String? reason,
    NodeConfigPayload? config,
  }) {
    final $result = create();
    if (accepted != null) {
      $result.accepted = accepted;
    }
    if (nodeId != null) {
      $result.nodeId = nodeId;
    }
    if (alias != null) {
      $result.alias = alias;
    }
    if (reason != null) {
      $result.reason = reason;
    }
    if (config != null) {
      $result.config = config;
    }
    return $result;
  }
  RegisterResponse._() : super();
  factory RegisterResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory RegisterResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RegisterResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOB(1, _omitFieldNames ? '' : 'accepted')
    ..aOS(2, _omitFieldNames ? '' : 'nodeId')
    ..aOS(3, _omitFieldNames ? '' : 'alias')
    ..aOS(4, _omitFieldNames ? '' : 'reason')
    ..aOM<NodeConfigPayload>(5, _omitFieldNames ? '' : 'config', subBuilder: NodeConfigPayload.create)
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  RegisterResponse clone() => RegisterResponse()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  RegisterResponse copyWith(void Function(RegisterResponse) updates) => super.copyWith((message) => updates(message as RegisterResponse)) as RegisterResponse;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.bool get accepted => $_getBF(0);
  @$pb.TagNumber(1)
  set accepted($core.bool v) { $_setBool(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasAccepted() => $_has(0);
  @$pb.TagNumber(1)
  void clearAccepted() => clearField(1);

  @$pb.TagNumber(2)
  $core.String get nodeId => $_getSZ(1);
  @$pb.TagNumber(2)
  set nodeId($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasNodeId() => $_has(1);
  @$pb.TagNumber(2)
  void clearNodeId() => clearField(2);

  @$pb.TagNumber(3)
  $core.String get alias => $_getSZ(2);
  @$pb.TagNumber(3)
  set alias($core.String v) { $_setString(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasAlias() => $_has(2);
  @$pb.TagNumber(3)
  void clearAlias() => clearField(3);

  @$pb.TagNumber(4)
  $core.String get reason => $_getSZ(3);
  @$pb.TagNumber(4)
  set reason($core.String v) { $_setString(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasReason() => $_has(3);
  @$pb.TagNumber(4)
  void clearReason() => clearField(4);

  @$pb.TagNumber(5)
  NodeConfigPayload get config => $_getN(4);
  @$pb.TagNumber(5)
  set config(NodeConfigPayload v) { setField(5, v); }
  @$pb.TagNumber(5)
  $core.bool hasConfig() => $_has(4);
  @$pb.TagNumber(5)
  void clearConfig() => clearField(5);
  @$pb.TagNumber(5)
  NodeConfigPayload ensureConfig() => $_ensure(4);
}

/// NodeConfigPayload carries all configuration edge pushes to the node.
class NodeConfigPayload extends $pb.GeneratedMessage {
  factory NodeConfigPayload({
    $core.Iterable<AdapterConfig>? adapters,
    NodeRuntimeConfig? runtime,
  }) {
    final $result = create();
    if (adapters != null) {
      $result.adapters.addAll(adapters);
    }
    if (runtime != null) {
      $result.runtime = runtime;
    }
    return $result;
  }
  NodeConfigPayload._() : super();
  factory NodeConfigPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory NodeConfigPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NodeConfigPayload', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..pc<AdapterConfig>(1, _omitFieldNames ? '' : 'adapters', $pb.PbFieldType.PM, subBuilder: AdapterConfig.create)
    ..aOM<NodeRuntimeConfig>(2, _omitFieldNames ? '' : 'runtime', subBuilder: NodeRuntimeConfig.create)
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  NodeConfigPayload clone() => NodeConfigPayload()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  NodeConfigPayload copyWith(void Function(NodeConfigPayload) updates) => super.copyWith((message) => updates(message as NodeConfigPayload)) as NodeConfigPayload;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.List<AdapterConfig> get adapters => $_getList(0);

  @$pb.TagNumber(2)
  NodeRuntimeConfig get runtime => $_getN(1);
  @$pb.TagNumber(2)
  set runtime(NodeRuntimeConfig v) { setField(2, v); }
  @$pb.TagNumber(2)
  $core.bool hasRuntime() => $_has(1);
  @$pb.TagNumber(2)
  void clearRuntime() => clearField(2);
  @$pb.TagNumber(2)
  NodeRuntimeConfig ensureRuntime() => $_ensure(1);
}

enum AdapterConfig_Config {
  cli, 
  ollama, 
  vllm, 
  notSet
}

/// AdapterConfig describes one adapter to enable on the node.
class AdapterConfig extends $pb.GeneratedMessage {
  factory AdapterConfig({
    $core.String? type,
    $core.bool? enabled,
    $0.Struct? settings,
    CLIAdapterConfig? cli,
    OllamaAdapterConfig? ollama,
    VllmAdapterConfig? vllm,
  }) {
    final $result = create();
    if (type != null) {
      $result.type = type;
    }
    if (enabled != null) {
      $result.enabled = enabled;
    }
    if (settings != null) {
      $result.settings = settings;
    }
    if (cli != null) {
      $result.cli = cli;
    }
    if (ollama != null) {
      $result.ollama = ollama;
    }
    if (vllm != null) {
      $result.vllm = vllm;
    }
    return $result;
  }
  AdapterConfig._() : super();
  factory AdapterConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory AdapterConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static const $core.Map<$core.int, AdapterConfig_Config> _AdapterConfig_ConfigByTag = {
    4 : AdapterConfig_Config.cli,
    5 : AdapterConfig_Config.ollama,
    6 : AdapterConfig_Config.vllm,
    0 : AdapterConfig_Config.notSet
  };
  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AdapterConfig', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..oo(0, [4, 5, 6])
    ..aOS(1, _omitFieldNames ? '' : 'type')
    ..aOB(2, _omitFieldNames ? '' : 'enabled')
    ..aOM<$0.Struct>(3, _omitFieldNames ? '' : 'settings', subBuilder: $0.Struct.create)
    ..aOM<CLIAdapterConfig>(4, _omitFieldNames ? '' : 'cli', subBuilder: CLIAdapterConfig.create)
    ..aOM<OllamaAdapterConfig>(5, _omitFieldNames ? '' : 'ollama', subBuilder: OllamaAdapterConfig.create)
    ..aOM<VllmAdapterConfig>(6, _omitFieldNames ? '' : 'vllm', subBuilder: VllmAdapterConfig.create)
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  AdapterConfig clone() => AdapterConfig()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  AdapterConfig copyWith(void Function(AdapterConfig) updates) => super.copyWith((message) => updates(message as AdapterConfig)) as AdapterConfig;

  $pb.BuilderInfo get info_ => _i;

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

  AdapterConfig_Config whichConfig() => _AdapterConfig_ConfigByTag[$_whichOneof(0)]!;
  void clearConfig() => clearField($_whichOneof(0));

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

  @$pb.TagNumber(2)
  $core.bool get enabled => $_getBF(1);
  @$pb.TagNumber(2)
  set enabled($core.bool v) { $_setBool(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasEnabled() => $_has(1);
  @$pb.TagNumber(2)
  void clearEnabled() => clearField(2);

  @$pb.TagNumber(3)
  $0.Struct get settings => $_getN(2);
  @$pb.TagNumber(3)
  set settings($0.Struct v) { setField(3, v); }
  @$pb.TagNumber(3)
  $core.bool hasSettings() => $_has(2);
  @$pb.TagNumber(3)
  void clearSettings() => clearField(3);
  @$pb.TagNumber(3)
  $0.Struct ensureSettings() => $_ensure(2);

  @$pb.TagNumber(4)
  CLIAdapterConfig get cli => $_getN(3);
  @$pb.TagNumber(4)
  set cli(CLIAdapterConfig v) { setField(4, v); }
  @$pb.TagNumber(4)
  $core.bool hasCli() => $_has(3);
  @$pb.TagNumber(4)
  void clearCli() => clearField(4);
  @$pb.TagNumber(4)
  CLIAdapterConfig ensureCli() => $_ensure(3);

  @$pb.TagNumber(5)
  OllamaAdapterConfig get ollama => $_getN(4);
  @$pb.TagNumber(5)
  set ollama(OllamaAdapterConfig v) { setField(5, v); }
  @$pb.TagNumber(5)
  $core.bool hasOllama() => $_has(4);
  @$pb.TagNumber(5)
  void clearOllama() => clearField(5);
  @$pb.TagNumber(5)
  OllamaAdapterConfig ensureOllama() => $_ensure(4);

  @$pb.TagNumber(6)
  VllmAdapterConfig get vllm => $_getN(5);
  @$pb.TagNumber(6)
  set vllm(VllmAdapterConfig v) { setField(6, v); }
  @$pb.TagNumber(6)
  $core.bool hasVllm() => $_has(5);
  @$pb.TagNumber(6)
  void clearVllm() => clearField(6);
  @$pb.TagNumber(6)
  VllmAdapterConfig ensureVllm() => $_ensure(5);
}

class CLIAdapterConfig extends $pb.GeneratedMessage {
  factory CLIAdapterConfig({
    $core.Map<$core.String, CLIProfileConfig>? profiles,
  }) {
    final $result = create();
    if (profiles != null) {
      $result.profiles.addAll(profiles);
    }
    return $result;
  }
  CLIAdapterConfig._() : super();
  factory CLIAdapterConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory CLIAdapterConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CLIAdapterConfig', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..m<$core.String, CLIProfileConfig>(1, _omitFieldNames ? '' : 'profiles', entryClassName: 'CLIAdapterConfig.ProfilesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: CLIProfileConfig.create, valueDefaultOrMaker: CLIProfileConfig.getDefault, packageName: const $pb.PackageName('iop'))
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  CLIAdapterConfig clone() => CLIAdapterConfig()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  CLIAdapterConfig copyWith(void Function(CLIAdapterConfig) updates) => super.copyWith((message) => updates(message as CLIAdapterConfig)) as CLIAdapterConfig;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.Map<$core.String, CLIProfileConfig> get profiles => $_getMap(0);
}

class CLIProfileConfig extends $pb.GeneratedMessage {
  factory CLIProfileConfig({
    $core.String? command,
    $core.Iterable<$core.String>? args,
    $core.Iterable<$core.String>? env,
    $core.bool? persistent,
    $core.bool? terminal,
    $core.int? responseIdleTimeoutMs,
    $core.int? startupIdleTimeoutMs,
    $core.String? outputFormat,
    CLICompletionMarker? completionMarker,
    $core.String? mode,
    $core.Iterable<$core.String>? resumeArgs,
  }) {
    final $result = create();
    if (command != null) {
      $result.command = command;
    }
    if (args != null) {
      $result.args.addAll(args);
    }
    if (env != null) {
      $result.env.addAll(env);
    }
    if (persistent != null) {
      $result.persistent = persistent;
    }
    if (terminal != null) {
      $result.terminal = terminal;
    }
    if (responseIdleTimeoutMs != null) {
      $result.responseIdleTimeoutMs = responseIdleTimeoutMs;
    }
    if (startupIdleTimeoutMs != null) {
      $result.startupIdleTimeoutMs = startupIdleTimeoutMs;
    }
    if (outputFormat != null) {
      $result.outputFormat = outputFormat;
    }
    if (completionMarker != null) {
      $result.completionMarker = completionMarker;
    }
    if (mode != null) {
      $result.mode = mode;
    }
    if (resumeArgs != null) {
      $result.resumeArgs.addAll(resumeArgs);
    }
    return $result;
  }
  CLIProfileConfig._() : super();
  factory CLIProfileConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory CLIProfileConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CLIProfileConfig', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'command')
    ..pPS(2, _omitFieldNames ? '' : 'args')
    ..pPS(3, _omitFieldNames ? '' : 'env')
    ..aOB(4, _omitFieldNames ? '' : 'persistent')
    ..aOB(5, _omitFieldNames ? '' : 'terminal')
    ..a<$core.int>(6, _omitFieldNames ? '' : 'responseIdleTimeoutMs', $pb.PbFieldType.O3)
    ..a<$core.int>(7, _omitFieldNames ? '' : 'startupIdleTimeoutMs', $pb.PbFieldType.O3)
    ..aOS(8, _omitFieldNames ? '' : 'outputFormat')
    ..aOM<CLICompletionMarker>(9, _omitFieldNames ? '' : 'completionMarker', subBuilder: CLICompletionMarker.create)
    ..aOS(10, _omitFieldNames ? '' : 'mode')
    ..pPS(11, _omitFieldNames ? '' : 'resumeArgs')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  CLIProfileConfig clone() => CLIProfileConfig()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  CLIProfileConfig copyWith(void Function(CLIProfileConfig) updates) => super.copyWith((message) => updates(message as CLIProfileConfig)) as CLIProfileConfig;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get command => $_getSZ(0);
  @$pb.TagNumber(1)
  set command($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasCommand() => $_has(0);
  @$pb.TagNumber(1)
  void clearCommand() => clearField(1);

  @$pb.TagNumber(2)
  $core.List<$core.String> get args => $_getList(1);

  @$pb.TagNumber(3)
  $core.List<$core.String> get env => $_getList(2);

  @$pb.TagNumber(4)
  $core.bool get persistent => $_getBF(3);
  @$pb.TagNumber(4)
  set persistent($core.bool v) { $_setBool(3, v); }
  @$pb.TagNumber(4)
  $core.bool hasPersistent() => $_has(3);
  @$pb.TagNumber(4)
  void clearPersistent() => clearField(4);

  @$pb.TagNumber(5)
  $core.bool get terminal => $_getBF(4);
  @$pb.TagNumber(5)
  set terminal($core.bool v) { $_setBool(4, v); }
  @$pb.TagNumber(5)
  $core.bool hasTerminal() => $_has(4);
  @$pb.TagNumber(5)
  void clearTerminal() => clearField(5);

  @$pb.TagNumber(6)
  $core.int get responseIdleTimeoutMs => $_getIZ(5);
  @$pb.TagNumber(6)
  set responseIdleTimeoutMs($core.int v) { $_setSignedInt32(5, v); }
  @$pb.TagNumber(6)
  $core.bool hasResponseIdleTimeoutMs() => $_has(5);
  @$pb.TagNumber(6)
  void clearResponseIdleTimeoutMs() => clearField(6);

  @$pb.TagNumber(7)
  $core.int get startupIdleTimeoutMs => $_getIZ(6);
  @$pb.TagNumber(7)
  set startupIdleTimeoutMs($core.int v) { $_setSignedInt32(6, v); }
  @$pb.TagNumber(7)
  $core.bool hasStartupIdleTimeoutMs() => $_has(6);
  @$pb.TagNumber(7)
  void clearStartupIdleTimeoutMs() => clearField(7);

  @$pb.TagNumber(8)
  $core.String get outputFormat => $_getSZ(7);
  @$pb.TagNumber(8)
  set outputFormat($core.String v) { $_setString(7, v); }
  @$pb.TagNumber(8)
  $core.bool hasOutputFormat() => $_has(7);
  @$pb.TagNumber(8)
  void clearOutputFormat() => clearField(8);

  @$pb.TagNumber(9)
  CLICompletionMarker get completionMarker => $_getN(8);
  @$pb.TagNumber(9)
  set completionMarker(CLICompletionMarker v) { setField(9, v); }
  @$pb.TagNumber(9)
  $core.bool hasCompletionMarker() => $_has(8);
  @$pb.TagNumber(9)
  void clearCompletionMarker() => clearField(9);
  @$pb.TagNumber(9)
  CLICompletionMarker ensureCompletionMarker() => $_ensure(8);

  @$pb.TagNumber(10)
  $core.String get mode => $_getSZ(9);
  @$pb.TagNumber(10)
  set mode($core.String v) { $_setString(9, v); }
  @$pb.TagNumber(10)
  $core.bool hasMode() => $_has(9);
  @$pb.TagNumber(10)
  void clearMode() => clearField(10);

  @$pb.TagNumber(11)
  $core.List<$core.String> get resumeArgs => $_getList(10);
}

class CLICompletionMarker extends $pb.GeneratedMessage {
  factory CLICompletionMarker({
    $core.String? line,
    $core.String? regex,
  }) {
    final $result = create();
    if (line != null) {
      $result.line = line;
    }
    if (regex != null) {
      $result.regex = regex;
    }
    return $result;
  }
  CLICompletionMarker._() : super();
  factory CLICompletionMarker.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory CLICompletionMarker.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CLICompletionMarker', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'line')
    ..aOS(2, _omitFieldNames ? '' : 'regex')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  CLICompletionMarker clone() => CLICompletionMarker()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  CLICompletionMarker copyWith(void Function(CLICompletionMarker) updates) => super.copyWith((message) => updates(message as CLICompletionMarker)) as CLICompletionMarker;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get line => $_getSZ(0);
  @$pb.TagNumber(1)
  set line($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasLine() => $_has(0);
  @$pb.TagNumber(1)
  void clearLine() => clearField(1);

  @$pb.TagNumber(2)
  $core.String get regex => $_getSZ(1);
  @$pb.TagNumber(2)
  set regex($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasRegex() => $_has(1);
  @$pb.TagNumber(2)
  void clearRegex() => clearField(2);
}

class OllamaAdapterConfig extends $pb.GeneratedMessage {
  factory OllamaAdapterConfig({
    $core.String? baseUrl,
    $core.int? contextSize,
  }) {
    final $result = create();
    if (baseUrl != null) {
      $result.baseUrl = baseUrl;
    }
    if (contextSize != null) {
      $result.contextSize = contextSize;
    }
    return $result;
  }
  OllamaAdapterConfig._() : super();
  factory OllamaAdapterConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory OllamaAdapterConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'OllamaAdapterConfig', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'baseUrl')
    ..a<$core.int>(2, _omitFieldNames ? '' : 'contextSize', $pb.PbFieldType.O3)
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  OllamaAdapterConfig clone() => OllamaAdapterConfig()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  OllamaAdapterConfig copyWith(void Function(OllamaAdapterConfig) updates) => super.copyWith((message) => updates(message as OllamaAdapterConfig)) as OllamaAdapterConfig;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get baseUrl => $_getSZ(0);
  @$pb.TagNumber(1)
  set baseUrl($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasBaseUrl() => $_has(0);
  @$pb.TagNumber(1)
  void clearBaseUrl() => clearField(1);

  @$pb.TagNumber(2)
  $core.int get contextSize => $_getIZ(1);
  @$pb.TagNumber(2)
  set contextSize($core.int v) { $_setSignedInt32(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasContextSize() => $_has(1);
  @$pb.TagNumber(2)
  void clearContextSize() => clearField(2);
}

class VllmAdapterConfig extends $pb.GeneratedMessage {
  factory VllmAdapterConfig({
    $core.String? endpoint,
  }) {
    final $result = create();
    if (endpoint != null) {
      $result.endpoint = endpoint;
    }
    return $result;
  }
  VllmAdapterConfig._() : super();
  factory VllmAdapterConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory VllmAdapterConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'VllmAdapterConfig', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'endpoint')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  VllmAdapterConfig clone() => VllmAdapterConfig()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  VllmAdapterConfig copyWith(void Function(VllmAdapterConfig) updates) => super.copyWith((message) => updates(message as VllmAdapterConfig)) as VllmAdapterConfig;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.String get endpoint => $_getSZ(0);
  @$pb.TagNumber(1)
  set endpoint($core.String v) { $_setString(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasEndpoint() => $_has(0);
  @$pb.TagNumber(1)
  void clearEndpoint() => clearField(1);
}

/// NodeRuntimeConfig is the runtime tuning pushed to the node.
class NodeRuntimeConfig extends $pb.GeneratedMessage {
  factory NodeRuntimeConfig({
    $core.int? concurrency,
    $core.String? workspaceRoot,
  }) {
    final $result = create();
    if (concurrency != null) {
      $result.concurrency = concurrency;
    }
    if (workspaceRoot != null) {
      $result.workspaceRoot = workspaceRoot;
    }
    return $result;
  }
  NodeRuntimeConfig._() : super();
  factory NodeRuntimeConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory NodeRuntimeConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NodeRuntimeConfig', package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'), createEmptyInstance: create)
    ..a<$core.int>(1, _omitFieldNames ? '' : 'concurrency', $pb.PbFieldType.O3)
    ..aOS(2, _omitFieldNames ? '' : 'workspaceRoot')
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  NodeRuntimeConfig clone() => NodeRuntimeConfig()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  NodeRuntimeConfig copyWith(void Function(NodeRuntimeConfig) updates) => super.copyWith((message) => updates(message as NodeRuntimeConfig)) as NodeRuntimeConfig;

  $pb.BuilderInfo get info_ => _i;

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

  @$pb.TagNumber(1)
  $core.int get concurrency => $_getIZ(0);
  @$pb.TagNumber(1)
  set concurrency($core.int v) { $_setSignedInt32(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasConcurrency() => $_has(0);
  @$pb.TagNumber(1)
  void clearConcurrency() => clearField(1);

  @$pb.TagNumber(2)
  $core.String get workspaceRoot => $_getSZ(1);
  @$pb.TagNumber(2)
  set workspaceRoot($core.String v) { $_setString(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasWorkspaceRoot() => $_has(1);
  @$pb.TagNumber(2)
  void clearWorkspaceRoot() => clearField(2);
}


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