// This is a generated file - do not edit.
//
// Generated from proto/iop/runtime.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 'package:protobuf/well_known_types/google/protobuf/struct.pb.dart' as $0;

import 'runtime.pbenum.dart';

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

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,
    $0.Struct? policy,
    $0.Struct? input,
    $core.int? timeoutSec,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? metadata,
    $core.String? sessionId,
    $core.bool? background,
    $fixnum.Int64? responseStallTimeoutMs,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    if (adapter != null) result.adapter = adapter;
    if (target != null) result.target = target;
    if (policy != null) result.policy = policy;
    if (input != null) result.input = input;
    if (timeoutSec != null) result.timeoutSec = timeoutSec;
    if (metadata != null) result.metadata.addEntries(metadata);
    if (sessionId != null) result.sessionId = sessionId;
    if (background != null) result.background = background;
    if (responseStallTimeoutMs != null)
      result.responseStallTimeoutMs = responseStallTimeoutMs;
    return result;
  }

  RunRequest._();

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

  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')
    ..aOM<$0.Struct>(5, _omitFieldNames ? '' : 'policy',
        subBuilder: $0.Struct.create)
    ..aOM<$0.Struct>(6, _omitFieldNames ? '' : 'input',
        subBuilder: $0.Struct.create)
    ..aI(7, _omitFieldNames ? '' : 'timeoutSec')
    ..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')
    ..aOB(11, _omitFieldNames ? '' : 'background')
    ..aInt64(12, _omitFieldNames ? '' : 'responseStallTimeoutMs')
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static RunRequest create() => RunRequest._();
  @$core.override
  RunRequest createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$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 value) => $_setString(1, value);
  @$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 value) => $_setString(2, value);
  @$pb.TagNumber(3)
  $core.bool hasTarget() => $_has(2);
  @$pb.TagNumber(3)
  void clearTarget() => $_clearField(3);

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

  @$pb.TagNumber(6)
  $0.Struct get input => $_getN(4);
  @$pb.TagNumber(6)
  set input($0.Struct value) => $_setField(6, value);
  @$pb.TagNumber(6)
  $core.bool hasInput() => $_has(4);
  @$pb.TagNumber(6)
  void clearInput() => $_clearField(6);
  @$pb.TagNumber(6)
  $0.Struct ensureInput() => $_ensure(4);

  @$pb.TagNumber(7)
  $core.int get timeoutSec => $_getIZ(5);
  @$pb.TagNumber(7)
  set timeoutSec($core.int value) => $_setSignedInt32(5, value);
  @$pb.TagNumber(7)
  $core.bool hasTimeoutSec() => $_has(5);
  @$pb.TagNumber(7)
  void clearTimeoutSec() => $_clearField(7);

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

  @$pb.TagNumber(9)
  $core.String get sessionId => $_getSZ(7);
  @$pb.TagNumber(9)
  set sessionId($core.String value) => $_setString(7, value);
  @$pb.TagNumber(9)
  $core.bool hasSessionId() => $_has(7);
  @$pb.TagNumber(9)
  void clearSessionId() => $_clearField(9);

  @$pb.TagNumber(11)
  $core.bool get background => $_getBF(8);
  @$pb.TagNumber(11)
  set background($core.bool value) => $_setBool(8, value);
  @$pb.TagNumber(11)
  $core.bool hasBackground() => $_has(8);
  @$pb.TagNumber(11)
  void clearBackground() => $_clearField(11);

  /// response_stall_timeout_ms is the selected provider's response-stall
  /// timeout in milliseconds. Zero means the Node applies the documented
  /// default (300000). Negative or overflow values are rejected at the Node
  /// boundary before router/provider invocation.
  @$pb.TagNumber(12)
  $fixnum.Int64 get responseStallTimeoutMs => $_getI64(9);
  @$pb.TagNumber(12)
  set responseStallTimeoutMs($fixnum.Int64 value) => $_setInt64(9, value);
  @$pb.TagNumber(12)
  $core.bool hasResponseStallTimeoutMs() => $_has(9);
  @$pb.TagNumber(12)
  void clearResponseStallTimeoutMs() => $_clearField(12);
}

/// 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.Iterable<$core.MapEntry<$core.String, $core.String>>? metadata,
    $fixnum.Int64? timestamp,
    $core.String? sessionId,
    $core.bool? background,
    $core.String? nodeId,
    $core.String? nodeAlias,
    ExecutionFailure? failure,
  }) {
    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.addEntries(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;
    if (failure != null) result.failure = failure;
    return result;
  }

  RunEvent._();

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

  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')
    ..aOM<ExecutionFailure>(13, _omitFieldNames ? '' : 'failure',
        subBuilder: ExecutionFailure.create)
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static RunEvent create() => RunEvent._();
  @$core.override
  RunEvent createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$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 value) => $_setString(1, value);
  @$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 value) => $_setString(2, value);
  @$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 value) => $_setString(3, value);
  @$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 value) => $_setString(4, value);
  @$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 value) => $_setField(6, value);
  @$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)
  $pb.PbMap<$core.String, $core.String> get metadata => $_getMap(6);

  @$pb.TagNumber(8)
  $fixnum.Int64 get timestamp => $_getI64(7);
  @$pb.TagNumber(8)
  set timestamp($fixnum.Int64 value) => $_setInt64(7, value);
  @$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 value) => $_setString(8, value);
  @$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 value) => $_setBool(9, value);
  @$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 value) => $_setString(10, value);
  @$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 value) => $_setString(11, value);
  @$pb.TagNumber(12)
  $core.bool hasNodeAlias() => $_has(11);
  @$pb.TagNumber(12)
  void clearNodeAlias() => $_clearField(12);

  @$pb.TagNumber(13)
  ExecutionFailure get failure => $_getN(12);
  @$pb.TagNumber(13)
  set failure(ExecutionFailure value) => $_setField(13, value);
  @$pb.TagNumber(13)
  $core.bool hasFailure() => $_has(12);
  @$pb.TagNumber(13)
  void clearFailure() => $_clearField(13);
  @$pb.TagNumber(13)
  ExecutionFailure ensureFailure() => $_ensure(12);
}

/// ProviderTunnelRequest asks a node to open a provider HTTP request and relay
/// the raw provider response over ProviderTunnelFrame messages on the existing
/// Edge-Node socket. It is separate from RunRequest, which remains the
/// normalized adapter execution path.
class ProviderTunnelRequest extends $pb.GeneratedMessage {
  factory ProviderTunnelRequest({
    $core.String? runId,
    $core.String? tunnelId,
    $core.String? adapter,
    $core.String? target,
    $core.String? method,
    $core.String? path,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? headers,
    $core.List<$core.int>? body,
    $core.bool? stream,
    $core.int? timeoutSec,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? metadata,
    $core.String? sessionId,
    $core.String? operation,
    SignedCredentialLease? credentialLease,
    CredentialLeaseBinding? credentialBinding,
    $fixnum.Int64? responseStallTimeoutMs,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    if (tunnelId != null) result.tunnelId = tunnelId;
    if (adapter != null) result.adapter = adapter;
    if (target != null) result.target = target;
    if (method != null) result.method = method;
    if (path != null) result.path = path;
    if (headers != null) result.headers.addEntries(headers);
    if (body != null) result.body = body;
    if (stream != null) result.stream = stream;
    if (timeoutSec != null) result.timeoutSec = timeoutSec;
    if (metadata != null) result.metadata.addEntries(metadata);
    if (sessionId != null) result.sessionId = sessionId;
    if (operation != null) result.operation = operation;
    if (credentialLease != null) result.credentialLease = credentialLease;
    if (credentialBinding != null) result.credentialBinding = credentialBinding;
    if (responseStallTimeoutMs != null)
      result.responseStallTimeoutMs = responseStallTimeoutMs;
    return result;
  }

  ProviderTunnelRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ProviderTunnelRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'runId')
    ..aOS(2, _omitFieldNames ? '' : 'tunnelId')
    ..aOS(3, _omitFieldNames ? '' : 'adapter')
    ..aOS(4, _omitFieldNames ? '' : 'target')
    ..aOS(5, _omitFieldNames ? '' : 'method')
    ..aOS(6, _omitFieldNames ? '' : 'path')
    ..m<$core.String, $core.String>(7, _omitFieldNames ? '' : 'headers',
        entryClassName: 'ProviderTunnelRequest.HeadersEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..a<$core.List<$core.int>>(
        8, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY)
    ..aOB(9, _omitFieldNames ? '' : 'stream')
    ..aI(10, _omitFieldNames ? '' : 'timeoutSec')
    ..m<$core.String, $core.String>(11, _omitFieldNames ? '' : 'metadata',
        entryClassName: 'ProviderTunnelRequest.MetadataEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..aOS(12, _omitFieldNames ? '' : 'sessionId')
    ..aOS(13, _omitFieldNames ? '' : 'operation')
    ..aOM<SignedCredentialLease>(14, _omitFieldNames ? '' : 'credentialLease',
        subBuilder: SignedCredentialLease.create)
    ..aOM<CredentialLeaseBinding>(
        15, _omitFieldNames ? '' : 'credentialBinding',
        subBuilder: CredentialLeaseBinding.create)
    ..aInt64(16, _omitFieldNames ? '' : 'responseStallTimeoutMs')
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static ProviderTunnelRequest create() => ProviderTunnelRequest._();
  @$core.override
  ProviderTunnelRequest createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static ProviderTunnelRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<ProviderTunnelRequest>(create);
  static ProviderTunnelRequest? _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)
  $core.String get tunnelId => $_getSZ(1);
  @$pb.TagNumber(2)
  set tunnelId($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasTunnelId() => $_has(1);
  @$pb.TagNumber(2)
  void clearTunnelId() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.String get adapter => $_getSZ(2);
  @$pb.TagNumber(3)
  set adapter($core.String value) => $_setString(2, value);
  @$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 value) => $_setString(3, value);
  @$pb.TagNumber(4)
  $core.bool hasTarget() => $_has(3);
  @$pb.TagNumber(4)
  void clearTarget() => $_clearField(4);

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

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

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

  @$pb.TagNumber(8)
  $core.List<$core.int> get body => $_getN(7);
  @$pb.TagNumber(8)
  set body($core.List<$core.int> value) => $_setBytes(7, value);
  @$pb.TagNumber(8)
  $core.bool hasBody() => $_has(7);
  @$pb.TagNumber(8)
  void clearBody() => $_clearField(8);

  @$pb.TagNumber(9)
  $core.bool get stream => $_getBF(8);
  @$pb.TagNumber(9)
  set stream($core.bool value) => $_setBool(8, value);
  @$pb.TagNumber(9)
  $core.bool hasStream() => $_has(8);
  @$pb.TagNumber(9)
  void clearStream() => $_clearField(9);

  @$pb.TagNumber(10)
  $core.int get timeoutSec => $_getIZ(9);
  @$pb.TagNumber(10)
  set timeoutSec($core.int value) => $_setSignedInt32(9, value);
  @$pb.TagNumber(10)
  $core.bool hasTimeoutSec() => $_has(9);
  @$pb.TagNumber(10)
  void clearTimeoutSec() => $_clearField(10);

  @$pb.TagNumber(11)
  $pb.PbMap<$core.String, $core.String> get metadata => $_getMap(10);

  @$pb.TagNumber(12)
  $core.String get sessionId => $_getSZ(11);
  @$pb.TagNumber(12)
  set sessionId($core.String value) => $_setString(11, value);
  @$pb.TagNumber(12)
  $core.bool hasSessionId() => $_has(11);
  @$pb.TagNumber(12)
  void clearSessionId() => $_clearField(12);

  /// operation is the protocol operation id (e.g. "chat_completions",
  /// "messages", "models"). When set, the Node adapter resolves the request URL
  /// from the concrete profile's operation path. When empty, the legacy Path
  /// field is used as a mixed-version fallback.
  @$pb.TagNumber(13)
  $core.String get operation => $_getSZ(12);
  @$pb.TagNumber(13)
  set operation($core.String value) => $_setString(12, value);
  @$pb.TagNumber(13)
  $core.bool hasOperation() => $_has(12);
  @$pb.TagNumber(13)
  void clearOperation() => $_clearField(13);

  /// credential_lease is a signed, recipient-sealed credential envelope. It is
  /// deliberately separate from headers/metadata so protobuf debug output and
  /// generic forwarding paths cannot expose plaintext provider credentials.
  @$pb.TagNumber(14)
  SignedCredentialLease get credentialLease => $_getN(13);
  @$pb.TagNumber(14)
  set credentialLease(SignedCredentialLease value) => $_setField(14, value);
  @$pb.TagNumber(14)
  $core.bool hasCredentialLease() => $_has(13);
  @$pb.TagNumber(14)
  void clearCredentialLease() => $_clearField(14);
  @$pb.TagNumber(14)
  SignedCredentialLease ensureCredentialLease() => $_ensure(13);

  /// credential_binding is the independently resolved Edge dispatch binding
  /// the Node compares byte-for-byte with the signed lease before consumption.
  @$pb.TagNumber(15)
  CredentialLeaseBinding get credentialBinding => $_getN(14);
  @$pb.TagNumber(15)
  set credentialBinding(CredentialLeaseBinding value) => $_setField(15, value);
  @$pb.TagNumber(15)
  $core.bool hasCredentialBinding() => $_has(14);
  @$pb.TagNumber(15)
  void clearCredentialBinding() => $_clearField(15);
  @$pb.TagNumber(15)
  CredentialLeaseBinding ensureCredentialBinding() => $_ensure(14);

  /// response_stall_timeout_ms is the selected provider's response-stall
  /// timeout in milliseconds. Zero means the Node applies the documented
  /// default (300000). Negative or overflow values are rejected at the Node
  /// boundary before router/provider invocation.
  @$pb.TagNumber(16)
  $fixnum.Int64 get responseStallTimeoutMs => $_getI64(15);
  @$pb.TagNumber(16)
  set responseStallTimeoutMs($fixnum.Int64 value) => $_setInt64(15, value);
  @$pb.TagNumber(16)
  $core.bool hasResponseStallTimeoutMs() => $_has(15);
  @$pb.TagNumber(16)
  void clearResponseStallTimeoutMs() => $_clearField(16);
}

class CredentialLeaseScope extends $pb.GeneratedMessage {
  factory CredentialLeaseScope({
    $core.String? leaseId,
    $core.String? principalRef,
    $core.String? credentialSlotRef,
    $core.String? routeId,
    $core.String? profileId,
    $core.String? upstreamTarget,
    $core.String? nodeId,
    $core.String? recipientKeyId,
    $core.String? headerName,
    $core.String? scheme,
    $fixnum.Int64? credentialRevision,
    $fixnum.Int64? routeRevision,
    $fixnum.Int64? projectionGeneration,
    $fixnum.Int64? issuedAtUnixNano,
    $fixnum.Int64? expiresAtUnixNano,
  }) {
    final result = create();
    if (leaseId != null) result.leaseId = leaseId;
    if (principalRef != null) result.principalRef = principalRef;
    if (credentialSlotRef != null) result.credentialSlotRef = credentialSlotRef;
    if (routeId != null) result.routeId = routeId;
    if (profileId != null) result.profileId = profileId;
    if (upstreamTarget != null) result.upstreamTarget = upstreamTarget;
    if (nodeId != null) result.nodeId = nodeId;
    if (recipientKeyId != null) result.recipientKeyId = recipientKeyId;
    if (headerName != null) result.headerName = headerName;
    if (scheme != null) result.scheme = scheme;
    if (credentialRevision != null)
      result.credentialRevision = credentialRevision;
    if (routeRevision != null) result.routeRevision = routeRevision;
    if (projectionGeneration != null)
      result.projectionGeneration = projectionGeneration;
    if (issuedAtUnixNano != null) result.issuedAtUnixNano = issuedAtUnixNano;
    if (expiresAtUnixNano != null) result.expiresAtUnixNano = expiresAtUnixNano;
    return result;
  }

  CredentialLeaseScope._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'CredentialLeaseScope',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'leaseId')
    ..aOS(2, _omitFieldNames ? '' : 'principalRef')
    ..aOS(3, _omitFieldNames ? '' : 'credentialSlotRef')
    ..aOS(4, _omitFieldNames ? '' : 'routeId')
    ..aOS(5, _omitFieldNames ? '' : 'profileId')
    ..aOS(6, _omitFieldNames ? '' : 'upstreamTarget')
    ..aOS(7, _omitFieldNames ? '' : 'nodeId')
    ..aOS(8, _omitFieldNames ? '' : 'recipientKeyId')
    ..aOS(9, _omitFieldNames ? '' : 'headerName')
    ..aOS(10, _omitFieldNames ? '' : 'scheme')
    ..a<$fixnum.Int64>(
        11, _omitFieldNames ? '' : 'credentialRevision', $pb.PbFieldType.OU6,
        defaultOrMaker: $fixnum.Int64.ZERO)
    ..a<$fixnum.Int64>(
        12, _omitFieldNames ? '' : 'routeRevision', $pb.PbFieldType.OU6,
        defaultOrMaker: $fixnum.Int64.ZERO)
    ..a<$fixnum.Int64>(
        13, _omitFieldNames ? '' : 'projectionGeneration', $pb.PbFieldType.OU6,
        defaultOrMaker: $fixnum.Int64.ZERO)
    ..aInt64(14, _omitFieldNames ? '' : 'issuedAtUnixNano')
    ..aInt64(15, _omitFieldNames ? '' : 'expiresAtUnixNano')
    ..hasRequiredFields = false;

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

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

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

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

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

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

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

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

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

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

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

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

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

  @$pb.TagNumber(11)
  $fixnum.Int64 get credentialRevision => $_getI64(10);
  @$pb.TagNumber(11)
  set credentialRevision($fixnum.Int64 value) => $_setInt64(10, value);
  @$pb.TagNumber(11)
  $core.bool hasCredentialRevision() => $_has(10);
  @$pb.TagNumber(11)
  void clearCredentialRevision() => $_clearField(11);

  @$pb.TagNumber(12)
  $fixnum.Int64 get routeRevision => $_getI64(11);
  @$pb.TagNumber(12)
  set routeRevision($fixnum.Int64 value) => $_setInt64(11, value);
  @$pb.TagNumber(12)
  $core.bool hasRouteRevision() => $_has(11);
  @$pb.TagNumber(12)
  void clearRouteRevision() => $_clearField(12);

  @$pb.TagNumber(13)
  $fixnum.Int64 get projectionGeneration => $_getI64(12);
  @$pb.TagNumber(13)
  set projectionGeneration($fixnum.Int64 value) => $_setInt64(12, value);
  @$pb.TagNumber(13)
  $core.bool hasProjectionGeneration() => $_has(12);
  @$pb.TagNumber(13)
  void clearProjectionGeneration() => $_clearField(13);

  @$pb.TagNumber(14)
  $fixnum.Int64 get issuedAtUnixNano => $_getI64(13);
  @$pb.TagNumber(14)
  set issuedAtUnixNano($fixnum.Int64 value) => $_setInt64(13, value);
  @$pb.TagNumber(14)
  $core.bool hasIssuedAtUnixNano() => $_has(13);
  @$pb.TagNumber(14)
  void clearIssuedAtUnixNano() => $_clearField(14);

  @$pb.TagNumber(15)
  $fixnum.Int64 get expiresAtUnixNano => $_getI64(14);
  @$pb.TagNumber(15)
  set expiresAtUnixNano($fixnum.Int64 value) => $_setInt64(14, value);
  @$pb.TagNumber(15)
  $core.bool hasExpiresAtUnixNano() => $_has(14);
  @$pb.TagNumber(15)
  void clearExpiresAtUnixNano() => $_clearField(15);
}

class SignedCredentialLease extends $pb.GeneratedMessage {
  factory SignedCredentialLease({
    $core.int? version,
    $core.String? issuerKeyId,
    CredentialLeaseScope? scope,
    $core.List<$core.int>? ephemeralPublicKey,
    $core.List<$core.int>? nonce,
    $core.List<$core.int>? ciphertext,
    $core.List<$core.int>? signature,
  }) {
    final result = create();
    if (version != null) result.version = version;
    if (issuerKeyId != null) result.issuerKeyId = issuerKeyId;
    if (scope != null) result.scope = scope;
    if (ephemeralPublicKey != null)
      result.ephemeralPublicKey = ephemeralPublicKey;
    if (nonce != null) result.nonce = nonce;
    if (ciphertext != null) result.ciphertext = ciphertext;
    if (signature != null) result.signature = signature;
    return result;
  }

  SignedCredentialLease._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SignedCredentialLease',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aI(1, _omitFieldNames ? '' : 'version', fieldType: $pb.PbFieldType.OU3)
    ..aOS(2, _omitFieldNames ? '' : 'issuerKeyId')
    ..aOM<CredentialLeaseScope>(3, _omitFieldNames ? '' : 'scope',
        subBuilder: CredentialLeaseScope.create)
    ..a<$core.List<$core.int>>(
        4, _omitFieldNames ? '' : 'ephemeralPublicKey', $pb.PbFieldType.OY)
    ..a<$core.List<$core.int>>(
        5, _omitFieldNames ? '' : 'nonce', $pb.PbFieldType.OY)
    ..a<$core.List<$core.int>>(
        6, _omitFieldNames ? '' : 'ciphertext', $pb.PbFieldType.OY)
    ..a<$core.List<$core.int>>(
        7, _omitFieldNames ? '' : 'signature', $pb.PbFieldType.OY)
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(1)
  $core.int get version => $_getIZ(0);
  @$pb.TagNumber(1)
  set version($core.int value) => $_setUnsignedInt32(0, value);
  @$pb.TagNumber(1)
  $core.bool hasVersion() => $_has(0);
  @$pb.TagNumber(1)
  void clearVersion() => $_clearField(1);

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

  @$pb.TagNumber(3)
  CredentialLeaseScope get scope => $_getN(2);
  @$pb.TagNumber(3)
  set scope(CredentialLeaseScope value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasScope() => $_has(2);
  @$pb.TagNumber(3)
  void clearScope() => $_clearField(3);
  @$pb.TagNumber(3)
  CredentialLeaseScope ensureScope() => $_ensure(2);

  @$pb.TagNumber(4)
  $core.List<$core.int> get ephemeralPublicKey => $_getN(3);
  @$pb.TagNumber(4)
  set ephemeralPublicKey($core.List<$core.int> value) => $_setBytes(3, value);
  @$pb.TagNumber(4)
  $core.bool hasEphemeralPublicKey() => $_has(3);
  @$pb.TagNumber(4)
  void clearEphemeralPublicKey() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.List<$core.int> get nonce => $_getN(4);
  @$pb.TagNumber(5)
  set nonce($core.List<$core.int> value) => $_setBytes(4, value);
  @$pb.TagNumber(5)
  $core.bool hasNonce() => $_has(4);
  @$pb.TagNumber(5)
  void clearNonce() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.List<$core.int> get ciphertext => $_getN(5);
  @$pb.TagNumber(6)
  set ciphertext($core.List<$core.int> value) => $_setBytes(5, value);
  @$pb.TagNumber(6)
  $core.bool hasCiphertext() => $_has(5);
  @$pb.TagNumber(6)
  void clearCiphertext() => $_clearField(6);

  @$pb.TagNumber(7)
  $core.List<$core.int> get signature => $_getN(6);
  @$pb.TagNumber(7)
  set signature($core.List<$core.int> value) => $_setBytes(6, value);
  @$pb.TagNumber(7)
  $core.bool hasSignature() => $_has(6);
  @$pb.TagNumber(7)
  void clearSignature() => $_clearField(7);
}

class CredentialLeaseBinding extends $pb.GeneratedMessage {
  factory CredentialLeaseBinding({
    $core.String? principalRef,
    $core.String? credentialSlotRef,
    $core.String? routeId,
    $core.String? profileId,
    $core.String? upstreamTarget,
    $core.String? nodeId,
    $core.String? recipientKeyId,
    $fixnum.Int64? credentialRevision,
    $fixnum.Int64? routeRevision,
    $fixnum.Int64? projectionGeneration,
  }) {
    final result = create();
    if (principalRef != null) result.principalRef = principalRef;
    if (credentialSlotRef != null) result.credentialSlotRef = credentialSlotRef;
    if (routeId != null) result.routeId = routeId;
    if (profileId != null) result.profileId = profileId;
    if (upstreamTarget != null) result.upstreamTarget = upstreamTarget;
    if (nodeId != null) result.nodeId = nodeId;
    if (recipientKeyId != null) result.recipientKeyId = recipientKeyId;
    if (credentialRevision != null)
      result.credentialRevision = credentialRevision;
    if (routeRevision != null) result.routeRevision = routeRevision;
    if (projectionGeneration != null)
      result.projectionGeneration = projectionGeneration;
    return result;
  }

  CredentialLeaseBinding._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'CredentialLeaseBinding',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'principalRef')
    ..aOS(2, _omitFieldNames ? '' : 'credentialSlotRef')
    ..aOS(3, _omitFieldNames ? '' : 'routeId')
    ..aOS(4, _omitFieldNames ? '' : 'profileId')
    ..aOS(5, _omitFieldNames ? '' : 'upstreamTarget')
    ..aOS(6, _omitFieldNames ? '' : 'nodeId')
    ..aOS(7, _omitFieldNames ? '' : 'recipientKeyId')
    ..a<$fixnum.Int64>(
        8, _omitFieldNames ? '' : 'credentialRevision', $pb.PbFieldType.OU6,
        defaultOrMaker: $fixnum.Int64.ZERO)
    ..a<$fixnum.Int64>(
        9, _omitFieldNames ? '' : 'routeRevision', $pb.PbFieldType.OU6,
        defaultOrMaker: $fixnum.Int64.ZERO)
    ..a<$fixnum.Int64>(
        10, _omitFieldNames ? '' : 'projectionGeneration', $pb.PbFieldType.OU6,
        defaultOrMaker: $fixnum.Int64.ZERO)
    ..hasRequiredFields = false;

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

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

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

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

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

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

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

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

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

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

  @$pb.TagNumber(8)
  $fixnum.Int64 get credentialRevision => $_getI64(7);
  @$pb.TagNumber(8)
  set credentialRevision($fixnum.Int64 value) => $_setInt64(7, value);
  @$pb.TagNumber(8)
  $core.bool hasCredentialRevision() => $_has(7);
  @$pb.TagNumber(8)
  void clearCredentialRevision() => $_clearField(8);

  @$pb.TagNumber(9)
  $fixnum.Int64 get routeRevision => $_getI64(8);
  @$pb.TagNumber(9)
  set routeRevision($fixnum.Int64 value) => $_setInt64(8, value);
  @$pb.TagNumber(9)
  $core.bool hasRouteRevision() => $_has(8);
  @$pb.TagNumber(9)
  void clearRouteRevision() => $_clearField(9);

  @$pb.TagNumber(10)
  $fixnum.Int64 get projectionGeneration => $_getI64(9);
  @$pb.TagNumber(10)
  set projectionGeneration($fixnum.Int64 value) => $_setInt64(9, value);
  @$pb.TagNumber(10)
  $core.bool hasProjectionGeneration() => $_has(9);
  @$pb.TagNumber(10)
  void clearProjectionGeneration() => $_clearField(10);
}

/// AcquireLeaseRequest is sent only over the authenticated Control Plane-Edge
/// channel after an exact Node candidate is chosen. It is a runtime delivery
/// operation, not a credential-management or bootstrap API.
class AcquireLeaseRequest extends $pb.GeneratedMessage {
  factory AcquireLeaseRequest({
    $core.String? edgeId,
    CredentialLeaseBinding? binding,
    $core.List<$core.int>? recipientPublicKey,
  }) {
    final result = create();
    if (edgeId != null) result.edgeId = edgeId;
    if (binding != null) result.binding = binding;
    if (recipientPublicKey != null)
      result.recipientPublicKey = recipientPublicKey;
    return result;
  }

  AcquireLeaseRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'AcquireLeaseRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'edgeId')
    ..aOM<CredentialLeaseBinding>(2, _omitFieldNames ? '' : 'binding',
        subBuilder: CredentialLeaseBinding.create)
    ..a<$core.List<$core.int>>(
        3, _omitFieldNames ? '' : 'recipientPublicKey', $pb.PbFieldType.OY)
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  CredentialLeaseBinding get binding => $_getN(1);
  @$pb.TagNumber(2)
  set binding(CredentialLeaseBinding value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasBinding() => $_has(1);
  @$pb.TagNumber(2)
  void clearBinding() => $_clearField(2);
  @$pb.TagNumber(2)
  CredentialLeaseBinding ensureBinding() => $_ensure(1);

  @$pb.TagNumber(3)
  $core.List<$core.int> get recipientPublicKey => $_getN(2);
  @$pb.TagNumber(3)
  set recipientPublicKey($core.List<$core.int> value) => $_setBytes(2, value);
  @$pb.TagNumber(3)
  $core.bool hasRecipientPublicKey() => $_has(2);
  @$pb.TagNumber(3)
  void clearRecipientPublicKey() => $_clearField(3);
}

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

  AcquireLeaseResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'AcquireLeaseResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOM<SignedCredentialLease>(1, _omitFieldNames ? '' : 'lease',
        subBuilder: SignedCredentialLease.create)
    ..aOS(2, _omitFieldNames ? '' : 'error')
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(1)
  SignedCredentialLease get lease => $_getN(0);
  @$pb.TagNumber(1)
  set lease(SignedCredentialLease value) => $_setField(1, value);
  @$pb.TagNumber(1)
  $core.bool hasLease() => $_has(0);
  @$pb.TagNumber(1)
  void clearLease() => $_clearField(1);
  @$pb.TagNumber(1)
  SignedCredentialLease ensureLease() => $_ensure(0);

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

/// ProviderTunnelFrame carries ordered raw provider response data back to Edge.
/// Body bytes are the passthrough source of truth and must not be routed through
/// RunEvent.delta or the lossy event bus fanout.
class ProviderTunnelFrame extends $pb.GeneratedMessage {
  factory ProviderTunnelFrame({
    $core.String? runId,
    $core.String? tunnelId,
    $fixnum.Int64? sequence,
    ProviderTunnelFrameKind? kind,
    $core.int? statusCode,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? headers,
    $core.List<$core.int>? body,
    $core.bool? end,
    $core.String? error,
    Usage? usage,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? metadata,
    $fixnum.Int64? timestamp,
    $core.String? nodeId,
    $core.String? nodeAlias,
    ExecutionFailure? failure,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    if (tunnelId != null) result.tunnelId = tunnelId;
    if (sequence != null) result.sequence = sequence;
    if (kind != null) result.kind = kind;
    if (statusCode != null) result.statusCode = statusCode;
    if (headers != null) result.headers.addEntries(headers);
    if (body != null) result.body = body;
    if (end != null) result.end = end;
    if (error != null) result.error = error;
    if (usage != null) result.usage = usage;
    if (metadata != null) result.metadata.addEntries(metadata);
    if (timestamp != null) result.timestamp = timestamp;
    if (nodeId != null) result.nodeId = nodeId;
    if (nodeAlias != null) result.nodeAlias = nodeAlias;
    if (failure != null) result.failure = failure;
    return result;
  }

  ProviderTunnelFrame._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ProviderTunnelFrame',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'runId')
    ..aOS(2, _omitFieldNames ? '' : 'tunnelId')
    ..aInt64(3, _omitFieldNames ? '' : 'sequence')
    ..aE<ProviderTunnelFrameKind>(4, _omitFieldNames ? '' : 'kind',
        enumValues: ProviderTunnelFrameKind.values)
    ..aI(5, _omitFieldNames ? '' : 'statusCode')
    ..m<$core.String, $core.String>(6, _omitFieldNames ? '' : 'headers',
        entryClassName: 'ProviderTunnelFrame.HeadersEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..a<$core.List<$core.int>>(
        7, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY)
    ..aOB(8, _omitFieldNames ? '' : 'end')
    ..aOS(9, _omitFieldNames ? '' : 'error')
    ..aOM<Usage>(10, _omitFieldNames ? '' : 'usage', subBuilder: Usage.create)
    ..m<$core.String, $core.String>(11, _omitFieldNames ? '' : 'metadata',
        entryClassName: 'ProviderTunnelFrame.MetadataEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..aInt64(12, _omitFieldNames ? '' : 'timestamp')
    ..aOS(13, _omitFieldNames ? '' : 'nodeId')
    ..aOS(14, _omitFieldNames ? '' : 'nodeAlias')
    ..aOM<ExecutionFailure>(15, _omitFieldNames ? '' : 'failure',
        subBuilder: ExecutionFailure.create)
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static ProviderTunnelFrame create() => ProviderTunnelFrame._();
  @$core.override
  ProviderTunnelFrame createEmptyInstance() => create();
  @$core.pragma('dart2js:noInline')
  static ProviderTunnelFrame getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<ProviderTunnelFrame>(create);
  static ProviderTunnelFrame? _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)
  $core.String get tunnelId => $_getSZ(1);
  @$pb.TagNumber(2)
  set tunnelId($core.String value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasTunnelId() => $_has(1);
  @$pb.TagNumber(2)
  void clearTunnelId() => $_clearField(2);

  @$pb.TagNumber(3)
  $fixnum.Int64 get sequence => $_getI64(2);
  @$pb.TagNumber(3)
  set sequence($fixnum.Int64 value) => $_setInt64(2, value);
  @$pb.TagNumber(3)
  $core.bool hasSequence() => $_has(2);
  @$pb.TagNumber(3)
  void clearSequence() => $_clearField(3);

  @$pb.TagNumber(4)
  ProviderTunnelFrameKind get kind => $_getN(3);
  @$pb.TagNumber(4)
  set kind(ProviderTunnelFrameKind value) => $_setField(4, value);
  @$pb.TagNumber(4)
  $core.bool hasKind() => $_has(3);
  @$pb.TagNumber(4)
  void clearKind() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.int get statusCode => $_getIZ(4);
  @$pb.TagNumber(5)
  set statusCode($core.int value) => $_setSignedInt32(4, value);
  @$pb.TagNumber(5)
  $core.bool hasStatusCode() => $_has(4);
  @$pb.TagNumber(5)
  void clearStatusCode() => $_clearField(5);

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

  @$pb.TagNumber(7)
  $core.List<$core.int> get body => $_getN(6);
  @$pb.TagNumber(7)
  set body($core.List<$core.int> value) => $_setBytes(6, value);
  @$pb.TagNumber(7)
  $core.bool hasBody() => $_has(6);
  @$pb.TagNumber(7)
  void clearBody() => $_clearField(7);

  @$pb.TagNumber(8)
  $core.bool get end => $_getBF(7);
  @$pb.TagNumber(8)
  set end($core.bool value) => $_setBool(7, value);
  @$pb.TagNumber(8)
  $core.bool hasEnd() => $_has(7);
  @$pb.TagNumber(8)
  void clearEnd() => $_clearField(8);

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

  @$pb.TagNumber(10)
  Usage get usage => $_getN(9);
  @$pb.TagNumber(10)
  set usage(Usage value) => $_setField(10, value);
  @$pb.TagNumber(10)
  $core.bool hasUsage() => $_has(9);
  @$pb.TagNumber(10)
  void clearUsage() => $_clearField(10);
  @$pb.TagNumber(10)
  Usage ensureUsage() => $_ensure(9);

  @$pb.TagNumber(11)
  $pb.PbMap<$core.String, $core.String> get metadata => $_getMap(10);

  @$pb.TagNumber(12)
  $fixnum.Int64 get timestamp => $_getI64(11);
  @$pb.TagNumber(12)
  set timestamp($fixnum.Int64 value) => $_setInt64(11, value);
  @$pb.TagNumber(12)
  $core.bool hasTimestamp() => $_has(11);
  @$pb.TagNumber(12)
  void clearTimestamp() => $_clearField(12);

  @$pb.TagNumber(13)
  $core.String get nodeId => $_getSZ(12);
  @$pb.TagNumber(13)
  set nodeId($core.String value) => $_setString(12, value);
  @$pb.TagNumber(13)
  $core.bool hasNodeId() => $_has(12);
  @$pb.TagNumber(13)
  void clearNodeId() => $_clearField(13);

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

  @$pb.TagNumber(15)
  ExecutionFailure get failure => $_getN(14);
  @$pb.TagNumber(15)
  set failure(ExecutionFailure value) => $_setField(15, value);
  @$pb.TagNumber(15)
  $core.bool hasFailure() => $_has(14);
  @$pb.TagNumber(15)
  void clearFailure() => $_clearField(15);
  @$pb.TagNumber(15)
  ExecutionFailure ensureFailure() => $_ensure(14);
}

/// 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.Iterable<$core.MapEntry<$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.addEntries(metadata);
    if (timestamp != null) result.timestamp = timestamp;
    return result;
  }

  EdgeNodeEvent._();

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

  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('See https://github.com/google/protobuf.dart/issues/998.')
  EdgeNodeEvent clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  EdgeNodeEvent copyWith(void Function(EdgeNodeEvent) updates) =>
      super.copyWith((message) => updates(message as EdgeNodeEvent))
          as EdgeNodeEvent;

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

  @$core.pragma('dart2js:noInline')
  static EdgeNodeEvent create() => EdgeNodeEvent._();
  @$core.override
  EdgeNodeEvent createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$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 value) => $_setString(1, value);
  @$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 value) => $_setString(2, value);
  @$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 value) => $_setString(3, value);
  @$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 value) => $_setString(4, value);
  @$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 value) => $_setString(5, value);
  @$pb.TagNumber(6)
  $core.bool hasReason() => $_has(5);
  @$pb.TagNumber(6)
  void clearReason() => $_clearField(6);

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

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

/// ExecutionFailure is the typed failure payload carried by execution envelopes.
class ExecutionFailure extends $pb.GeneratedMessage {
  factory ExecutionFailure({
    $core.String? code,
    $core.String? message,
    $core.bool? retryable,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? metadata,
  }) {
    final result = create();
    if (code != null) result.code = code;
    if (message != null) result.message = message;
    if (retryable != null) result.retryable = retryable;
    if (metadata != null) result.metadata.addEntries(metadata);
    return result;
  }

  ExecutionFailure._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ExecutionFailure',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'code')
    ..aOS(2, _omitFieldNames ? '' : 'message')
    ..aOB(3, _omitFieldNames ? '' : 'retryable')
    ..m<$core.String, $core.String>(4, _omitFieldNames ? '' : 'metadata',
        entryClassName: 'ExecutionFailure.MetadataEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(1)
  $core.String get code => $_getSZ(0);
  @$pb.TagNumber(1)
  set code($core.String value) => $_setString(0, value);
  @$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 value) => $_setString(1, value);
  @$pb.TagNumber(2)
  $core.bool hasMessage() => $_has(1);
  @$pb.TagNumber(2)
  void clearMessage() => $_clearField(2);

  @$pb.TagNumber(3)
  $core.bool get retryable => $_getBF(2);
  @$pb.TagNumber(3)
  set retryable($core.bool value) => $_setBool(2, value);
  @$pb.TagNumber(3)
  $core.bool hasRetryable() => $_has(2);
  @$pb.TagNumber(3)
  void clearRetryable() => $_clearField(3);

  @$pb.TagNumber(4)
  $pb.PbMap<$core.String, $core.String> get metadata => $_getMap(3);
}

class Usage extends $pb.GeneratedMessage {
  factory Usage({
    $core.int? inputTokens,
    $core.int? outputTokens,
    $core.int? reasoningTokens,
    $core.int? cachedInputTokens,
  }) {
    final result = create();
    if (inputTokens != null) result.inputTokens = inputTokens;
    if (outputTokens != null) result.outputTokens = outputTokens;
    if (reasoningTokens != null) result.reasoningTokens = reasoningTokens;
    if (cachedInputTokens != null) result.cachedInputTokens = cachedInputTokens;
    return result;
  }

  Usage._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'Usage',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aI(1, _omitFieldNames ? '' : 'inputTokens')
    ..aI(2, _omitFieldNames ? '' : 'outputTokens')
    ..aI(3, _omitFieldNames ? '' : 'reasoningTokens')
    ..aI(4, _omitFieldNames ? '' : 'cachedInputTokens')
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static Usage create() => Usage._();
  @$core.override
  Usage createEmptyInstance() => create();
  @$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 value) => $_setSignedInt32(0, value);
  @$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 value) => $_setSignedInt32(1, value);
  @$pb.TagNumber(2)
  $core.bool hasOutputTokens() => $_has(1);
  @$pb.TagNumber(2)
  void clearOutputTokens() => $_clearField(2);

  /// reasoning_tokens and cached_input_tokens are populated only when the
  /// provider reports them. A zero value means "not reported"; downstream metric
  /// emit never estimates reasoning tokens from observed reasoning text.
  @$pb.TagNumber(3)
  $core.int get reasoningTokens => $_getIZ(2);
  @$pb.TagNumber(3)
  set reasoningTokens($core.int value) => $_setSignedInt32(2, value);
  @$pb.TagNumber(3)
  $core.bool hasReasoningTokens() => $_has(2);
  @$pb.TagNumber(3)
  void clearReasoningTokens() => $_clearField(3);

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

/// 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._();

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

  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('See https://github.com/google/protobuf.dart/issues/998.')
  Heartbeat clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  Heartbeat copyWith(void Function(Heartbeat) updates) =>
      super.copyWith((message) => updates(message as Heartbeat)) as Heartbeat;

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

  @$core.pragma('dart2js:noInline')
  static Heartbeat create() => Heartbeat._();
  @$core.override
  Heartbeat createEmptyInstance() => create();
  @$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 value) => $_setInt64(0, value);
  @$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,
  }) {
    final result = create();
    if (runId != null) result.runId = runId;
    return result;
  }

  CancelRequest._();

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

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

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

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

  @$core.pragma('dart2js:noInline')
  static CancelRequest create() => CancelRequest._();
  @$core.override
  CancelRequest createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasRunId() => $_has(0);
  @$pb.TagNumber(1)
  void clearRunId() => $_clearField(1);
}

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.Iterable<$core.MapEntry<$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.addEntries(metadata);
    return result;
  }

  NodeCommandRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'NodeCommandRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aE<NodeCommandType>(2, _omitFieldNames ? '' : 'type',
        enumValues: NodeCommandType.values)
    ..aOS(3, _omitFieldNames ? '' : 'adapter')
    ..aOS(4, _omitFieldNames ? '' : 'target')
    ..aOS(5, _omitFieldNames ? '' : 'sessionId')
    ..aI(6, _omitFieldNames ? '' : 'timeoutSec')
    ..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('See https://github.com/google/protobuf.dart/issues/998.')
  NodeCommandRequest clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  NodeCommandRequest copyWith(void Function(NodeCommandRequest) updates) =>
      super.copyWith((message) => updates(message as NodeCommandRequest))
          as NodeCommandRequest;

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

  @$core.pragma('dart2js:noInline')
  static NodeCommandRequest create() => NodeCommandRequest._();
  @$core.override
  NodeCommandRequest createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$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 value) => $_setField(2, value);
  @$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 value) => $_setString(2, value);
  @$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 value) => $_setString(3, value);
  @$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 value) => $_setString(4, value);
  @$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 value) => $_setSignedInt32(5, value);
  @$pb.TagNumber(6)
  $core.bool hasTimeoutSec() => $_has(5);
  @$pb.TagNumber(6)
  void clearTimeoutSec() => $_clearField(6);

  @$pb.TagNumber(7)
  $pb.PbMap<$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,
    $core.String? error,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? result,
    $core.Iterable<ProviderSnapshot>? providerSnapshots,
  }) {
    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 (error != null) result$.error = error;
    if (result != null) result$.result.addEntries(result);
    if (providerSnapshots != null)
      result$.providerSnapshots.addAll(providerSnapshots);
    return result$;
  }

  NodeCommandResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'NodeCommandResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aE<NodeCommandType>(2, _omitFieldNames ? '' : 'type',
        enumValues: NodeCommandType.values)
    ..aOS(3, _omitFieldNames ? '' : 'adapter')
    ..aOS(4, _omitFieldNames ? '' : 'target')
    ..aOS(5, _omitFieldNames ? '' : 'sessionId')
    ..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'))
    ..pPM<ProviderSnapshot>(9, _omitFieldNames ? '' : 'providerSnapshots',
        subBuilder: ProviderSnapshot.create)
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static NodeCommandResponse create() => NodeCommandResponse._();
  @$core.override
  NodeCommandResponse createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$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 value) => $_setField(2, value);
  @$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 value) => $_setString(2, value);
  @$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 value) => $_setString(3, value);
  @$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 value) => $_setString(4, value);
  @$pb.TagNumber(5)
  $core.bool hasSessionId() => $_has(4);
  @$pb.TagNumber(5)
  void clearSessionId() => $_clearField(5);

  @$pb.TagNumber(7)
  $core.String get error => $_getSZ(5);
  @$pb.TagNumber(7)
  set error($core.String value) => $_setString(5, value);
  @$pb.TagNumber(7)
  $core.bool hasError() => $_has(5);
  @$pb.TagNumber(7)
  void clearError() => $_clearField(7);

  /// result carries free-form key/value data for provider-only commands.
  @$pb.TagNumber(8)
  $pb.PbMap<$core.String, $core.String> get result => $_getMap(6);

  @$pb.TagNumber(9)
  $pb.PbList<ProviderSnapshot> get providerSnapshots => $_getList(7);
}

/// ProviderSnapshot is the stable wire name for a node provider status snapshot.
class ProviderSnapshot extends $pb.GeneratedMessage {
  factory ProviderSnapshot({
    $core.String? adapter,
    $core.String? status,
    $core.int? capacity,
    $core.int? inFlight,
    $core.int? queued,
    $core.String? id,
    $core.String? type,
    $core.String? category,
    $core.Iterable<$core.String>? servedModels,
    $core.String? health,
    $core.double? loadRatio,
    $core.Iterable<$core.String>? lifecycleCapabilities,
    $core.int? longContextCapacity,
    $core.int? longInFlight,
    $core.int? longQueued,
  }) {
    final result = create();
    if (adapter != null) result.adapter = adapter;
    if (status != null) result.status = status;
    if (capacity != null) result.capacity = capacity;
    if (inFlight != null) result.inFlight = inFlight;
    if (queued != null) result.queued = queued;
    if (id != null) result.id = id;
    if (type != null) result.type = type;
    if (category != null) result.category = category;
    if (servedModels != null) result.servedModels.addAll(servedModels);
    if (health != null) result.health = health;
    if (loadRatio != null) result.loadRatio = loadRatio;
    if (lifecycleCapabilities != null)
      result.lifecycleCapabilities.addAll(lifecycleCapabilities);
    if (longContextCapacity != null)
      result.longContextCapacity = longContextCapacity;
    if (longInFlight != null) result.longInFlight = longInFlight;
    if (longQueued != null) result.longQueued = longQueued;
    return result;
  }

  ProviderSnapshot._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ProviderSnapshot',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'adapter')
    ..aOS(2, _omitFieldNames ? '' : 'status')
    ..aI(3, _omitFieldNames ? '' : 'capacity')
    ..aI(4, _omitFieldNames ? '' : 'inFlight')
    ..aI(5, _omitFieldNames ? '' : 'queued')
    ..aOS(6, _omitFieldNames ? '' : 'id')
    ..aOS(7, _omitFieldNames ? '' : 'type')
    ..aOS(8, _omitFieldNames ? '' : 'category')
    ..pPS(9, _omitFieldNames ? '' : 'servedModels')
    ..aOS(10, _omitFieldNames ? '' : 'health')
    ..aD(11, _omitFieldNames ? '' : 'loadRatio', fieldType: $pb.PbFieldType.OF)
    ..pPS(12, _omitFieldNames ? '' : 'lifecycleCapabilities')
    ..aI(13, _omitFieldNames ? '' : 'longContextCapacity')
    ..aI(14, _omitFieldNames ? '' : 'longInFlight')
    ..aI(15, _omitFieldNames ? '' : 'longQueued')
    ..hasRequiredFields = false;

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

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

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

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

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

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

  @$pb.TagNumber(4)
  $core.int get inFlight => $_getIZ(3);
  @$pb.TagNumber(4)
  set inFlight($core.int value) => $_setSignedInt32(3, value);
  @$pb.TagNumber(4)
  $core.bool hasInFlight() => $_has(3);
  @$pb.TagNumber(4)
  void clearInFlight() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.int get queued => $_getIZ(4);
  @$pb.TagNumber(5)
  set queued($core.int value) => $_setSignedInt32(4, value);
  @$pb.TagNumber(5)
  $core.bool hasQueued() => $_has(4);
  @$pb.TagNumber(5)
  void clearQueued() => $_clearField(5);

  /// Provider catalog fields (MVP).
  /// id uniquely identifies this provider within its node.
  @$pb.TagNumber(6)
  $core.String get id => $_getSZ(5);
  @$pb.TagNumber(6)
  set id($core.String value) => $_setString(5, value);
  @$pb.TagNumber(6)
  $core.bool hasId() => $_has(5);
  @$pb.TagNumber(6)
  void clearId() => $_clearField(6);

  /// type is the runtime type (e.g. "ollama", "vllm", "lemonade", "sglang", "openai_api").
  @$pb.TagNumber(7)
  $core.String get type => $_getSZ(6);
  @$pb.TagNumber(7)
  set type($core.String value) => $_setString(6, value);
  @$pb.TagNumber(7)
  $core.bool hasType() => $_has(6);
  @$pb.TagNumber(7)
  void clearType() => $_clearField(7);

  /// category classifies the provider; values: api, local_inference.
  @$pb.TagNumber(8)
  $core.String get category => $_getSZ(7);
  @$pb.TagNumber(8)
  set category($core.String value) => $_setString(7, value);
  @$pb.TagNumber(8)
  $core.bool hasCategory() => $_has(7);
  @$pb.TagNumber(8)
  void clearCategory() => $_clearField(8);

  /// served_models lists the model names this provider can actually serve.
  @$pb.TagNumber(9)
  $pb.PbList<$core.String> get servedModels => $_getList(8);

  /// health is the observed provider health state (e.g. "healthy", "degraded", "unhealthy").
  @$pb.TagNumber(10)
  $core.String get health => $_getSZ(9);
  @$pb.TagNumber(10)
  set health($core.String value) => $_setString(9, value);
  @$pb.TagNumber(10)
  $core.bool hasHealth() => $_has(9);
  @$pb.TagNumber(10)
  void clearHealth() => $_clearField(10);

  /// load_ratio is the computed in_flight / capacity value.  When capacity is 0
  /// or unknown the provider is treated as unavailable for selection.
  @$pb.TagNumber(11)
  $core.double get loadRatio => $_getN(10);
  @$pb.TagNumber(11)
  set loadRatio($core.double value) => $_setFloat(10, value);
  @$pb.TagNumber(11)
  $core.bool hasLoadRatio() => $_has(10);
  @$pb.TagNumber(11)
  void clearLoadRatio() => $_clearField(11);

  /// lifecycle_capabilities lists coarse lifecycle capability flags (e.g.
  /// "list_models", "load_model", "unload_model", "pull_model", "delete_model").
  @$pb.TagNumber(12)
  $pb.PbList<$core.String> get lifecycleCapabilities => $_getList(11);

  /// Long-context fields.
  @$pb.TagNumber(13)
  $core.int get longContextCapacity => $_getIZ(12);
  @$pb.TagNumber(13)
  set longContextCapacity($core.int value) => $_setSignedInt32(12, value);
  @$pb.TagNumber(13)
  $core.bool hasLongContextCapacity() => $_has(12);
  @$pb.TagNumber(13)
  void clearLongContextCapacity() => $_clearField(13);

  @$pb.TagNumber(14)
  $core.int get longInFlight => $_getIZ(13);
  @$pb.TagNumber(14)
  set longInFlight($core.int value) => $_setSignedInt32(13, value);
  @$pb.TagNumber(14)
  $core.bool hasLongInFlight() => $_has(13);
  @$pb.TagNumber(14)
  void clearLongInFlight() => $_clearField(14);

  @$pb.TagNumber(15)
  $core.int get longQueued => $_getIZ(14);
  @$pb.TagNumber(15)
  set longQueued($core.int value) => $_setSignedInt32(14, value);
  @$pb.TagNumber(15)
  $core.bool hasLongQueued() => $_has(14);
  @$pb.TagNumber(15)
  void clearLongQueued() => $_clearField(15);
}

/// 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._();

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

  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('See https://github.com/google/protobuf.dart/issues/998.')
  Error clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  Error copyWith(void Function(Error) updates) =>
      super.copyWith((message) => updates(message as Error)) as Error;

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

  @$core.pragma('dart2js:noInline')
  static Error create() => Error._();
  @$core.override
  Error createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$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 value) => $_setString(1, value);
  @$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,
    $core.String? credentialRecipientKeyId,
    $core.List<$core.int>? credentialRecipientPublicKey,
  }) {
    final result = create();
    if (token != null) result.token = token;
    if (credentialRecipientKeyId != null)
      result.credentialRecipientKeyId = credentialRecipientKeyId;
    if (credentialRecipientPublicKey != null)
      result.credentialRecipientPublicKey = credentialRecipientPublicKey;
    return result;
  }

  RegisterRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'RegisterRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'token')
    ..aOS(2, _omitFieldNames ? '' : 'credentialRecipientKeyId')
    ..a<$core.List<$core.int>>(
        3,
        _omitFieldNames ? '' : 'credentialRecipientPublicKey',
        $pb.PbFieldType.OY)
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static RegisterRequest create() => RegisterRequest._();
  @$core.override
  RegisterRequest createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasToken() => $_has(0);
  @$pb.TagNumber(1)
  void clearToken() => $_clearField(1);

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

  @$pb.TagNumber(3)
  $core.List<$core.int> get credentialRecipientPublicKey => $_getN(2);
  @$pb.TagNumber(3)
  set credentialRecipientPublicKey($core.List<$core.int> value) =>
      $_setBytes(2, value);
  @$pb.TagNumber(3)
  $core.bool hasCredentialRecipientPublicKey() => $_has(2);
  @$pb.TagNumber(3)
  void clearCredentialRecipientPublicKey() => $_clearField(3);
}

/// 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._();

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

  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('See https://github.com/google/protobuf.dart/issues/998.')
  RegisterResponse clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  RegisterResponse copyWith(void Function(RegisterResponse) updates) =>
      super.copyWith((message) => updates(message as RegisterResponse))
          as RegisterResponse;

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

  @$core.pragma('dart2js:noInline')
  static RegisterResponse create() => RegisterResponse._();
  @$core.override
  RegisterResponse createEmptyInstance() => create();
  @$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 value) => $_setBool(0, value);
  @$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 value) => $_setString(1, value);
  @$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 value) => $_setString(2, value);
  @$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 value) => $_setString(3, value);
  @$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 value) => $_setField(5, value);
  @$pb.TagNumber(5)
  $core.bool hasConfig() => $_has(4);
  @$pb.TagNumber(5)
  void clearConfig() => $_clearField(5);
  @$pb.TagNumber(5)
  NodeConfigPayload ensureConfig() => $_ensure(4);
}

/// NodeReadyRequest is sent by node to edge after it has applied the config from
/// RegisterResponse and installed its message handler, signalling that it can now
/// receive run/tunnel/command dispatch. Accepted registration only claims
/// ownership and delivers config; edge opens dispatch eligibility and pumps the
/// node's stranded waiters only on this ready handshake, never before. node_id
/// carries the identity edge assigned in RegisterResponse so the ready transition
/// binds to the exact accepted connection.
class NodeReadyRequest extends $pb.GeneratedMessage {
  factory NodeReadyRequest({
    $core.String? nodeId,
  }) {
    final result = create();
    if (nodeId != null) result.nodeId = nodeId;
    return result;
  }

  NodeReadyRequest._();

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

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

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

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

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

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

/// NodeReadyResponse acknowledges a NodeReadyRequest. ready is true once edge has
/// marked the connection dispatch-ready (idempotent for the current owner); it is
/// false when the connection is stale — superseded by a reconnect or already gone
/// — in which case the node closes and reconnects. reason describes a rejection.
class NodeReadyResponse extends $pb.GeneratedMessage {
  factory NodeReadyResponse({
    $core.bool? ready,
    $core.String? reason,
  }) {
    final result = create();
    if (ready != null) result.ready = ready;
    if (reason != null) result.reason = reason;
    return result;
  }

  NodeReadyResponse._();

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

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

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

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

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

  @$pb.TagNumber(1)
  $core.bool get ready => $_getBF(0);
  @$pb.TagNumber(1)
  set ready($core.bool value) => $_setBool(0, value);
  @$pb.TagNumber(1)
  $core.bool hasReady() => $_has(0);
  @$pb.TagNumber(1)
  void clearReady() => $_clearField(1);

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

/// NodeConfigPayload carries all configuration edge pushes to the node.
class NodeConfigPayload extends $pb.GeneratedMessage {
  factory NodeConfigPayload({
    $core.Iterable<AdapterConfig>? adapters,
    NodeRuntimeConfig? runtime,
    $core.Iterable<WorkspaceConfig>? workspaces,
  }) {
    final result = create();
    if (adapters != null) result.adapters.addAll(adapters);
    if (runtime != null) result.runtime = runtime;
    if (workspaces != null) result.workspaces.addAll(workspaces);
    return result;
  }

  NodeConfigPayload._();

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

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

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

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

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

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

  @$pb.TagNumber(2)
  NodeRuntimeConfig get runtime => $_getN(1);
  @$pb.TagNumber(2)
  set runtime(NodeRuntimeConfig value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasRuntime() => $_has(1);
  @$pb.TagNumber(2)
  void clearRuntime() => $_clearField(2);
  @$pb.TagNumber(2)
  NodeRuntimeConfig ensureRuntime() => $_ensure(1);

  /// workspaces is the Node-private, operator-approved workspace capability
  /// catalog. It is deliberately separate from RunRequest metadata and from
  /// the closed NodeCommand surface.
  @$pb.TagNumber(3)
  $pb.PbList<WorkspaceConfig> get workspaces => $_getList(2);
}

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

  WorkspaceCommandConfig._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceCommandConfig',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'id')
    ..aOS(2, _omitFieldNames ? '' : 'executable')
    ..pPS(3, _omitFieldNames ? '' : 'args')
    ..hasRequiredFields = false;

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

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

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

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

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

  @$pb.TagNumber(3)
  $pb.PbList<$core.String> get args => $_getList(2);
}

/// WorkspaceConfig is delivered only inside the Edge-owned Node config payload.
/// Roots, command templates, and environment names never appear in public API
/// responses or in a caller-selected request field.
class WorkspaceConfig extends $pb.GeneratedMessage {
  factory WorkspaceConfig({
    $core.String? ref,
    $core.String? platform,
    $core.String? root,
    $core.Iterable<WorkspaceOperation>? operations,
    $core.Iterable<WorkspaceCommandConfig>? commands,
    $core.Iterable<$core.String>? environmentAllowlist,
    $fixnum.Int64? maxReadBytes,
    $fixnum.Int64? maxWriteBytes,
    $fixnum.Int64? maxOutputBytes,
    $fixnum.Int64? maxCommandTimeoutMs,
  }) {
    final result = create();
    if (ref != null) result.ref = ref;
    if (platform != null) result.platform = platform;
    if (root != null) result.root = root;
    if (operations != null) result.operations.addAll(operations);
    if (commands != null) result.commands.addAll(commands);
    if (environmentAllowlist != null)
      result.environmentAllowlist.addAll(environmentAllowlist);
    if (maxReadBytes != null) result.maxReadBytes = maxReadBytes;
    if (maxWriteBytes != null) result.maxWriteBytes = maxWriteBytes;
    if (maxOutputBytes != null) result.maxOutputBytes = maxOutputBytes;
    if (maxCommandTimeoutMs != null)
      result.maxCommandTimeoutMs = maxCommandTimeoutMs;
    return result;
  }

  WorkspaceConfig._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceConfig',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'ref')
    ..aOS(2, _omitFieldNames ? '' : 'platform')
    ..aOS(3, _omitFieldNames ? '' : 'root')
    ..pc<WorkspaceOperation>(
        4, _omitFieldNames ? '' : 'operations', $pb.PbFieldType.KE,
        valueOf: WorkspaceOperation.valueOf,
        enumValues: WorkspaceOperation.values,
        defaultEnumValue: WorkspaceOperation.WORKSPACE_OPERATION_UNSPECIFIED)
    ..pPM<WorkspaceCommandConfig>(5, _omitFieldNames ? '' : 'commands',
        subBuilder: WorkspaceCommandConfig.create)
    ..pPS(6, _omitFieldNames ? '' : 'environmentAllowlist')
    ..aInt64(7, _omitFieldNames ? '' : 'maxReadBytes')
    ..aInt64(8, _omitFieldNames ? '' : 'maxWriteBytes')
    ..aInt64(9, _omitFieldNames ? '' : 'maxOutputBytes')
    ..aInt64(10, _omitFieldNames ? '' : 'maxCommandTimeoutMs')
    ..hasRequiredFields = false;

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

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

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

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

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

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

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

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

  @$pb.TagNumber(6)
  $pb.PbList<$core.String> get environmentAllowlist => $_getList(5);

  @$pb.TagNumber(7)
  $fixnum.Int64 get maxReadBytes => $_getI64(6);
  @$pb.TagNumber(7)
  set maxReadBytes($fixnum.Int64 value) => $_setInt64(6, value);
  @$pb.TagNumber(7)
  $core.bool hasMaxReadBytes() => $_has(6);
  @$pb.TagNumber(7)
  void clearMaxReadBytes() => $_clearField(7);

  @$pb.TagNumber(8)
  $fixnum.Int64 get maxWriteBytes => $_getI64(7);
  @$pb.TagNumber(8)
  set maxWriteBytes($fixnum.Int64 value) => $_setInt64(7, value);
  @$pb.TagNumber(8)
  $core.bool hasMaxWriteBytes() => $_has(7);
  @$pb.TagNumber(8)
  void clearMaxWriteBytes() => $_clearField(8);

  @$pb.TagNumber(9)
  $fixnum.Int64 get maxOutputBytes => $_getI64(8);
  @$pb.TagNumber(9)
  set maxOutputBytes($fixnum.Int64 value) => $_setInt64(8, value);
  @$pb.TagNumber(9)
  $core.bool hasMaxOutputBytes() => $_has(8);
  @$pb.TagNumber(9)
  void clearMaxOutputBytes() => $_clearField(9);

  @$pb.TagNumber(10)
  $fixnum.Int64 get maxCommandTimeoutMs => $_getI64(9);
  @$pb.TagNumber(10)
  set maxCommandTimeoutMs($fixnum.Int64 value) => $_setInt64(9, value);
  @$pb.TagNumber(10)
  $core.bool hasMaxCommandTimeoutMs() => $_has(9);
  @$pb.TagNumber(10)
  void clearMaxCommandTimeoutMs() => $_clearField(10);
}

/// WorkspaceOpenRequest begins one request-owned workspace lifecycle. request_id
/// is the immutable coordinator identity and later names .iop/job/<request_id>.
class WorkspaceOpenRequest extends $pb.GeneratedMessage {
  factory WorkspaceOpenRequest({
    $core.String? requestId,
    $core.String? workspaceRef,
    $fixnum.Int64? timeoutMs,
    $core.Iterable<WorkspaceOperation>? operations,
    $core.Iterable<$core.String>? commandIds,
    $fixnum.Int64? maxReadBytes,
    $fixnum.Int64? maxWriteBytes,
    $fixnum.Int64? maxOutputBytes,
    $fixnum.Int64? maxCommandTimeoutMs,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (workspaceRef != null) result.workspaceRef = workspaceRef;
    if (timeoutMs != null) result.timeoutMs = timeoutMs;
    if (operations != null) result.operations.addAll(operations);
    if (commandIds != null) result.commandIds.addAll(commandIds);
    if (maxReadBytes != null) result.maxReadBytes = maxReadBytes;
    if (maxWriteBytes != null) result.maxWriteBytes = maxWriteBytes;
    if (maxOutputBytes != null) result.maxOutputBytes = maxOutputBytes;
    if (maxCommandTimeoutMs != null)
      result.maxCommandTimeoutMs = maxCommandTimeoutMs;
    return result;
  }

  WorkspaceOpenRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceOpenRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aOS(2, _omitFieldNames ? '' : 'workspaceRef')
    ..aInt64(3, _omitFieldNames ? '' : 'timeoutMs')
    ..pc<WorkspaceOperation>(
        4, _omitFieldNames ? '' : 'operations', $pb.PbFieldType.KE,
        valueOf: WorkspaceOperation.valueOf,
        enumValues: WorkspaceOperation.values,
        defaultEnumValue: WorkspaceOperation.WORKSPACE_OPERATION_UNSPECIFIED)
    ..pPS(5, _omitFieldNames ? '' : 'commandIds')
    ..aInt64(6, _omitFieldNames ? '' : 'maxReadBytes')
    ..aInt64(7, _omitFieldNames ? '' : 'maxWriteBytes')
    ..aInt64(8, _omitFieldNames ? '' : 'maxOutputBytes')
    ..aInt64(9, _omitFieldNames ? '' : 'maxCommandTimeoutMs')
    ..hasRequiredFields = false;

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

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

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

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

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

  @$pb.TagNumber(3)
  $fixnum.Int64 get timeoutMs => $_getI64(2);
  @$pb.TagNumber(3)
  set timeoutMs($fixnum.Int64 value) => $_setInt64(2, value);
  @$pb.TagNumber(3)
  $core.bool hasTimeoutMs() => $_has(2);
  @$pb.TagNumber(3)
  void clearTimeoutMs() => $_clearField(3);

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

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

  @$pb.TagNumber(6)
  $fixnum.Int64 get maxReadBytes => $_getI64(5);
  @$pb.TagNumber(6)
  set maxReadBytes($fixnum.Int64 value) => $_setInt64(5, value);
  @$pb.TagNumber(6)
  $core.bool hasMaxReadBytes() => $_has(5);
  @$pb.TagNumber(6)
  void clearMaxReadBytes() => $_clearField(6);

  @$pb.TagNumber(7)
  $fixnum.Int64 get maxWriteBytes => $_getI64(6);
  @$pb.TagNumber(7)
  set maxWriteBytes($fixnum.Int64 value) => $_setInt64(6, value);
  @$pb.TagNumber(7)
  $core.bool hasMaxWriteBytes() => $_has(6);
  @$pb.TagNumber(7)
  void clearMaxWriteBytes() => $_clearField(7);

  @$pb.TagNumber(8)
  $fixnum.Int64 get maxOutputBytes => $_getI64(7);
  @$pb.TagNumber(8)
  set maxOutputBytes($fixnum.Int64 value) => $_setInt64(7, value);
  @$pb.TagNumber(8)
  $core.bool hasMaxOutputBytes() => $_has(7);
  @$pb.TagNumber(8)
  void clearMaxOutputBytes() => $_clearField(8);

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

class WorkspaceOpenResponse extends $pb.GeneratedMessage {
  factory WorkspaceOpenResponse({
    $core.String? requestId,
    $core.String? workspaceRef,
    WorkspaceStatus? status,
    WorkspaceErrorCode? errorCode,
    $core.String? error,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (workspaceRef != null) result.workspaceRef = workspaceRef;
    if (status != null) result.status = status;
    if (errorCode != null) result.errorCode = errorCode;
    if (error != null) result.error = error;
    return result;
  }

  WorkspaceOpenResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceOpenResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aOS(2, _omitFieldNames ? '' : 'workspaceRef')
    ..aE<WorkspaceStatus>(3, _omitFieldNames ? '' : 'status',
        enumValues: WorkspaceStatus.values)
    ..aE<WorkspaceErrorCode>(4, _omitFieldNames ? '' : 'errorCode',
        enumValues: WorkspaceErrorCode.values)
    ..aOS(5, _omitFieldNames ? '' : 'error')
    ..hasRequiredFields = false;

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

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

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

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

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

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

  @$pb.TagNumber(4)
  WorkspaceErrorCode get errorCode => $_getN(3);
  @$pb.TagNumber(4)
  set errorCode(WorkspaceErrorCode value) => $_setField(4, value);
  @$pb.TagNumber(4)
  $core.bool hasErrorCode() => $_has(3);
  @$pb.TagNumber(4)
  void clearErrorCode() => $_clearField(4);

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

class WorkspaceWriteInput extends $pb.GeneratedMessage {
  factory WorkspaceWriteInput({
    $core.String? relativePath,
    $core.List<$core.int>? content,
  }) {
    final result = create();
    if (relativePath != null) result.relativePath = relativePath;
    if (content != null) result.content = content;
    return result;
  }

  WorkspaceWriteInput._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceWriteInput',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'relativePath')
    ..a<$core.List<$core.int>>(
        2, _omitFieldNames ? '' : 'content', $pb.PbFieldType.OY)
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  $core.List<$core.int> get content => $_getN(1);
  @$pb.TagNumber(2)
  set content($core.List<$core.int> value) => $_setBytes(1, value);
  @$pb.TagNumber(2)
  $core.bool hasContent() => $_has(1);
  @$pb.TagNumber(2)
  void clearContent() => $_clearField(2);
}

enum WorkspaceToolRequest_Input {
  relativePath,
  writeContent,
  commandId,
  write,
  notSet
}

/// WorkspaceToolRequest carries only closed operation input. A caller cannot
/// select a Node, root, executable, argv, or arbitrary environment.
class WorkspaceToolRequest extends $pb.GeneratedMessage {
  factory WorkspaceToolRequest({
    $core.String? requestId,
    $core.String? stageId,
    $core.String? toolCallId,
    WorkspaceOperation? operation,
    $fixnum.Int64? timeoutMs,
    $core.String? relativePath,
    $core.List<$core.int>? writeContent,
    $core.String? commandId,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? environment,
    WorkspaceWriteInput? write,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (stageId != null) result.stageId = stageId;
    if (toolCallId != null) result.toolCallId = toolCallId;
    if (operation != null) result.operation = operation;
    if (timeoutMs != null) result.timeoutMs = timeoutMs;
    if (relativePath != null) result.relativePath = relativePath;
    if (writeContent != null) result.writeContent = writeContent;
    if (commandId != null) result.commandId = commandId;
    if (environment != null) result.environment.addEntries(environment);
    if (write != null) result.write = write;
    return result;
  }

  WorkspaceToolRequest._();

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

  static const $core.Map<$core.int, WorkspaceToolRequest_Input>
      _WorkspaceToolRequest_InputByTag = {
    6: WorkspaceToolRequest_Input.relativePath,
    7: WorkspaceToolRequest_Input.writeContent,
    8: WorkspaceToolRequest_Input.commandId,
    10: WorkspaceToolRequest_Input.write,
    0: WorkspaceToolRequest_Input.notSet
  };
  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceToolRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..oo(0, [6, 7, 8, 10])
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aOS(2, _omitFieldNames ? '' : 'stageId')
    ..aOS(3, _omitFieldNames ? '' : 'toolCallId')
    ..aE<WorkspaceOperation>(4, _omitFieldNames ? '' : 'operation',
        enumValues: WorkspaceOperation.values)
    ..aInt64(5, _omitFieldNames ? '' : 'timeoutMs')
    ..aOS(6, _omitFieldNames ? '' : 'relativePath')
    ..a<$core.List<$core.int>>(
        7, _omitFieldNames ? '' : 'writeContent', $pb.PbFieldType.OY)
    ..aOS(8, _omitFieldNames ? '' : 'commandId')
    ..m<$core.String, $core.String>(9, _omitFieldNames ? '' : 'environment',
        entryClassName: 'WorkspaceToolRequest.EnvironmentEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..aOM<WorkspaceWriteInput>(10, _omitFieldNames ? '' : 'write',
        subBuilder: WorkspaceWriteInput.create)
    ..hasRequiredFields = false;

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

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

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

  @$pb.TagNumber(6)
  @$pb.TagNumber(7)
  @$pb.TagNumber(8)
  @$pb.TagNumber(10)
  WorkspaceToolRequest_Input whichInput() =>
      _WorkspaceToolRequest_InputByTag[$_whichOneof(0)]!;
  @$pb.TagNumber(6)
  @$pb.TagNumber(7)
  @$pb.TagNumber(8)
  @$pb.TagNumber(10)
  void clearInput() => $_clearField($_whichOneof(0));

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

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

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

  @$pb.TagNumber(4)
  WorkspaceOperation get operation => $_getN(3);
  @$pb.TagNumber(4)
  set operation(WorkspaceOperation value) => $_setField(4, value);
  @$pb.TagNumber(4)
  $core.bool hasOperation() => $_has(3);
  @$pb.TagNumber(4)
  void clearOperation() => $_clearField(4);

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

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

  /// Legacy source/wire-compatible field. WRITE requires the structured
  /// write input because this field cannot carry a destination path.
  @$pb.TagNumber(7)
  $core.List<$core.int> get writeContent => $_getN(6);
  @$pb.TagNumber(7)
  set writeContent($core.List<$core.int> value) => $_setBytes(6, value);
  @$pb.TagNumber(7)
  $core.bool hasWriteContent() => $_has(6);
  @$pb.TagNumber(7)
  void clearWriteContent() => $_clearField(7);

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

  @$pb.TagNumber(9)
  $pb.PbMap<$core.String, $core.String> get environment => $_getMap(8);

  @$pb.TagNumber(10)
  WorkspaceWriteInput get write => $_getN(9);
  @$pb.TagNumber(10)
  set write(WorkspaceWriteInput value) => $_setField(10, value);
  @$pb.TagNumber(10)
  $core.bool hasWrite() => $_has(9);
  @$pb.TagNumber(10)
  void clearWrite() => $_clearField(10);
  @$pb.TagNumber(10)
  WorkspaceWriteInput ensureWrite() => $_ensure(9);
}

class WorkspaceToolResponse extends $pb.GeneratedMessage {
  factory WorkspaceToolResponse({
    $core.String? requestId,
    $core.String? stageId,
    $core.String? toolCallId,
    WorkspaceStatus? status,
    WorkspaceErrorCode? errorCode,
    $core.String? error,
    $core.List<$core.int>? content,
    $core.Iterable<$core.String>? entries,
    $core.List<$core.int>? stdout,
    $core.List<$core.int>? stderr,
    $core.int? exitCode,
    $core.bool? truncated,
    $fixnum.Int64? durationMs,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (stageId != null) result.stageId = stageId;
    if (toolCallId != null) result.toolCallId = toolCallId;
    if (status != null) result.status = status;
    if (errorCode != null) result.errorCode = errorCode;
    if (error != null) result.error = error;
    if (content != null) result.content = content;
    if (entries != null) result.entries.addAll(entries);
    if (stdout != null) result.stdout = stdout;
    if (stderr != null) result.stderr = stderr;
    if (exitCode != null) result.exitCode = exitCode;
    if (truncated != null) result.truncated = truncated;
    if (durationMs != null) result.durationMs = durationMs;
    return result;
  }

  WorkspaceToolResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceToolResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aOS(2, _omitFieldNames ? '' : 'stageId')
    ..aOS(3, _omitFieldNames ? '' : 'toolCallId')
    ..aE<WorkspaceStatus>(4, _omitFieldNames ? '' : 'status',
        enumValues: WorkspaceStatus.values)
    ..aE<WorkspaceErrorCode>(5, _omitFieldNames ? '' : 'errorCode',
        enumValues: WorkspaceErrorCode.values)
    ..aOS(6, _omitFieldNames ? '' : 'error')
    ..a<$core.List<$core.int>>(
        7, _omitFieldNames ? '' : 'content', $pb.PbFieldType.OY)
    ..pPS(8, _omitFieldNames ? '' : 'entries')
    ..a<$core.List<$core.int>>(
        9, _omitFieldNames ? '' : 'stdout', $pb.PbFieldType.OY)
    ..a<$core.List<$core.int>>(
        10, _omitFieldNames ? '' : 'stderr', $pb.PbFieldType.OY)
    ..aI(11, _omitFieldNames ? '' : 'exitCode')
    ..aOB(12, _omitFieldNames ? '' : 'truncated')
    ..aInt64(13, _omitFieldNames ? '' : 'durationMs')
    ..hasRequiredFields = false;

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

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

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

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

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

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

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

  @$pb.TagNumber(5)
  WorkspaceErrorCode get errorCode => $_getN(4);
  @$pb.TagNumber(5)
  set errorCode(WorkspaceErrorCode value) => $_setField(5, value);
  @$pb.TagNumber(5)
  $core.bool hasErrorCode() => $_has(4);
  @$pb.TagNumber(5)
  void clearErrorCode() => $_clearField(5);

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

  @$pb.TagNumber(7)
  $core.List<$core.int> get content => $_getN(6);
  @$pb.TagNumber(7)
  set content($core.List<$core.int> value) => $_setBytes(6, value);
  @$pb.TagNumber(7)
  $core.bool hasContent() => $_has(6);
  @$pb.TagNumber(7)
  void clearContent() => $_clearField(7);

  @$pb.TagNumber(8)
  $pb.PbList<$core.String> get entries => $_getList(7);

  @$pb.TagNumber(9)
  $core.List<$core.int> get stdout => $_getN(8);
  @$pb.TagNumber(9)
  set stdout($core.List<$core.int> value) => $_setBytes(8, value);
  @$pb.TagNumber(9)
  $core.bool hasStdout() => $_has(8);
  @$pb.TagNumber(9)
  void clearStdout() => $_clearField(9);

  @$pb.TagNumber(10)
  $core.List<$core.int> get stderr => $_getN(9);
  @$pb.TagNumber(10)
  set stderr($core.List<$core.int> value) => $_setBytes(9, value);
  @$pb.TagNumber(10)
  $core.bool hasStderr() => $_has(9);
  @$pb.TagNumber(10)
  void clearStderr() => $_clearField(10);

  @$pb.TagNumber(11)
  $core.int get exitCode => $_getIZ(10);
  @$pb.TagNumber(11)
  set exitCode($core.int value) => $_setSignedInt32(10, value);
  @$pb.TagNumber(11)
  $core.bool hasExitCode() => $_has(10);
  @$pb.TagNumber(11)
  void clearExitCode() => $_clearField(11);

  @$pb.TagNumber(12)
  $core.bool get truncated => $_getBF(11);
  @$pb.TagNumber(12)
  set truncated($core.bool value) => $_setBool(11, value);
  @$pb.TagNumber(12)
  $core.bool hasTruncated() => $_has(11);
  @$pb.TagNumber(12)
  void clearTruncated() => $_clearField(12);

  @$pb.TagNumber(13)
  $fixnum.Int64 get durationMs => $_getI64(12);
  @$pb.TagNumber(13)
  set durationMs($fixnum.Int64 value) => $_setInt64(12, value);
  @$pb.TagNumber(13)
  $core.bool hasDurationMs() => $_has(12);
  @$pb.TagNumber(13)
  void clearDurationMs() => $_clearField(13);
}

class WorkspaceArtifactRequest extends $pb.GeneratedMessage {
  factory WorkspaceArtifactRequest({
    $core.String? requestId,
    WorkspaceArtifactKind? kind,
    WorkspaceArtifactOperation? operation,
    $core.List<$core.int>? content,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (kind != null) result.kind = kind;
    if (operation != null) result.operation = operation;
    if (content != null) result.content = content;
    return result;
  }

  WorkspaceArtifactRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceArtifactRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aE<WorkspaceArtifactKind>(2, _omitFieldNames ? '' : 'kind',
        enumValues: WorkspaceArtifactKind.values)
    ..aE<WorkspaceArtifactOperation>(3, _omitFieldNames ? '' : 'operation',
        enumValues: WorkspaceArtifactOperation.values)
    ..a<$core.List<$core.int>>(
        4, _omitFieldNames ? '' : 'content', $pb.PbFieldType.OY)
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  WorkspaceArtifactKind get kind => $_getN(1);
  @$pb.TagNumber(2)
  set kind(WorkspaceArtifactKind value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasKind() => $_has(1);
  @$pb.TagNumber(2)
  void clearKind() => $_clearField(2);

  @$pb.TagNumber(3)
  WorkspaceArtifactOperation get operation => $_getN(2);
  @$pb.TagNumber(3)
  set operation(WorkspaceArtifactOperation value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasOperation() => $_has(2);
  @$pb.TagNumber(3)
  void clearOperation() => $_clearField(3);

  @$pb.TagNumber(4)
  $core.List<$core.int> get content => $_getN(3);
  @$pb.TagNumber(4)
  set content($core.List<$core.int> value) => $_setBytes(3, value);
  @$pb.TagNumber(4)
  $core.bool hasContent() => $_has(3);
  @$pb.TagNumber(4)
  void clearContent() => $_clearField(4);
}

class WorkspaceArtifactResponse extends $pb.GeneratedMessage {
  factory WorkspaceArtifactResponse({
    $core.String? requestId,
    WorkspaceArtifactKind? kind,
    WorkspaceArtifactOperation? operation,
    WorkspaceStatus? status,
    WorkspaceErrorCode? errorCode,
    $core.String? error,
    $core.List<$core.int>? content,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (kind != null) result.kind = kind;
    if (operation != null) result.operation = operation;
    if (status != null) result.status = status;
    if (errorCode != null) result.errorCode = errorCode;
    if (error != null) result.error = error;
    if (content != null) result.content = content;
    return result;
  }

  WorkspaceArtifactResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceArtifactResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aE<WorkspaceArtifactKind>(2, _omitFieldNames ? '' : 'kind',
        enumValues: WorkspaceArtifactKind.values)
    ..aE<WorkspaceArtifactOperation>(3, _omitFieldNames ? '' : 'operation',
        enumValues: WorkspaceArtifactOperation.values)
    ..aE<WorkspaceStatus>(4, _omitFieldNames ? '' : 'status',
        enumValues: WorkspaceStatus.values)
    ..aE<WorkspaceErrorCode>(5, _omitFieldNames ? '' : 'errorCode',
        enumValues: WorkspaceErrorCode.values)
    ..aOS(6, _omitFieldNames ? '' : 'error')
    ..a<$core.List<$core.int>>(
        7, _omitFieldNames ? '' : 'content', $pb.PbFieldType.OY)
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  WorkspaceArtifactKind get kind => $_getN(1);
  @$pb.TagNumber(2)
  set kind(WorkspaceArtifactKind value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasKind() => $_has(1);
  @$pb.TagNumber(2)
  void clearKind() => $_clearField(2);

  @$pb.TagNumber(3)
  WorkspaceArtifactOperation get operation => $_getN(2);
  @$pb.TagNumber(3)
  set operation(WorkspaceArtifactOperation value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasOperation() => $_has(2);
  @$pb.TagNumber(3)
  void clearOperation() => $_clearField(3);

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

  @$pb.TagNumber(5)
  WorkspaceErrorCode get errorCode => $_getN(4);
  @$pb.TagNumber(5)
  set errorCode(WorkspaceErrorCode value) => $_setField(5, value);
  @$pb.TagNumber(5)
  $core.bool hasErrorCode() => $_has(4);
  @$pb.TagNumber(5)
  void clearErrorCode() => $_clearField(5);

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

  @$pb.TagNumber(7)
  $core.List<$core.int> get content => $_getN(6);
  @$pb.TagNumber(7)
  set content($core.List<$core.int> value) => $_setBytes(6, value);
  @$pb.TagNumber(7)
  $core.bool hasContent() => $_has(6);
  @$pb.TagNumber(7)
  void clearContent() => $_clearField(7);
}

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

  WorkspaceCancelRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceCancelRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aOS(2, _omitFieldNames ? '' : 'stageId')
    ..aOS(3, _omitFieldNames ? '' : 'toolCallId')
    ..hasRequiredFields = false;

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

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

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

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

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

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

class WorkspaceCancelResponse extends $pb.GeneratedMessage {
  factory WorkspaceCancelResponse({
    $core.String? requestId,
    $core.String? stageId,
    $core.String? toolCallId,
    WorkspaceStatus? status,
    WorkspaceErrorCode? errorCode,
    $core.String? error,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (stageId != null) result.stageId = stageId;
    if (toolCallId != null) result.toolCallId = toolCallId;
    if (status != null) result.status = status;
    if (errorCode != null) result.errorCode = errorCode;
    if (error != null) result.error = error;
    return result;
  }

  WorkspaceCancelResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceCancelResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aOS(2, _omitFieldNames ? '' : 'stageId')
    ..aOS(3, _omitFieldNames ? '' : 'toolCallId')
    ..aE<WorkspaceStatus>(4, _omitFieldNames ? '' : 'status',
        enumValues: WorkspaceStatus.values)
    ..aE<WorkspaceErrorCode>(5, _omitFieldNames ? '' : 'errorCode',
        enumValues: WorkspaceErrorCode.values)
    ..aOS(6, _omitFieldNames ? '' : 'error')
    ..hasRequiredFields = false;

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

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

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

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

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

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

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

  @$pb.TagNumber(5)
  WorkspaceErrorCode get errorCode => $_getN(4);
  @$pb.TagNumber(5)
  set errorCode(WorkspaceErrorCode value) => $_setField(5, value);
  @$pb.TagNumber(5)
  $core.bool hasErrorCode() => $_has(4);
  @$pb.TagNumber(5)
  void clearErrorCode() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.String get error => $_getSZ(5);
  @$pb.TagNumber(6)
  set error($core.String value) => $_setString(5, value);
  @$pb.TagNumber(6)
  $core.bool hasError() => $_has(5);
  @$pb.TagNumber(6)
  void clearError() => $_clearField(6);
}

/// WorkspaceCleanupRequest is explicit and request-owned. It removes only
/// request artifacts/processes; user workspace results remain outside cleanup.
class WorkspaceCleanupRequest extends $pb.GeneratedMessage {
  factory WorkspaceCleanupRequest({
    $core.String? requestId,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    return result;
  }

  WorkspaceCleanupRequest._();

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

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

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

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

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

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

class WorkspaceCleanupResponse extends $pb.GeneratedMessage {
  factory WorkspaceCleanupResponse({
    $core.String? requestId,
    WorkspaceStatus? status,
    WorkspaceErrorCode? errorCode,
    $core.String? error,
    $core.int? cleanedProcesses,
    $core.int? cleanedArtifacts,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (status != null) result.status = status;
    if (errorCode != null) result.errorCode = errorCode;
    if (error != null) result.error = error;
    if (cleanedProcesses != null) result.cleanedProcesses = cleanedProcesses;
    if (cleanedArtifacts != null) result.cleanedArtifacts = cleanedArtifacts;
    return result;
  }

  WorkspaceCleanupResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'WorkspaceCleanupResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aE<WorkspaceStatus>(2, _omitFieldNames ? '' : 'status',
        enumValues: WorkspaceStatus.values)
    ..aE<WorkspaceErrorCode>(3, _omitFieldNames ? '' : 'errorCode',
        enumValues: WorkspaceErrorCode.values)
    ..aOS(4, _omitFieldNames ? '' : 'error')
    ..aI(5, _omitFieldNames ? '' : 'cleanedProcesses')
    ..aI(6, _omitFieldNames ? '' : 'cleanedArtifacts')
    ..hasRequiredFields = false;

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

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

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

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

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

  @$pb.TagNumber(3)
  WorkspaceErrorCode get errorCode => $_getN(2);
  @$pb.TagNumber(3)
  set errorCode(WorkspaceErrorCode value) => $_setField(3, value);
  @$pb.TagNumber(3)
  $core.bool hasErrorCode() => $_has(2);
  @$pb.TagNumber(3)
  void clearErrorCode() => $_clearField(3);

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

  @$pb.TagNumber(5)
  $core.int get cleanedProcesses => $_getIZ(4);
  @$pb.TagNumber(5)
  set cleanedProcesses($core.int value) => $_setSignedInt32(4, value);
  @$pb.TagNumber(5)
  $core.bool hasCleanedProcesses() => $_has(4);
  @$pb.TagNumber(5)
  void clearCleanedProcesses() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.int get cleanedArtifacts => $_getIZ(5);
  @$pb.TagNumber(6)
  set cleanedArtifacts($core.int value) => $_setSignedInt32(5, value);
  @$pb.TagNumber(6)
  $core.bool hasCleanedArtifacts() => $_has(5);
  @$pb.TagNumber(6)
  void clearCleanedArtifacts() => $_clearField(6);
}

enum AdapterConfig_Config { ollama, vllm, mock, openaiCompat, notSet }

/// AdapterConfig describes one adapter to enable on the node.
/// name is the stable instance identity within a node; for single-instance
/// adapters it may be empty (equivalent to the type name). When a node carries
/// multiple instances of the same adapter type each must have a unique name.
class AdapterConfig extends $pb.GeneratedMessage {
  factory AdapterConfig({
    $core.String? type,
    $core.bool? enabled,
    $0.Struct? settings,
    OllamaAdapterConfig? ollama,
    VllmAdapterConfig? vllm,
    MockAdapterConfig? mock,
    $core.String? name,
    $core.String? target,
    OpenAICompatAdapterConfig? openaiCompat,
  }) {
    final result = create();
    if (type != null) result.type = type;
    if (enabled != null) result.enabled = enabled;
    if (settings != null) result.settings = settings;
    if (ollama != null) result.ollama = ollama;
    if (vllm != null) result.vllm = vllm;
    if (mock != null) result.mock = mock;
    if (name != null) result.name = name;
    if (target != null) result.target = target;
    if (openaiCompat != null) result.openaiCompat = openaiCompat;
    return result;
  }

  AdapterConfig._();

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

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

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

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

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

  @$pb.TagNumber(5)
  @$pb.TagNumber(6)
  @$pb.TagNumber(7)
  @$pb.TagNumber(10)
  AdapterConfig_Config whichConfig() =>
      _AdapterConfig_ConfigByTag[$_whichOneof(0)]!;
  @$pb.TagNumber(5)
  @$pb.TagNumber(6)
  @$pb.TagNumber(7)
  @$pb.TagNumber(10)
  void clearConfig() => $_clearField($_whichOneof(0));

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

  @$pb.TagNumber(2)
  $core.bool get enabled => $_getBF(1);
  @$pb.TagNumber(2)
  set enabled($core.bool value) => $_setBool(1, value);
  @$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 value) => $_setField(3, value);
  @$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(5)
  OllamaAdapterConfig get ollama => $_getN(3);
  @$pb.TagNumber(5)
  set ollama(OllamaAdapterConfig value) => $_setField(5, value);
  @$pb.TagNumber(5)
  $core.bool hasOllama() => $_has(3);
  @$pb.TagNumber(5)
  void clearOllama() => $_clearField(5);
  @$pb.TagNumber(5)
  OllamaAdapterConfig ensureOllama() => $_ensure(3);

  @$pb.TagNumber(6)
  VllmAdapterConfig get vllm => $_getN(4);
  @$pb.TagNumber(6)
  set vllm(VllmAdapterConfig value) => $_setField(6, value);
  @$pb.TagNumber(6)
  $core.bool hasVllm() => $_has(4);
  @$pb.TagNumber(6)
  void clearVllm() => $_clearField(6);
  @$pb.TagNumber(6)
  VllmAdapterConfig ensureVllm() => $_ensure(4);

  @$pb.TagNumber(7)
  MockAdapterConfig get mock => $_getN(5);
  @$pb.TagNumber(7)
  set mock(MockAdapterConfig value) => $_setField(7, value);
  @$pb.TagNumber(7)
  $core.bool hasMock() => $_has(5);
  @$pb.TagNumber(7)
  void clearMock() => $_clearField(7);
  @$pb.TagNumber(7)
  MockAdapterConfig ensureMock() => $_ensure(5);

  @$pb.TagNumber(8)
  $core.String get name => $_getSZ(6);
  @$pb.TagNumber(8)
  set name($core.String value) => $_setString(6, value);
  @$pb.TagNumber(8)
  $core.bool hasName() => $_has(6);
  @$pb.TagNumber(8)
  void clearName() => $_clearField(8);

  @$pb.TagNumber(9)
  $core.String get target => $_getSZ(7);
  @$pb.TagNumber(9)
  set target($core.String value) => $_setString(7, value);
  @$pb.TagNumber(9)
  $core.bool hasTarget() => $_has(7);
  @$pb.TagNumber(9)
  void clearTarget() => $_clearField(9);

  @$pb.TagNumber(10)
  OpenAICompatAdapterConfig get openaiCompat => $_getN(8);
  @$pb.TagNumber(10)
  set openaiCompat(OpenAICompatAdapterConfig value) => $_setField(10, value);
  @$pb.TagNumber(10)
  $core.bool hasOpenaiCompat() => $_has(8);
  @$pb.TagNumber(10)
  void clearOpenaiCompat() => $_clearField(10);
  @$pb.TagNumber(10)
  OpenAICompatAdapterConfig ensureOpenaiCompat() => $_ensure(8);
}

class MockAdapterConfig extends $pb.GeneratedMessage {
  factory MockAdapterConfig() => create();

  MockAdapterConfig._();

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

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

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

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

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

class OllamaAdapterConfig extends $pb.GeneratedMessage {
  factory OllamaAdapterConfig({
    $core.String? baseUrl,
    $core.int? contextSize,
    $core.int? capacity,
    $core.int? maxQueue,
    $core.int? queueTimeoutMs,
    $core.int? requestTimeoutMs,
  }) {
    final result = create();
    if (baseUrl != null) result.baseUrl = baseUrl;
    if (contextSize != null) result.contextSize = contextSize;
    if (capacity != null) result.capacity = capacity;
    if (maxQueue != null) result.maxQueue = maxQueue;
    if (queueTimeoutMs != null) result.queueTimeoutMs = queueTimeoutMs;
    if (requestTimeoutMs != null) result.requestTimeoutMs = requestTimeoutMs;
    return result;
  }

  OllamaAdapterConfig._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'OllamaAdapterConfig',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'baseUrl')
    ..aI(2, _omitFieldNames ? '' : 'contextSize')
    ..aI(3, _omitFieldNames ? '' : 'capacity')
    ..aI(4, _omitFieldNames ? '' : 'maxQueue')
    ..aI(5, _omitFieldNames ? '' : 'queueTimeoutMs')
    ..aI(6, _omitFieldNames ? '' : 'requestTimeoutMs')
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static OllamaAdapterConfig create() => OllamaAdapterConfig._();
  @$core.override
  OllamaAdapterConfig createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$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 value) => $_setSignedInt32(1, value);
  @$pb.TagNumber(2)
  $core.bool hasContextSize() => $_has(1);
  @$pb.TagNumber(2)
  void clearContextSize() => $_clearField(2);

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

  @$pb.TagNumber(4)
  $core.int get maxQueue => $_getIZ(3);
  @$pb.TagNumber(4)
  set maxQueue($core.int value) => $_setSignedInt32(3, value);
  @$pb.TagNumber(4)
  $core.bool hasMaxQueue() => $_has(3);
  @$pb.TagNumber(4)
  void clearMaxQueue() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.int get queueTimeoutMs => $_getIZ(4);
  @$pb.TagNumber(5)
  set queueTimeoutMs($core.int value) => $_setSignedInt32(4, value);
  @$pb.TagNumber(5)
  $core.bool hasQueueTimeoutMs() => $_has(4);
  @$pb.TagNumber(5)
  void clearQueueTimeoutMs() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.int get requestTimeoutMs => $_getIZ(5);
  @$pb.TagNumber(6)
  set requestTimeoutMs($core.int value) => $_setSignedInt32(5, value);
  @$pb.TagNumber(6)
  $core.bool hasRequestTimeoutMs() => $_has(5);
  @$pb.TagNumber(6)
  void clearRequestTimeoutMs() => $_clearField(6);
}

class VllmAdapterConfig extends $pb.GeneratedMessage {
  factory VllmAdapterConfig({
    $core.String? endpoint,
    $core.int? capacity,
    $core.int? maxQueue,
    $core.int? queueTimeoutMs,
    $core.int? requestTimeoutMs,
  }) {
    final result = create();
    if (endpoint != null) result.endpoint = endpoint;
    if (capacity != null) result.capacity = capacity;
    if (maxQueue != null) result.maxQueue = maxQueue;
    if (queueTimeoutMs != null) result.queueTimeoutMs = queueTimeoutMs;
    if (requestTimeoutMs != null) result.requestTimeoutMs = requestTimeoutMs;
    return result;
  }

  VllmAdapterConfig._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'VllmAdapterConfig',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'endpoint')
    ..aI(2, _omitFieldNames ? '' : 'capacity')
    ..aI(3, _omitFieldNames ? '' : 'maxQueue')
    ..aI(4, _omitFieldNames ? '' : 'queueTimeoutMs')
    ..aI(5, _omitFieldNames ? '' : 'requestTimeoutMs')
    ..hasRequiredFields = false;

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

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

  @$core.pragma('dart2js:noInline')
  static VllmAdapterConfig create() => VllmAdapterConfig._();
  @$core.override
  VllmAdapterConfig createEmptyInstance() => create();
  @$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 value) => $_setString(0, value);
  @$pb.TagNumber(1)
  $core.bool hasEndpoint() => $_has(0);
  @$pb.TagNumber(1)
  void clearEndpoint() => $_clearField(1);

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

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

  @$pb.TagNumber(4)
  $core.int get queueTimeoutMs => $_getIZ(3);
  @$pb.TagNumber(4)
  set queueTimeoutMs($core.int value) => $_setSignedInt32(3, value);
  @$pb.TagNumber(4)
  $core.bool hasQueueTimeoutMs() => $_has(3);
  @$pb.TagNumber(4)
  void clearQueueTimeoutMs() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.int get requestTimeoutMs => $_getIZ(4);
  @$pb.TagNumber(5)
  set requestTimeoutMs($core.int value) => $_setSignedInt32(4, value);
  @$pb.TagNumber(5)
  $core.bool hasRequestTimeoutMs() => $_has(4);
  @$pb.TagNumber(5)
  void clearRequestTimeoutMs() => $_clearField(5);
}

class OpenAICompatAdapterConfig extends $pb.GeneratedMessage {
  factory OpenAICompatAdapterConfig({
    $core.String? provider,
    $core.String? endpoint,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? headers,
    $core.int? capacity,
    $core.int? maxQueue,
    $core.int? queueTimeoutMs,
    $core.int? requestTimeoutMs,
    ConcreteProtocolProfile? protocolProfile,
  }) {
    final result = create();
    if (provider != null) result.provider = provider;
    if (endpoint != null) result.endpoint = endpoint;
    if (headers != null) result.headers.addEntries(headers);
    if (capacity != null) result.capacity = capacity;
    if (maxQueue != null) result.maxQueue = maxQueue;
    if (queueTimeoutMs != null) result.queueTimeoutMs = queueTimeoutMs;
    if (requestTimeoutMs != null) result.requestTimeoutMs = requestTimeoutMs;
    if (protocolProfile != null) result.protocolProfile = protocolProfile;
    return result;
  }

  OpenAICompatAdapterConfig._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'OpenAICompatAdapterConfig',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'provider')
    ..aOS(2, _omitFieldNames ? '' : 'endpoint')
    ..m<$core.String, $core.String>(3, _omitFieldNames ? '' : 'headers',
        entryClassName: 'OpenAICompatAdapterConfig.HeadersEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..aI(4, _omitFieldNames ? '' : 'capacity')
    ..aI(5, _omitFieldNames ? '' : 'maxQueue')
    ..aI(6, _omitFieldNames ? '' : 'queueTimeoutMs')
    ..aI(7, _omitFieldNames ? '' : 'requestTimeoutMs')
    ..aOM<ConcreteProtocolProfile>(8, _omitFieldNames ? '' : 'protocolProfile',
        subBuilder: ConcreteProtocolProfile.create)
    ..hasRequiredFields = false;

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

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

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

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

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

  @$pb.TagNumber(3)
  $pb.PbMap<$core.String, $core.String> get headers => $_getMap(2);

  @$pb.TagNumber(4)
  $core.int get capacity => $_getIZ(3);
  @$pb.TagNumber(4)
  set capacity($core.int value) => $_setSignedInt32(3, value);
  @$pb.TagNumber(4)
  $core.bool hasCapacity() => $_has(3);
  @$pb.TagNumber(4)
  void clearCapacity() => $_clearField(4);

  @$pb.TagNumber(5)
  $core.int get maxQueue => $_getIZ(4);
  @$pb.TagNumber(5)
  set maxQueue($core.int value) => $_setSignedInt32(4, value);
  @$pb.TagNumber(5)
  $core.bool hasMaxQueue() => $_has(4);
  @$pb.TagNumber(5)
  void clearMaxQueue() => $_clearField(5);

  @$pb.TagNumber(6)
  $core.int get queueTimeoutMs => $_getIZ(5);
  @$pb.TagNumber(6)
  set queueTimeoutMs($core.int value) => $_setSignedInt32(5, value);
  @$pb.TagNumber(6)
  $core.bool hasQueueTimeoutMs() => $_has(5);
  @$pb.TagNumber(6)
  void clearQueueTimeoutMs() => $_clearField(6);

  @$pb.TagNumber(7)
  $core.int get requestTimeoutMs => $_getIZ(6);
  @$pb.TagNumber(7)
  set requestTimeoutMs($core.int value) => $_setSignedInt32(6, value);
  @$pb.TagNumber(7)
  $core.bool hasRequestTimeoutMs() => $_has(6);
  @$pb.TagNumber(7)
  void clearRequestTimeoutMs() => $_clearField(7);

  /// protocol_profile is the resolved concrete protocol profile snapshot.
  /// When set, the adapter uses the profile's operation paths for URL
  /// resolution instead of the legacy endpoint + /v1 suffix heuristic.
  @$pb.TagNumber(8)
  ConcreteProtocolProfile get protocolProfile => $_getN(7);
  @$pb.TagNumber(8)
  set protocolProfile(ConcreteProtocolProfile value) => $_setField(8, value);
  @$pb.TagNumber(8)
  $core.bool hasProtocolProfile() => $_has(7);
  @$pb.TagNumber(8)
  void clearProtocolProfile() => $_clearField(8);
  @$pb.TagNumber(8)
  ConcreteProtocolProfile ensureProtocolProfile() => $_ensure(7);
}

/// ProtocolAuth declares how a concrete protocol profile authenticates to its
/// upstream. It is the wire representation of config.ProtocolAuthConf.
class ProtocolAuth extends $pb.GeneratedMessage {
  factory ProtocolAuth({
    $core.String? header,
    $core.String? scheme,
  }) {
    final result = create();
    if (header != null) result.header = header;
    if (scheme != null) result.scheme = scheme;
    return result;
  }

  ProtocolAuth._();

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

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

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

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

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

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

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

/// ConcreteProtocolProfile is the immutable, resolved snapshot of a protocol
/// profile carried over the wire. It never contains a Base reference.
class ConcreteProtocolProfile extends $pb.GeneratedMessage {
  factory ConcreteProtocolProfile({
    $core.String? id,
    $core.String? driver,
    $core.String? baseUrl,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? operations,
    ProtocolAuth? auth,
    $core.Iterable<$core.String>? capabilities,
    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? modelMapping,
    $0.Struct? extensions,
  }) {
    final result = create();
    if (id != null) result.id = id;
    if (driver != null) result.driver = driver;
    if (baseUrl != null) result.baseUrl = baseUrl;
    if (operations != null) result.operations.addEntries(operations);
    if (auth != null) result.auth = auth;
    if (capabilities != null) result.capabilities.addAll(capabilities);
    if (modelMapping != null) result.modelMapping.addEntries(modelMapping);
    if (extensions != null) result.extensions = extensions;
    return result;
  }

  ConcreteProtocolProfile._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ConcreteProtocolProfile',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'id')
    ..aOS(2, _omitFieldNames ? '' : 'driver')
    ..aOS(3, _omitFieldNames ? '' : 'baseUrl')
    ..m<$core.String, $core.String>(4, _omitFieldNames ? '' : 'operations',
        entryClassName: 'ConcreteProtocolProfile.OperationsEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..aOM<ProtocolAuth>(5, _omitFieldNames ? '' : 'auth',
        subBuilder: ProtocolAuth.create)
    ..pPS(6, _omitFieldNames ? '' : 'capabilities')
    ..m<$core.String, $core.String>(7, _omitFieldNames ? '' : 'modelMapping',
        entryClassName: 'ConcreteProtocolProfile.ModelMappingEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OS,
        packageName: const $pb.PackageName('iop'))
    ..aOM<$0.Struct>(8, _omitFieldNames ? '' : 'extensions',
        subBuilder: $0.Struct.create)
    ..hasRequiredFields = false;

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

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

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

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

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

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

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

  @$pb.TagNumber(5)
  ProtocolAuth get auth => $_getN(4);
  @$pb.TagNumber(5)
  set auth(ProtocolAuth value) => $_setField(5, value);
  @$pb.TagNumber(5)
  $core.bool hasAuth() => $_has(4);
  @$pb.TagNumber(5)
  void clearAuth() => $_clearField(5);
  @$pb.TagNumber(5)
  ProtocolAuth ensureAuth() => $_ensure(4);

  @$pb.TagNumber(6)
  $pb.PbList<$core.String> get capabilities => $_getList(5);

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

  @$pb.TagNumber(8)
  $0.Struct get extensions => $_getN(7);
  @$pb.TagNumber(8)
  set extensions($0.Struct value) => $_setField(8, value);
  @$pb.TagNumber(8)
  $core.bool hasExtensions() => $_has(7);
  @$pb.TagNumber(8)
  void clearExtensions() => $_clearField(8);
  @$pb.TagNumber(8)
  $0.Struct ensureExtensions() => $_ensure(7);
}

/// NodeRuntimeConfig carries legacy node runtime metadata. Execution admission
/// must not use this as a node-wide global gate; provider/resource capacity owns
/// concurrency.
class NodeRuntimeConfig extends $pb.GeneratedMessage {
  factory NodeRuntimeConfig({
    $core.int? concurrency,
  }) {
    final result = create();
    if (concurrency != null) result.concurrency = concurrency;
    return result;
  }

  NodeRuntimeConfig._();

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

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

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

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

  @$core.pragma('dart2js:noInline')
  static NodeRuntimeConfig create() => NodeRuntimeConfig._();
  @$core.override
  NodeRuntimeConfig createEmptyInstance() => create();
  @$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 value) => $_setSignedInt32(0, value);
  @$pb.TagNumber(1)
  $core.bool hasConcurrency() => $_has(0);
  @$pb.TagNumber(1)
  void clearConcurrency() => $_clearField(1);
}

/// NodeConfigRefreshRequest is sent by edge to a connected node to push a new config payload.
class NodeConfigRefreshRequest extends $pb.GeneratedMessage {
  factory NodeConfigRefreshRequest({
    $core.String? requestId,
    NodeConfigPayload? config,
    $core.Iterable<$core.String>? changedPaths,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (config != null) result.config = config;
    if (changedPaths != null) result.changedPaths.addAll(changedPaths);
    return result;
  }

  NodeConfigRefreshRequest._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'NodeConfigRefreshRequest',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aOM<NodeConfigPayload>(2, _omitFieldNames ? '' : 'config',
        subBuilder: NodeConfigPayload.create)
    ..pPS(3, _omitFieldNames ? '' : 'changedPaths')
    ..hasRequiredFields = false;

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

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

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

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

  @$pb.TagNumber(2)
  NodeConfigPayload get config => $_getN(1);
  @$pb.TagNumber(2)
  set config(NodeConfigPayload value) => $_setField(2, value);
  @$pb.TagNumber(2)
  $core.bool hasConfig() => $_has(1);
  @$pb.TagNumber(2)
  void clearConfig() => $_clearField(2);
  @$pb.TagNumber(2)
  NodeConfigPayload ensureConfig() => $_ensure(1);

  @$pb.TagNumber(3)
  $pb.PbList<$core.String> get changedPaths => $_getList(2);
}

/// NodeConfigRefreshResponse is returned by the node to acknowledge or report failure.
class NodeConfigRefreshResponse extends $pb.GeneratedMessage {
  factory NodeConfigRefreshResponse({
    $core.String? requestId,
    NodeConfigRefreshStatus? status,
    $core.Iterable<$core.String>? restartRequiredPaths,
    $core.String? error,
  }) {
    final result = create();
    if (requestId != null) result.requestId = requestId;
    if (status != null) result.status = status;
    if (restartRequiredPaths != null)
      result.restartRequiredPaths.addAll(restartRequiredPaths);
    if (error != null) result.error = error;
    return result;
  }

  NodeConfigRefreshResponse._();

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

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'NodeConfigRefreshResponse',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'iop'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'requestId')
    ..aE<NodeConfigRefreshStatus>(2, _omitFieldNames ? '' : 'status',
        enumValues: NodeConfigRefreshStatus.values)
    ..pPS(3, _omitFieldNames ? '' : 'restartRequiredPaths')
    ..aOS(4, _omitFieldNames ? '' : 'error')
    ..hasRequiredFields = false;

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

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

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

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

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

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

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

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