From da1082095924c21c48032b7a5d0465c002019c62 Mon Sep 17 00:00:00 2001 From: flemming-it Date: Tue, 5 May 2026 16:24:16 +0200 Subject: [PATCH] feat: live HubClient with generated proto bindings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Proto codegen wired in. tools/generate.sh wraps protoc against ../fai_platform/proto/, including the well-known types (Empty, Struct, Timestamp) so they are generated alongside fai's own messages — protobuf 4.x doesn't ship them as importable Dart types, so we have to generate them ourselves. HubClient now exposes typed methods backed by real RPCs: - healthy() — Hub.Health probe (returns false on connect refused). - listCapabilities() — HubAdmin.ListCapabilities. - eventLog() — HubAdmin.EventLog with type filter. - listApprovals() — HubAdmin.ListApprovals (status filter). - approve() / reject() — HubAdmin.DecideApproval. Generated bindings under lib/src/generated/ are excluded from analyze (out of our style control). protoc_plugin pinned to 22.2.0 in tools/generate.sh comment because newer plugins generate code against protobuf 6.x, while grpc 4.x still constrains us to protobuf 4.x. Bumps fai_dart_sdk 0.1.0 -> 0.2.0. Signed-off-by: flemming-it --- analysis_options.yaml | 14 +- lib/fai_dart_sdk.dart | 7 +- lib/src/generated/fai/v1/common.pb.dart | 475 ++++ lib/src/generated/fai/v1/common.pbenum.dart | 42 + lib/src/generated/fai/v1/common.pbjson.dart | 125 + lib/src/generated/fai/v1/hub.pb.dart | 2266 +++++++++++++++++ lib/src/generated/fai/v1/hub.pbenum.dart | 51 + lib/src/generated/fai/v1/hub.pbgrpc.dart | 392 +++ lib/src/generated/fai/v1/hub.pbjson.dart | 569 +++++ lib/src/generated/fai/v1/module.pb.dart | 296 +++ lib/src/generated/fai/v1/module.pbenum.dart | 11 + lib/src/generated/fai/v1/module.pbgrpc.dart | 92 + lib/src/generated/fai/v1/module.pbjson.dart | 106 + .../generated/google/protobuf/empty.pb.dart | 52 + .../google/protobuf/empty.pbenum.dart | 11 + .../google/protobuf/empty.pbjson.dart | 24 + .../generated/google/protobuf/struct.pb.dart | 267 ++ .../google/protobuf/struct.pbenum.dart | 35 + .../google/protobuf/struct.pbjson.dart | 90 + .../google/protobuf/timestamp.pb.dart | 185 ++ .../google/protobuf/timestamp.pbenum.dart | 11 + .../google/protobuf/timestamp.pbjson.dart | 29 + lib/src/hub_client.dart | 142 +- pubspec.yaml | 1 + test/fai_dart_sdk_test.dart | 2 +- tools/generate.sh | 97 + 26 files changed, 5364 insertions(+), 28 deletions(-) create mode 100644 lib/src/generated/fai/v1/common.pb.dart create mode 100644 lib/src/generated/fai/v1/common.pbenum.dart create mode 100644 lib/src/generated/fai/v1/common.pbjson.dart create mode 100644 lib/src/generated/fai/v1/hub.pb.dart create mode 100644 lib/src/generated/fai/v1/hub.pbenum.dart create mode 100644 lib/src/generated/fai/v1/hub.pbgrpc.dart create mode 100644 lib/src/generated/fai/v1/hub.pbjson.dart create mode 100644 lib/src/generated/fai/v1/module.pb.dart create mode 100644 lib/src/generated/fai/v1/module.pbenum.dart create mode 100644 lib/src/generated/fai/v1/module.pbgrpc.dart create mode 100644 lib/src/generated/fai/v1/module.pbjson.dart create mode 100644 lib/src/generated/google/protobuf/empty.pb.dart create mode 100644 lib/src/generated/google/protobuf/empty.pbenum.dart create mode 100644 lib/src/generated/google/protobuf/empty.pbjson.dart create mode 100644 lib/src/generated/google/protobuf/struct.pb.dart create mode 100644 lib/src/generated/google/protobuf/struct.pbenum.dart create mode 100644 lib/src/generated/google/protobuf/struct.pbjson.dart create mode 100644 lib/src/generated/google/protobuf/timestamp.pb.dart create mode 100644 lib/src/generated/google/protobuf/timestamp.pbenum.dart create mode 100644 lib/src/generated/google/protobuf/timestamp.pbjson.dart create mode 100755 tools/generate.sh diff --git a/analysis_options.yaml b/analysis_options.yaml index dee8927..e2b225d 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -13,15 +13,11 @@ include: package:lints/recommended.yaml -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** +# Generated proto bindings live in lib/src/generated/. They are +# produced by protoc-gen-dart and we don't control their style. +analyzer: + exclude: + - lib/src/generated/** # For more information about the core and recommended set of lints, see # https://dart.dev/go/core-lints diff --git a/lib/fai_dart_sdk.dart b/lib/fai_dart_sdk.dart index 99e5c1d..15e7ed2 100644 --- a/lib/fai_dart_sdk.dart +++ b/lib/fai_dart_sdk.dart @@ -5,10 +5,9 @@ /// directory. Used by F∆I Studio and any Tier-3 Dart/Flutter /// app (DigiScout, J∆I, Scout, …) that wants to talk to a hub. /// -/// Status (2026-05-05): scaffold only. Generated proto bindings -/// land in `lib/src/generated/` once the codegen step is wired -/// in (`tools/generate.sh`). Until then, [HubClient] is a stub -/// type that documents the intended surface. +/// The generated protobuf bindings live under +/// `lib/src/generated/`. Re-run `tools/generate.sh` whenever the +/// platform's `.proto` files change. library; export 'src/hub_client.dart'; diff --git a/lib/src/generated/fai/v1/common.pb.dart b/lib/src/generated/fai/v1/common.pb.dart new file mode 100644 index 0000000..890d1e2 --- /dev/null +++ b/lib/src/generated/fai/v1/common.pb.dart @@ -0,0 +1,475 @@ +// +// Generated code. Do not modify. +// source: fai/v1/common.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../google/protobuf/struct.pb.dart' as $3; +import 'common.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'common.pbenum.dart'; + +/// A unique identifier for a flow invocation (UUIDv7). +class InvocationId extends $pb.GeneratedMessage { + factory InvocationId({ + $core.String? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + InvocationId._() : super(); + factory InvocationId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory InvocationId.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'InvocationId', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'value') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InvocationId clone() => InvocationId()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InvocationId copyWith(void Function(InvocationId) updates) => super.copyWith((message) => updates(message as InvocationId)) as InvocationId; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static InvocationId create() => InvocationId._(); + InvocationId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static InvocationId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static InvocationId? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get value => $_getSZ(0); + @$pb.TagNumber(1) + set value($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// A reference to a capability requested by a flow step. +/// +/// Example: namespace="text", name="extract", version_req="^1" +class CapabilityRef extends $pb.GeneratedMessage { + factory CapabilityRef({ + $core.String? namespace, + $core.String? name, + $core.String? versionReq, + }) { + final $result = create(); + if (namespace != null) { + $result.namespace = namespace; + } + if (name != null) { + $result.name = name; + } + if (versionReq != null) { + $result.versionReq = versionReq; + } + return $result; + } + CapabilityRef._() : super(); + factory CapabilityRef.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CapabilityRef.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CapabilityRef', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'namespace') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..aOS(3, _omitFieldNames ? '' : 'versionReq') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CapabilityRef clone() => CapabilityRef()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CapabilityRef copyWith(void Function(CapabilityRef) updates) => super.copyWith((message) => updates(message as CapabilityRef)) as CapabilityRef; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CapabilityRef create() => CapabilityRef._(); + CapabilityRef createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CapabilityRef getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CapabilityRef? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get namespace => $_getSZ(0); + @$pb.TagNumber(1) + set namespace($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNamespace() => $_has(0); + @$pb.TagNumber(1) + void clearNamespace() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get versionReq => $_getSZ(2); + @$pb.TagNumber(3) + set versionReq($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasVersionReq() => $_has(2); + @$pb.TagNumber(3) + void clearVersionReq() => $_clearField(3); +} + +enum Payload_Kind { + text, + json, + bytes, + file, + notSet +} + +/// A typed value passed between flow steps. +class Payload extends $pb.GeneratedMessage { + factory Payload({ + $core.String? text, + $3.Struct? json, + Bytes? bytes, + FileRef? file, + }) { + final $result = create(); + if (text != null) { + $result.text = text; + } + if (json != null) { + $result.json = json; + } + if (bytes != null) { + $result.bytes = bytes; + } + if (file != null) { + $result.file = file; + } + return $result; + } + Payload._() : super(); + factory Payload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Payload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Payload_Kind> _Payload_KindByTag = { + 1 : Payload_Kind.text, + 2 : Payload_Kind.json, + 3 : Payload_Kind.bytes, + 4 : Payload_Kind.file, + 0 : Payload_Kind.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Payload', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..oo(0, [1, 2, 3, 4]) + ..aOS(1, _omitFieldNames ? '' : 'text') + ..aOM<$3.Struct>(2, _omitFieldNames ? '' : 'json', subBuilder: $3.Struct.create) + ..aOM(3, _omitFieldNames ? '' : 'bytes', subBuilder: Bytes.create) + ..aOM(4, _omitFieldNames ? '' : 'file', subBuilder: FileRef.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Payload clone() => Payload()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Payload copyWith(void Function(Payload) updates) => super.copyWith((message) => updates(message as Payload)) as Payload; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Payload create() => Payload._(); + Payload createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Payload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Payload? _defaultInstance; + + Payload_Kind whichKind() => _Payload_KindByTag[$_whichOneof(0)]!; + void clearKind() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.String get text => $_getSZ(0); + @$pb.TagNumber(1) + set text($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasText() => $_has(0); + @$pb.TagNumber(1) + void clearText() => $_clearField(1); + + @$pb.TagNumber(2) + $3.Struct get json => $_getN(1); + @$pb.TagNumber(2) + set json($3.Struct v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasJson() => $_has(1); + @$pb.TagNumber(2) + void clearJson() => $_clearField(2); + @$pb.TagNumber(2) + $3.Struct ensureJson() => $_ensure(1); + + @$pb.TagNumber(3) + Bytes get bytes => $_getN(2); + @$pb.TagNumber(3) + set bytes(Bytes v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasBytes() => $_has(2); + @$pb.TagNumber(3) + void clearBytes() => $_clearField(3); + @$pb.TagNumber(3) + Bytes ensureBytes() => $_ensure(2); + + @$pb.TagNumber(4) + FileRef get file => $_getN(3); + @$pb.TagNumber(4) + set file(FileRef v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasFile() => $_has(3); + @$pb.TagNumber(4) + void clearFile() => $_clearField(4); + @$pb.TagNumber(4) + FileRef ensureFile() => $_ensure(3); +} + +class Bytes extends $pb.GeneratedMessage { + factory Bytes({ + $core.String? mimeType, + $core.List<$core.int>? data, + }) { + final $result = create(); + if (mimeType != null) { + $result.mimeType = mimeType; + } + if (data != null) { + $result.data = data; + } + return $result; + } + Bytes._() : super(); + factory Bytes.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Bytes.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Bytes', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'mimeType') + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'data', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Bytes clone() => Bytes()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Bytes copyWith(void Function(Bytes) updates) => super.copyWith((message) => updates(message as Bytes)) as Bytes; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Bytes create() => Bytes._(); + Bytes createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Bytes getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Bytes? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get mimeType => $_getSZ(0); + @$pb.TagNumber(1) + set mimeType($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMimeType() => $_has(0); + @$pb.TagNumber(1) + void clearMimeType() => $_clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get data => $_getN(1); + @$pb.TagNumber(2) + set data($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasData() => $_has(1); + @$pb.TagNumber(2) + void clearData() => $_clearField(2); +} + +class FileRef extends $pb.GeneratedMessage { + factory FileRef({ + $core.String? uri, + $core.String? mimeType, + $fixnum.Int64? sizeBytes, + $core.String? sha256, + }) { + final $result = create(); + if (uri != null) { + $result.uri = uri; + } + if (mimeType != null) { + $result.mimeType = mimeType; + } + if (sizeBytes != null) { + $result.sizeBytes = sizeBytes; + } + if (sha256 != null) { + $result.sha256 = sha256; + } + return $result; + } + FileRef._() : super(); + factory FileRef.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FileRef.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FileRef', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'uri') + ..aOS(2, _omitFieldNames ? '' : 'mimeType') + ..a<$fixnum.Int64>(3, _omitFieldNames ? '' : 'sizeBytes', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..aOS(4, _omitFieldNames ? '' : 'sha256') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FileRef clone() => FileRef()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FileRef copyWith(void Function(FileRef) updates) => super.copyWith((message) => updates(message as FileRef)) as FileRef; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FileRef create() => FileRef._(); + FileRef createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FileRef getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FileRef? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get uri => $_getSZ(0); + @$pb.TagNumber(1) + set uri($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasUri() => $_has(0); + @$pb.TagNumber(1) + void clearUri() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get mimeType => $_getSZ(1); + @$pb.TagNumber(2) + set mimeType($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMimeType() => $_has(1); + @$pb.TagNumber(2) + void clearMimeType() => $_clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get sizeBytes => $_getI64(2); + @$pb.TagNumber(3) + set sizeBytes($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasSizeBytes() => $_has(2); + @$pb.TagNumber(3) + void clearSizeBytes() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get sha256 => $_getSZ(3); + @$pb.TagNumber(4) + set sha256($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasSha256() => $_has(3); + @$pb.TagNumber(4) + void clearSha256() => $_clearField(4); +} + +/// Standard error shape for hub and module responses. +class FaiError extends $pb.GeneratedMessage { + factory FaiError({ + FaiError_Code? code, + $core.String? message, + $core.String? details, + }) { + final $result = create(); + if (code != null) { + $result.code = code; + } + if (message != null) { + $result.message = message; + } + if (details != null) { + $result.details = details; + } + return $result; + } + FaiError._() : super(); + factory FaiError.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FaiError.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaiError', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'code', $pb.PbFieldType.OE, defaultOrMaker: FaiError_Code.UNKNOWN, valueOf: FaiError_Code.valueOf, enumValues: FaiError_Code.values) + ..aOS(2, _omitFieldNames ? '' : 'message') + ..aOS(3, _omitFieldNames ? '' : 'details') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FaiError clone() => FaiError()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FaiError copyWith(void Function(FaiError) updates) => super.copyWith((message) => updates(message as FaiError)) as FaiError; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FaiError create() => FaiError._(); + FaiError createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FaiError getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FaiError? _defaultInstance; + + @$pb.TagNumber(1) + FaiError_Code get code => $_getN(0); + @$pb.TagNumber(1) + set code(FaiError_Code v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCode() => $_has(0); + @$pb.TagNumber(1) + void clearCode() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get message => $_getSZ(1); + @$pb.TagNumber(2) + set message($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMessage() => $_has(1); + @$pb.TagNumber(2) + void clearMessage() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get details => $_getSZ(2); + @$pb.TagNumber(3) + set details($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDetails() => $_has(2); + @$pb.TagNumber(3) + void clearDetails() => $_clearField(3); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/fai/v1/common.pbenum.dart b/lib/src/generated/fai/v1/common.pbenum.dart new file mode 100644 index 0000000..19a7514 --- /dev/null +++ b/lib/src/generated/fai/v1/common.pbenum.dart @@ -0,0 +1,42 @@ +// +// Generated code. Do not modify. +// source: fai/v1/common.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class FaiError_Code extends $pb.ProtobufEnum { + static const FaiError_Code UNKNOWN = FaiError_Code._(0, _omitEnumNames ? '' : 'UNKNOWN'); + static const FaiError_Code INVALID_INPUT = FaiError_Code._(1, _omitEnumNames ? '' : 'INVALID_INPUT'); + static const FaiError_Code CAPABILITY_NOT_SUPPORTED = FaiError_Code._(2, _omitEnumNames ? '' : 'CAPABILITY_NOT_SUPPORTED'); + static const FaiError_Code PERMISSION_DENIED = FaiError_Code._(3, _omitEnumNames ? '' : 'PERMISSION_DENIED'); + static const FaiError_Code RESOURCE_EXHAUSTED = FaiError_Code._(4, _omitEnumNames ? '' : 'RESOURCE_EXHAUSTED'); + static const FaiError_Code DEADLINE_EXCEEDED = FaiError_Code._(5, _omitEnumNames ? '' : 'DEADLINE_EXCEEDED'); + static const FaiError_Code INTERNAL = FaiError_Code._(6, _omitEnumNames ? '' : 'INTERNAL'); + + static const $core.List values = [ + UNKNOWN, + INVALID_INPUT, + CAPABILITY_NOT_SUPPORTED, + PERMISSION_DENIED, + RESOURCE_EXHAUSTED, + DEADLINE_EXCEEDED, + INTERNAL, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 6); + static FaiError_Code? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const FaiError_Code._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/generated/fai/v1/common.pbjson.dart b/lib/src/generated/fai/v1/common.pbjson.dart new file mode 100644 index 0000000..3d0de70 --- /dev/null +++ b/lib/src/generated/fai/v1/common.pbjson.dart @@ -0,0 +1,125 @@ +// +// Generated code. Do not modify. +// source: fai/v1/common.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use invocationIdDescriptor instead') +const InvocationId$json = { + '1': 'InvocationId', + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 9, '10': 'value'}, + ], +}; + +/// Descriptor for `InvocationId`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List invocationIdDescriptor = $convert.base64Decode( + 'CgxJbnZvY2F0aW9uSWQSFAoFdmFsdWUYASABKAlSBXZhbHVl'); + +@$core.Deprecated('Use capabilityRefDescriptor instead') +const CapabilityRef$json = { + '1': 'CapabilityRef', + '2': [ + {'1': 'namespace', '3': 1, '4': 1, '5': 9, '10': 'namespace'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'version_req', '3': 3, '4': 1, '5': 9, '10': 'versionReq'}, + ], +}; + +/// Descriptor for `CapabilityRef`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List capabilityRefDescriptor = $convert.base64Decode( + 'Cg1DYXBhYmlsaXR5UmVmEhwKCW5hbWVzcGFjZRgBIAEoCVIJbmFtZXNwYWNlEhIKBG5hbWUYAi' + 'ABKAlSBG5hbWUSHwoLdmVyc2lvbl9yZXEYAyABKAlSCnZlcnNpb25SZXE='); + +@$core.Deprecated('Use payloadDescriptor instead') +const Payload$json = { + '1': 'Payload', + '2': [ + {'1': 'text', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'text'}, + {'1': 'json', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.Struct', '9': 0, '10': 'json'}, + {'1': 'bytes', '3': 3, '4': 1, '5': 11, '6': '.fai.v1.Bytes', '9': 0, '10': 'bytes'}, + {'1': 'file', '3': 4, '4': 1, '5': 11, '6': '.fai.v1.FileRef', '9': 0, '10': 'file'}, + ], + '8': [ + {'1': 'kind'}, + ], +}; + +/// Descriptor for `Payload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List payloadDescriptor = $convert.base64Decode( + 'CgdQYXlsb2FkEhQKBHRleHQYASABKAlIAFIEdGV4dBItCgRqc29uGAIgASgLMhcuZ29vZ2xlLn' + 'Byb3RvYnVmLlN0cnVjdEgAUgRqc29uEiUKBWJ5dGVzGAMgASgLMg0uZmFpLnYxLkJ5dGVzSABS' + 'BWJ5dGVzEiUKBGZpbGUYBCABKAsyDy5mYWkudjEuRmlsZVJlZkgAUgRmaWxlQgYKBGtpbmQ='); + +@$core.Deprecated('Use bytesDescriptor instead') +const Bytes$json = { + '1': 'Bytes', + '2': [ + {'1': 'mime_type', '3': 1, '4': 1, '5': 9, '10': 'mimeType'}, + {'1': 'data', '3': 2, '4': 1, '5': 12, '10': 'data'}, + ], +}; + +/// Descriptor for `Bytes`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List bytesDescriptor = $convert.base64Decode( + 'CgVCeXRlcxIbCgltaW1lX3R5cGUYASABKAlSCG1pbWVUeXBlEhIKBGRhdGEYAiABKAxSBGRhdG' + 'E='); + +@$core.Deprecated('Use fileRefDescriptor instead') +const FileRef$json = { + '1': 'FileRef', + '2': [ + {'1': 'uri', '3': 1, '4': 1, '5': 9, '10': 'uri'}, + {'1': 'mime_type', '3': 2, '4': 1, '5': 9, '10': 'mimeType'}, + {'1': 'size_bytes', '3': 3, '4': 1, '5': 4, '10': 'sizeBytes'}, + {'1': 'sha256', '3': 4, '4': 1, '5': 9, '10': 'sha256'}, + ], +}; + +/// Descriptor for `FileRef`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fileRefDescriptor = $convert.base64Decode( + 'CgdGaWxlUmVmEhAKA3VyaRgBIAEoCVIDdXJpEhsKCW1pbWVfdHlwZRgCIAEoCVIIbWltZVR5cG' + 'USHQoKc2l6ZV9ieXRlcxgDIAEoBFIJc2l6ZUJ5dGVzEhYKBnNoYTI1NhgEIAEoCVIGc2hhMjU2'); + +@$core.Deprecated('Use faiErrorDescriptor instead') +const FaiError$json = { + '1': 'FaiError', + '2': [ + {'1': 'code', '3': 1, '4': 1, '5': 14, '6': '.fai.v1.FaiError.Code', '10': 'code'}, + {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + {'1': 'details', '3': 3, '4': 1, '5': 9, '10': 'details'}, + ], + '4': [FaiError_Code$json], +}; + +@$core.Deprecated('Use faiErrorDescriptor instead') +const FaiError_Code$json = { + '1': 'Code', + '2': [ + {'1': 'UNKNOWN', '2': 0}, + {'1': 'INVALID_INPUT', '2': 1}, + {'1': 'CAPABILITY_NOT_SUPPORTED', '2': 2}, + {'1': 'PERMISSION_DENIED', '2': 3}, + {'1': 'RESOURCE_EXHAUSTED', '2': 4}, + {'1': 'DEADLINE_EXCEEDED', '2': 5}, + {'1': 'INTERNAL', '2': 6}, + ], +}; + +/// Descriptor for `FaiError`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List faiErrorDescriptor = $convert.base64Decode( + 'CghGYWlFcnJvchIpCgRjb2RlGAEgASgOMhUuZmFpLnYxLkZhaUVycm9yLkNvZGVSBGNvZGUSGA' + 'oHbWVzc2FnZRgCIAEoCVIHbWVzc2FnZRIYCgdkZXRhaWxzGAMgASgJUgdkZXRhaWxzIpgBCgRD' + 'b2RlEgsKB1VOS05PV04QABIRCg1JTlZBTElEX0lOUFVUEAESHAoYQ0FQQUJJTElUWV9OT1RfU1' + 'VQUE9SVEVEEAISFQoRUEVSTUlTU0lPTl9ERU5JRUQQAxIWChJSRVNPVVJDRV9FWEhBVVNURUQQ' + 'BBIVChFERUFETElORV9FWENFRURFRBAFEgwKCElOVEVSTkFMEAY='); + diff --git a/lib/src/generated/fai/v1/hub.pb.dart b/lib/src/generated/fai/v1/hub.pb.dart new file mode 100644 index 0000000..5765c2a --- /dev/null +++ b/lib/src/generated/fai/v1/hub.pb.dart @@ -0,0 +1,2266 @@ +// +// Generated code. Do not modify. +// source: fai/v1/hub.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'common.pb.dart' as $4; +import 'hub.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'hub.pbenum.dart'; + +class SubmitRequest extends $pb.GeneratedMessage { + factory SubmitRequest({ + $core.List<$core.int>? flowYaml, + $core.Iterable<$core.MapEntry<$core.String, $4.Payload>>? inputs, + }) { + final $result = create(); + if (flowYaml != null) { + $result.flowYaml = flowYaml; + } + if (inputs != null) { + $result.inputs.addEntries(inputs); + } + return $result; + } + SubmitRequest._() : super(); + factory SubmitRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SubmitRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SubmitRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'flowYaml', $pb.PbFieldType.OY) + ..m<$core.String, $4.Payload>(2, _omitFieldNames ? '' : 'inputs', entryClassName: 'SubmitRequest.InputsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $4.Payload.create, valueDefaultOrMaker: $4.Payload.getDefault, packageName: const $pb.PackageName('fai.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SubmitRequest clone() => SubmitRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SubmitRequest copyWith(void Function(SubmitRequest) updates) => super.copyWith((message) => updates(message as SubmitRequest)) as SubmitRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SubmitRequest create() => SubmitRequest._(); + SubmitRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SubmitRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SubmitRequest? _defaultInstance; + + /// The flow definition as raw YAML. + @$pb.TagNumber(1) + $core.List<$core.int> get flowYaml => $_getN(0); + @$pb.TagNumber(1) + set flowYaml($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasFlowYaml() => $_has(0); + @$pb.TagNumber(1) + void clearFlowYaml() => $_clearField(1); + + /// Named input values for the flow. + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $4.Payload> get inputs => $_getMap(1); +} + +class SubmitResponse extends $pb.GeneratedMessage { + factory SubmitResponse({ + $4.InvocationId? invocationId, + $core.Iterable<$core.MapEntry<$core.String, $4.Payload>>? outputs, + }) { + final $result = create(); + if (invocationId != null) { + $result.invocationId = invocationId; + } + if (outputs != null) { + $result.outputs.addEntries(outputs); + } + return $result; + } + SubmitResponse._() : super(); + factory SubmitResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SubmitResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SubmitResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOM<$4.InvocationId>(1, _omitFieldNames ? '' : 'invocationId', subBuilder: $4.InvocationId.create) + ..m<$core.String, $4.Payload>(2, _omitFieldNames ? '' : 'outputs', entryClassName: 'SubmitResponse.OutputsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $4.Payload.create, valueDefaultOrMaker: $4.Payload.getDefault, packageName: const $pb.PackageName('fai.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SubmitResponse clone() => SubmitResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SubmitResponse copyWith(void Function(SubmitResponse) updates) => super.copyWith((message) => updates(message as SubmitResponse)) as SubmitResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SubmitResponse create() => SubmitResponse._(); + SubmitResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SubmitResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SubmitResponse? _defaultInstance; + + @$pb.TagNumber(1) + $4.InvocationId get invocationId => $_getN(0); + @$pb.TagNumber(1) + set invocationId($4.InvocationId v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasInvocationId() => $_has(0); + @$pb.TagNumber(1) + void clearInvocationId() => $_clearField(1); + @$pb.TagNumber(1) + $4.InvocationId ensureInvocationId() => $_ensure(0); + + /// Named output values produced by the flow. + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $4.Payload> get outputs => $_getMap(1); +} + +class ModuleList extends $pb.GeneratedMessage { + factory ModuleList({ + $core.Iterable? modules, + }) { + final $result = create(); + if (modules != null) { + $result.modules.addAll(modules); + } + return $result; + } + ModuleList._() : super(); + factory ModuleList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ModuleList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ModuleList', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'modules', $pb.PbFieldType.PM, subBuilder: ModuleSummary.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleList clone() => ModuleList()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleList copyWith(void Function(ModuleList) updates) => super.copyWith((message) => updates(message as ModuleList)) as ModuleList; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ModuleList create() => ModuleList._(); + ModuleList createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ModuleList getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ModuleList? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get modules => $_getList(0); +} + +class ModuleSummary extends $pb.GeneratedMessage { + factory ModuleSummary({ + $core.String? name, + $core.String? version, + $core.Iterable<$4.CapabilityRef>? provides, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (version != null) { + $result.version = version; + } + if (provides != null) { + $result.provides.addAll(provides); + } + return $result; + } + ModuleSummary._() : super(); + factory ModuleSummary.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ModuleSummary.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ModuleSummary', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'version') + ..pc<$4.CapabilityRef>(3, _omitFieldNames ? '' : 'provides', $pb.PbFieldType.PM, subBuilder: $4.CapabilityRef.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleSummary clone() => ModuleSummary()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleSummary copyWith(void Function(ModuleSummary) updates) => super.copyWith((message) => updates(message as ModuleSummary)) as ModuleSummary; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ModuleSummary create() => ModuleSummary._(); + ModuleSummary createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ModuleSummary getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ModuleSummary? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get version => $_getSZ(1); + @$pb.TagNumber(2) + set version($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasVersion() => $_has(1); + @$pb.TagNumber(2) + void clearVersion() => $_clearField(2); + + @$pb.TagNumber(3) + $pb.PbList<$4.CapabilityRef> get provides => $_getList(2); +} + +class HealthStatus extends $pb.GeneratedMessage { + factory HealthStatus({ + HealthStatus_State? state, + $core.String? detail, + }) { + final $result = create(); + if (state != null) { + $result.state = state; + } + if (detail != null) { + $result.detail = detail; + } + return $result; + } + HealthStatus._() : super(); + factory HealthStatus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory HealthStatus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'HealthStatus', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'state', $pb.PbFieldType.OE, defaultOrMaker: HealthStatus_State.UNKNOWN, valueOf: HealthStatus_State.valueOf, enumValues: HealthStatus_State.values) + ..aOS(2, _omitFieldNames ? '' : 'detail') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + HealthStatus clone() => HealthStatus()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + HealthStatus copyWith(void Function(HealthStatus) updates) => super.copyWith((message) => updates(message as HealthStatus)) as HealthStatus; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static HealthStatus create() => HealthStatus._(); + HealthStatus createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static HealthStatus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static HealthStatus? _defaultInstance; + + @$pb.TagNumber(1) + HealthStatus_State get state => $_getN(0); + @$pb.TagNumber(1) + set state(HealthStatus_State v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasState() => $_has(0); + @$pb.TagNumber(1) + void clearState() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get detail => $_getSZ(1); + @$pb.TagNumber(2) + set detail($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasDetail() => $_has(1); + @$pb.TagNumber(2) + void clearDetail() => $_clearField(2); +} + +class CapabilityList extends $pb.GeneratedMessage { + factory CapabilityList({ + $core.Iterable? capabilities, + }) { + final $result = create(); + if (capabilities != null) { + $result.capabilities.addAll(capabilities); + } + return $result; + } + CapabilityList._() : super(); + factory CapabilityList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CapabilityList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CapabilityList', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'capabilities', $pb.PbFieldType.PM, subBuilder: CapabilityEntry.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CapabilityList clone() => CapabilityList()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CapabilityList copyWith(void Function(CapabilityList) updates) => super.copyWith((message) => updates(message as CapabilityList)) as CapabilityList; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CapabilityList create() => CapabilityList._(); + CapabilityList createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CapabilityList getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CapabilityList? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get capabilities => $_getList(0); +} + +class CapabilityEntry extends $pb.GeneratedMessage { + factory CapabilityEntry({ + $core.String? capability, + $core.String? version, + $core.String? moduleName, + $core.String? moduleVersion, + }) { + final $result = create(); + if (capability != null) { + $result.capability = capability; + } + if (version != null) { + $result.version = version; + } + if (moduleName != null) { + $result.moduleName = moduleName; + } + if (moduleVersion != null) { + $result.moduleVersion = moduleVersion; + } + return $result; + } + CapabilityEntry._() : super(); + factory CapabilityEntry.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CapabilityEntry.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CapabilityEntry', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'capability') + ..aOS(2, _omitFieldNames ? '' : 'version') + ..aOS(3, _omitFieldNames ? '' : 'moduleName') + ..aOS(4, _omitFieldNames ? '' : 'moduleVersion') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CapabilityEntry clone() => CapabilityEntry()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CapabilityEntry copyWith(void Function(CapabilityEntry) updates) => super.copyWith((message) => updates(message as CapabilityEntry)) as CapabilityEntry; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CapabilityEntry create() => CapabilityEntry._(); + CapabilityEntry createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CapabilityEntry getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CapabilityEntry? _defaultInstance; + + /// Full capability identifier, e.g. "text.extract". + @$pb.TagNumber(1) + $core.String get capability => $_getSZ(0); + @$pb.TagNumber(1) + set capability($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCapability() => $_has(0); + @$pb.TagNumber(1) + void clearCapability() => $_clearField(1); + + /// Capability version (semver). + @$pb.TagNumber(2) + $core.String get version => $_getSZ(1); + @$pb.TagNumber(2) + set version($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasVersion() => $_has(1); + @$pb.TagNumber(2) + void clearVersion() => $_clearField(2); + + /// Module providing this capability. + @$pb.TagNumber(3) + $core.String get moduleName => $_getSZ(2); + @$pb.TagNumber(3) + set moduleName($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasModuleName() => $_has(2); + @$pb.TagNumber(3) + void clearModuleName() => $_clearField(3); + + /// Module's own version. + @$pb.TagNumber(4) + $core.String get moduleVersion => $_getSZ(3); + @$pb.TagNumber(4) + set moduleVersion($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasModuleVersion() => $_has(3); + @$pb.TagNumber(4) + void clearModuleVersion() => $_clearField(4); +} + +class ModuleInfoRequest extends $pb.GeneratedMessage { + factory ModuleInfoRequest({ + $core.String? moduleName, + }) { + final $result = create(); + if (moduleName != null) { + $result.moduleName = moduleName; + } + return $result; + } + ModuleInfoRequest._() : super(); + factory ModuleInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ModuleInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ModuleInfoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'moduleName') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleInfoRequest clone() => ModuleInfoRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleInfoRequest copyWith(void Function(ModuleInfoRequest) updates) => super.copyWith((message) => updates(message as ModuleInfoRequest)) as ModuleInfoRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ModuleInfoRequest create() => ModuleInfoRequest._(); + ModuleInfoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ModuleInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ModuleInfoRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get moduleName => $_getSZ(0); + @$pb.TagNumber(1) + set moduleName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasModuleName() => $_has(0); + @$pb.TagNumber(1) + void clearModuleName() => $_clearField(1); +} + +class ModuleInfoResponse extends $pb.GeneratedMessage { + factory ModuleInfoResponse({ + $core.String? name, + $core.String? version, + $core.Iterable<$4.CapabilityRef>? provides, + $core.Iterable<$core.String>? permissions, + $core.String? directory, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (version != null) { + $result.version = version; + } + if (provides != null) { + $result.provides.addAll(provides); + } + if (permissions != null) { + $result.permissions.addAll(permissions); + } + if (directory != null) { + $result.directory = directory; + } + return $result; + } + ModuleInfoResponse._() : super(); + factory ModuleInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ModuleInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ModuleInfoResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'version') + ..pc<$4.CapabilityRef>(3, _omitFieldNames ? '' : 'provides', $pb.PbFieldType.PM, subBuilder: $4.CapabilityRef.create) + ..pPS(4, _omitFieldNames ? '' : 'permissions') + ..aOS(5, _omitFieldNames ? '' : 'directory') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleInfoResponse clone() => ModuleInfoResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleInfoResponse copyWith(void Function(ModuleInfoResponse) updates) => super.copyWith((message) => updates(message as ModuleInfoResponse)) as ModuleInfoResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ModuleInfoResponse create() => ModuleInfoResponse._(); + ModuleInfoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ModuleInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ModuleInfoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get version => $_getSZ(1); + @$pb.TagNumber(2) + set version($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasVersion() => $_has(1); + @$pb.TagNumber(2) + void clearVersion() => $_clearField(2); + + @$pb.TagNumber(3) + $pb.PbList<$4.CapabilityRef> get provides => $_getList(2); + + /// Permission strings exactly as declared in module.yaml. + @$pb.TagNumber(4) + $pb.PbList<$core.String> get permissions => $_getList(3); + + /// Filesystem location the module was loaded from. + @$pb.TagNumber(5) + $core.String get directory => $_getSZ(4); + @$pb.TagNumber(5) + set directory($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasDirectory() => $_has(4); + @$pb.TagNumber(5) + void clearDirectory() => $_clearField(5); +} + +class CheckPermissionRequest extends $pb.GeneratedMessage { + factory CheckPermissionRequest({ + $core.String? moduleName, + $core.String? permission, + }) { + final $result = create(); + if (moduleName != null) { + $result.moduleName = moduleName; + } + if (permission != null) { + $result.permission = permission; + } + return $result; + } + CheckPermissionRequest._() : super(); + factory CheckPermissionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CheckPermissionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CheckPermissionRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'moduleName') + ..aOS(2, _omitFieldNames ? '' : 'permission') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CheckPermissionRequest clone() => CheckPermissionRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CheckPermissionRequest copyWith(void Function(CheckPermissionRequest) updates) => super.copyWith((message) => updates(message as CheckPermissionRequest)) as CheckPermissionRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CheckPermissionRequest create() => CheckPermissionRequest._(); + CheckPermissionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CheckPermissionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CheckPermissionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get moduleName => $_getSZ(0); + @$pb.TagNumber(1) + set moduleName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasModuleName() => $_has(0); + @$pb.TagNumber(1) + void clearModuleName() => $_clearField(1); + + /// Permission string in `: ` form. + @$pb.TagNumber(2) + $core.String get permission => $_getSZ(1); + @$pb.TagNumber(2) + set permission($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPermission() => $_has(1); + @$pb.TagNumber(2) + void clearPermission() => $_clearField(2); +} + +class CheckPermissionResponse extends $pb.GeneratedMessage { + factory CheckPermissionResponse({ + $core.bool? allowed, + $core.String? reason, + }) { + final $result = create(); + if (allowed != null) { + $result.allowed = allowed; + } + if (reason != null) { + $result.reason = reason; + } + return $result; + } + CheckPermissionResponse._() : super(); + factory CheckPermissionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CheckPermissionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CheckPermissionResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'allowed') + ..aOS(2, _omitFieldNames ? '' : 'reason') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CheckPermissionResponse clone() => CheckPermissionResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CheckPermissionResponse copyWith(void Function(CheckPermissionResponse) updates) => super.copyWith((message) => updates(message as CheckPermissionResponse)) as CheckPermissionResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CheckPermissionResponse create() => CheckPermissionResponse._(); + CheckPermissionResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CheckPermissionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CheckPermissionResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get allowed => $_getBF(0); + @$pb.TagNumber(1) + set allowed($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasAllowed() => $_has(0); + @$pb.TagNumber(1) + void clearAllowed() => $_clearField(1); + + /// Human-readable reason. Empty when allowed. + @$pb.TagNumber(2) + $core.String get reason => $_getSZ(1); + @$pb.TagNumber(2) + set reason($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasReason() => $_has(1); + @$pb.TagNumber(2) + void clearReason() => $_clearField(2); +} + +class EventLogRequest extends $pb.GeneratedMessage { + factory EventLogRequest({ + $core.int? limit, + $core.Iterable<$core.String>? eventTypes, + }) { + final $result = create(); + if (limit != null) { + $result.limit = limit; + } + if (eventTypes != null) { + $result.eventTypes.addAll(eventTypes); + } + return $result; + } + EventLogRequest._() : super(); + factory EventLogRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EventLogRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EventLogRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'limit', $pb.PbFieldType.O3) + ..pPS(2, _omitFieldNames ? '' : 'eventTypes') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EventLogRequest clone() => EventLogRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EventLogRequest copyWith(void Function(EventLogRequest) updates) => super.copyWith((message) => updates(message as EventLogRequest)) as EventLogRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EventLogRequest create() => EventLogRequest._(); + EventLogRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EventLogRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EventLogRequest? _defaultInstance; + + /// Maximum number of events to return. Defaults to 100 when 0. + @$pb.TagNumber(1) + $core.int get limit => $_getIZ(0); + @$pb.TagNumber(1) + set limit($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasLimit() => $_has(0); + @$pb.TagNumber(1) + void clearLimit() => $_clearField(1); + + /// Optional event_type filter; when empty, all types are returned. + @$pb.TagNumber(2) + $pb.PbList<$core.String> get eventTypes => $_getList(1); +} + +class EventLogResponse extends $pb.GeneratedMessage { + factory EventLogResponse({ + $core.Iterable? events, + }) { + final $result = create(); + if (events != null) { + $result.events.addAll(events); + } + return $result; + } + EventLogResponse._() : super(); + factory EventLogResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EventLogResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EventLogResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'events', $pb.PbFieldType.PM, subBuilder: LoggedEvent.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EventLogResponse clone() => EventLogResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EventLogResponse copyWith(void Function(EventLogResponse) updates) => super.copyWith((message) => updates(message as EventLogResponse)) as EventLogResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EventLogResponse create() => EventLogResponse._(); + EventLogResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EventLogResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EventLogResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get events => $_getList(0); +} + +class LoggedEvent extends $pb.GeneratedMessage { + factory LoggedEvent({ + $core.String? eventId, + $core.String? timestamp, + $core.String? eventType, + $core.String? flowExecution, + $core.String? invocationId, + $core.String? flowName, + $core.String? stepId, + $core.String? moduleName, + $core.String? moduleVersion, + $fixnum.Int64? durationMs, + $core.String? error, + }) { + final $result = create(); + if (eventId != null) { + $result.eventId = eventId; + } + if (timestamp != null) { + $result.timestamp = timestamp; + } + if (eventType != null) { + $result.eventType = eventType; + } + if (flowExecution != null) { + $result.flowExecution = flowExecution; + } + if (invocationId != null) { + $result.invocationId = invocationId; + } + if (flowName != null) { + $result.flowName = flowName; + } + if (stepId != null) { + $result.stepId = stepId; + } + if (moduleName != null) { + $result.moduleName = moduleName; + } + if (moduleVersion != null) { + $result.moduleVersion = moduleVersion; + } + if (durationMs != null) { + $result.durationMs = durationMs; + } + if (error != null) { + $result.error = error; + } + return $result; + } + LoggedEvent._() : super(); + factory LoggedEvent.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory LoggedEvent.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'LoggedEvent', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'eventId') + ..aOS(2, _omitFieldNames ? '' : 'timestamp') + ..aOS(3, _omitFieldNames ? '' : 'eventType') + ..aOS(4, _omitFieldNames ? '' : 'flowExecution') + ..aOS(5, _omitFieldNames ? '' : 'invocationId') + ..aOS(6, _omitFieldNames ? '' : 'flowName') + ..aOS(7, _omitFieldNames ? '' : 'stepId') + ..aOS(8, _omitFieldNames ? '' : 'moduleName') + ..aOS(9, _omitFieldNames ? '' : 'moduleVersion') + ..aInt64(10, _omitFieldNames ? '' : 'durationMs') + ..aOS(11, _omitFieldNames ? '' : 'error') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LoggedEvent clone() => LoggedEvent()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LoggedEvent copyWith(void Function(LoggedEvent) updates) => super.copyWith((message) => updates(message as LoggedEvent)) as LoggedEvent; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static LoggedEvent create() => LoggedEvent._(); + LoggedEvent createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static LoggedEvent getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static LoggedEvent? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get eventId => $_getSZ(0); + @$pb.TagNumber(1) + set eventId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasEventId() => $_has(0); + @$pb.TagNumber(1) + void clearEventId() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get timestamp => $_getSZ(1); + @$pb.TagNumber(2) + set timestamp($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasTimestamp() => $_has(1); + @$pb.TagNumber(2) + void clearTimestamp() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get eventType => $_getSZ(2); + @$pb.TagNumber(3) + set eventType($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasEventType() => $_has(2); + @$pb.TagNumber(3) + void clearEventType() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get flowExecution => $_getSZ(3); + @$pb.TagNumber(4) + set flowExecution($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasFlowExecution() => $_has(3); + @$pb.TagNumber(4) + void clearFlowExecution() => $_clearField(4); + + @$pb.TagNumber(5) + $core.String get invocationId => $_getSZ(4); + @$pb.TagNumber(5) + set invocationId($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasInvocationId() => $_has(4); + @$pb.TagNumber(5) + void clearInvocationId() => $_clearField(5); + + @$pb.TagNumber(6) + $core.String get flowName => $_getSZ(5); + @$pb.TagNumber(6) + set flowName($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasFlowName() => $_has(5); + @$pb.TagNumber(6) + void clearFlowName() => $_clearField(6); + + @$pb.TagNumber(7) + $core.String get stepId => $_getSZ(6); + @$pb.TagNumber(7) + set stepId($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasStepId() => $_has(6); + @$pb.TagNumber(7) + void clearStepId() => $_clearField(7); + + @$pb.TagNumber(8) + $core.String get moduleName => $_getSZ(7); + @$pb.TagNumber(8) + set moduleName($core.String v) { $_setString(7, v); } + @$pb.TagNumber(8) + $core.bool hasModuleName() => $_has(7); + @$pb.TagNumber(8) + void clearModuleName() => $_clearField(8); + + @$pb.TagNumber(9) + $core.String get moduleVersion => $_getSZ(8); + @$pb.TagNumber(9) + set moduleVersion($core.String v) { $_setString(8, v); } + @$pb.TagNumber(9) + $core.bool hasModuleVersion() => $_has(8); + @$pb.TagNumber(9) + void clearModuleVersion() => $_clearField(9); + + @$pb.TagNumber(10) + $fixnum.Int64 get durationMs => $_getI64(9); + @$pb.TagNumber(10) + set durationMs($fixnum.Int64 v) { $_setInt64(9, v); } + @$pb.TagNumber(10) + $core.bool hasDurationMs() => $_has(9); + @$pb.TagNumber(10) + void clearDurationMs() => $_clearField(10); + + @$pb.TagNumber(11) + $core.String get error => $_getSZ(10); + @$pb.TagNumber(11) + set error($core.String v) { $_setString(10, v); } + @$pb.TagNumber(11) + $core.bool hasError() => $_has(10); + @$pb.TagNumber(11) + void clearError() => $_clearField(11); +} + +class SaveFlowRequest extends $pb.GeneratedMessage { + factory SaveFlowRequest({ + $core.String? name, + $core.List<$core.int>? flowYaml, + $core.bool? overwrite, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (flowYaml != null) { + $result.flowYaml = flowYaml; + } + if (overwrite != null) { + $result.overwrite = overwrite; + } + return $result; + } + SaveFlowRequest._() : super(); + factory SaveFlowRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SaveFlowRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SaveFlowRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'flowYaml', $pb.PbFieldType.OY) + ..aOB(3, _omitFieldNames ? '' : 'overwrite') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SaveFlowRequest clone() => SaveFlowRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SaveFlowRequest copyWith(void Function(SaveFlowRequest) updates) => super.copyWith((message) => updates(message as SaveFlowRequest)) as SaveFlowRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SaveFlowRequest create() => SaveFlowRequest._(); + SaveFlowRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SaveFlowRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SaveFlowRequest? _defaultInstance; + + /// Flow name (used as the file name with .yaml extension). + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + /// Flow YAML content. + @$pb.TagNumber(2) + $core.List<$core.int> get flowYaml => $_getN(1); + @$pb.TagNumber(2) + set flowYaml($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasFlowYaml() => $_has(1); + @$pb.TagNumber(2) + void clearFlowYaml() => $_clearField(2); + + /// If false and a flow with this name exists, return AlreadyExists. + @$pb.TagNumber(3) + $core.bool get overwrite => $_getBF(2); + @$pb.TagNumber(3) + set overwrite($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasOverwrite() => $_has(2); + @$pb.TagNumber(3) + void clearOverwrite() => $_clearField(3); +} + +class SaveFlowResponse extends $pb.GeneratedMessage { + factory SaveFlowResponse({ + $core.String? name, + $core.bool? created, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (created != null) { + $result.created = created; + } + return $result; + } + SaveFlowResponse._() : super(); + factory SaveFlowResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SaveFlowResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SaveFlowResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOB(2, _omitFieldNames ? '' : 'created') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SaveFlowResponse clone() => SaveFlowResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SaveFlowResponse copyWith(void Function(SaveFlowResponse) updates) => super.copyWith((message) => updates(message as SaveFlowResponse)) as SaveFlowResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SaveFlowResponse create() => SaveFlowResponse._(); + SaveFlowResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SaveFlowResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SaveFlowResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.bool get created => $_getBF(1); + @$pb.TagNumber(2) + set created($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasCreated() => $_has(1); + @$pb.TagNumber(2) + void clearCreated() => $_clearField(2); +} + +class DeleteFlowRequest extends $pb.GeneratedMessage { + factory DeleteFlowRequest({ + $core.String? name, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + return $result; + } + DeleteFlowRequest._() : super(); + factory DeleteFlowRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DeleteFlowRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DeleteFlowRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteFlowRequest clone() => DeleteFlowRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteFlowRequest copyWith(void Function(DeleteFlowRequest) updates) => super.copyWith((message) => updates(message as DeleteFlowRequest)) as DeleteFlowRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DeleteFlowRequest create() => DeleteFlowRequest._(); + DeleteFlowRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DeleteFlowRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DeleteFlowRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); +} + +class DeleteFlowResponse extends $pb.GeneratedMessage { + factory DeleteFlowResponse({ + $core.String? name, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + return $result; + } + DeleteFlowResponse._() : super(); + factory DeleteFlowResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DeleteFlowResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DeleteFlowResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteFlowResponse clone() => DeleteFlowResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteFlowResponse copyWith(void Function(DeleteFlowResponse) updates) => super.copyWith((message) => updates(message as DeleteFlowResponse)) as DeleteFlowResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DeleteFlowResponse create() => DeleteFlowResponse._(); + DeleteFlowResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DeleteFlowResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DeleteFlowResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); +} + +class FlowList extends $pb.GeneratedMessage { + factory FlowList({ + $core.Iterable? flows, + }) { + final $result = create(); + if (flows != null) { + $result.flows.addAll(flows); + } + return $result; + } + FlowList._() : super(); + factory FlowList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FlowList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FlowList', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'flows', $pb.PbFieldType.PM, subBuilder: FlowSummary.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FlowList clone() => FlowList()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FlowList copyWith(void Function(FlowList) updates) => super.copyWith((message) => updates(message as FlowList)) as FlowList; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FlowList create() => FlowList._(); + FlowList createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FlowList getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FlowList? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get flows => $_getList(0); +} + +class FlowSummary extends $pb.GeneratedMessage { + factory FlowSummary({ + $core.String? name, + $core.String? path, + $fixnum.Int64? sizeBytes, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (path != null) { + $result.path = path; + } + if (sizeBytes != null) { + $result.sizeBytes = sizeBytes; + } + return $result; + } + FlowSummary._() : super(); + factory FlowSummary.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FlowSummary.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FlowSummary', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'path') + ..aInt64(3, _omitFieldNames ? '' : 'sizeBytes') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FlowSummary clone() => FlowSummary()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FlowSummary copyWith(void Function(FlowSummary) updates) => super.copyWith((message) => updates(message as FlowSummary)) as FlowSummary; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FlowSummary create() => FlowSummary._(); + FlowSummary createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FlowSummary getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FlowSummary? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + /// Path on disk relative to the saved-flows directory. + @$pb.TagNumber(2) + $core.String get path => $_getSZ(1); + @$pb.TagNumber(2) + set path($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPath() => $_has(1); + @$pb.TagNumber(2) + void clearPath() => $_clearField(2); + + /// Bytes on disk. + @$pb.TagNumber(3) + $fixnum.Int64 get sizeBytes => $_getI64(2); + @$pb.TagNumber(3) + set sizeBytes($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasSizeBytes() => $_has(2); + @$pb.TagNumber(3) + void clearSizeBytes() => $_clearField(3); +} + +class RunSavedFlowRequest extends $pb.GeneratedMessage { + factory RunSavedFlowRequest({ + $core.String? name, + $core.Iterable<$core.MapEntry<$core.String, $4.Payload>>? inputs, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (inputs != null) { + $result.inputs.addEntries(inputs); + } + return $result; + } + RunSavedFlowRequest._() : super(); + factory RunSavedFlowRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RunSavedFlowRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RunSavedFlowRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..m<$core.String, $4.Payload>(2, _omitFieldNames ? '' : 'inputs', entryClassName: 'RunSavedFlowRequest.InputsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $4.Payload.create, valueDefaultOrMaker: $4.Payload.getDefault, packageName: const $pb.PackageName('fai.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunSavedFlowRequest clone() => RunSavedFlowRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunSavedFlowRequest copyWith(void Function(RunSavedFlowRequest) updates) => super.copyWith((message) => updates(message as RunSavedFlowRequest)) as RunSavedFlowRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RunSavedFlowRequest create() => RunSavedFlowRequest._(); + RunSavedFlowRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RunSavedFlowRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RunSavedFlowRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $4.Payload> get inputs => $_getMap(1); +} + +class SearchStoreRequest extends $pb.GeneratedMessage { + factory SearchStoreRequest({ + $core.String? query, + $core.String? category, + $core.String? tag, + $core.String? status, + $core.int? limit, + }) { + final $result = create(); + if (query != null) { + $result.query = query; + } + if (category != null) { + $result.category = category; + } + if (tag != null) { + $result.tag = tag; + } + if (status != null) { + $result.status = status; + } + if (limit != null) { + $result.limit = limit; + } + return $result; + } + SearchStoreRequest._() : super(); + factory SearchStoreRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SearchStoreRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SearchStoreRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'query') + ..aOS(2, _omitFieldNames ? '' : 'category') + ..aOS(3, _omitFieldNames ? '' : 'tag') + ..aOS(4, _omitFieldNames ? '' : 'status') + ..a<$core.int>(5, _omitFieldNames ? '' : 'limit', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SearchStoreRequest clone() => SearchStoreRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SearchStoreRequest copyWith(void Function(SearchStoreRequest) updates) => super.copyWith((message) => updates(message as SearchStoreRequest)) as SearchStoreRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SearchStoreRequest create() => SearchStoreRequest._(); + SearchStoreRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SearchStoreRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SearchStoreRequest? _defaultInstance; + + /// Free-text search; matches name, tagline, description, category, tags. + @$pb.TagNumber(1) + $core.String get query => $_getSZ(0); + @$pb.TagNumber(1) + set query($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasQuery() => $_has(0); + @$pb.TagNumber(1) + void clearQuery() => $_clearField(1); + + /// Optional category filter. + @$pb.TagNumber(2) + $core.String get category => $_getSZ(1); + @$pb.TagNumber(2) + set category($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasCategory() => $_has(1); + @$pb.TagNumber(2) + void clearCategory() => $_clearField(2); + + /// Optional tag filter. + @$pb.TagNumber(3) + $core.String get tag => $_getSZ(2); + @$pb.TagNumber(3) + set tag($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasTag() => $_has(2); + @$pb.TagNumber(3) + void clearTag() => $_clearField(3); + + /// Optional status filter: "published", "alpha", or "planned". + @$pb.TagNumber(4) + $core.String get status => $_getSZ(3); + @$pb.TagNumber(4) + set status($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasStatus() => $_has(3); + @$pb.TagNumber(4) + void clearStatus() => $_clearField(4); + + /// Maximum results; defaults to 50 when 0. + @$pb.TagNumber(5) + $core.int get limit => $_getIZ(4); + @$pb.TagNumber(5) + set limit($core.int v) { $_setSignedInt32(4, v); } + @$pb.TagNumber(5) + $core.bool hasLimit() => $_has(4); + @$pb.TagNumber(5) + void clearLimit() => $_clearField(5); +} + +class StoreSearchResponse extends $pb.GeneratedMessage { + factory StoreSearchResponse({ + $core.Iterable? entries, + }) { + final $result = create(); + if (entries != null) { + $result.entries.addAll(entries); + } + return $result; + } + StoreSearchResponse._() : super(); + factory StoreSearchResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StoreSearchResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StoreSearchResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'entries', $pb.PbFieldType.PM, subBuilder: StoreEntry.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StoreSearchResponse clone() => StoreSearchResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StoreSearchResponse copyWith(void Function(StoreSearchResponse) updates) => super.copyWith((message) => updates(message as StoreSearchResponse)) as StoreSearchResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StoreSearchResponse create() => StoreSearchResponse._(); + StoreSearchResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StoreSearchResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StoreSearchResponse? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get entries => $_getList(0); +} + +class InstallModuleRequest extends $pb.GeneratedMessage { + factory InstallModuleRequest({ + $core.String? source, + $core.String? expectedSha256, + }) { + final $result = create(); + if (source != null) { + $result.source = source; + } + if (expectedSha256 != null) { + $result.expectedSha256 = expectedSha256; + } + return $result; + } + InstallModuleRequest._() : super(); + factory InstallModuleRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory InstallModuleRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'InstallModuleRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'source') + ..aOS(2, _omitFieldNames ? '' : 'expectedSha256') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallModuleRequest clone() => InstallModuleRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallModuleRequest copyWith(void Function(InstallModuleRequest) updates) => super.copyWith((message) => updates(message as InstallModuleRequest)) as InstallModuleRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static InstallModuleRequest create() => InstallModuleRequest._(); + InstallModuleRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static InstallModuleRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static InstallModuleRequest? _defaultInstance; + + /// Local path or http(s) URL of the .fai bundle. + @$pb.TagNumber(1) + $core.String get source => $_getSZ(0); + @$pb.TagNumber(1) + set source($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSource() => $_has(0); + @$pb.TagNumber(1) + void clearSource() => $_clearField(1); + + /// Optional expected SHA-256 hex string for verification. + @$pb.TagNumber(2) + $core.String get expectedSha256 => $_getSZ(1); + @$pb.TagNumber(2) + set expectedSha256($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasExpectedSha256() => $_has(1); + @$pb.TagNumber(2) + void clearExpectedSha256() => $_clearField(2); +} + +class InstallModuleResponse extends $pb.GeneratedMessage { + factory InstallModuleResponse({ + $core.String? name, + $core.String? version, + $core.int? capabilityCount, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (version != null) { + $result.version = version; + } + if (capabilityCount != null) { + $result.capabilityCount = capabilityCount; + } + return $result; + } + InstallModuleResponse._() : super(); + factory InstallModuleResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory InstallModuleResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'InstallModuleResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'version') + ..a<$core.int>(3, _omitFieldNames ? '' : 'capabilityCount', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallModuleResponse clone() => InstallModuleResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InstallModuleResponse copyWith(void Function(InstallModuleResponse) updates) => super.copyWith((message) => updates(message as InstallModuleResponse)) as InstallModuleResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static InstallModuleResponse create() => InstallModuleResponse._(); + InstallModuleResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static InstallModuleResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static InstallModuleResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get version => $_getSZ(1); + @$pb.TagNumber(2) + set version($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasVersion() => $_has(1); + @$pb.TagNumber(2) + void clearVersion() => $_clearField(2); + + /// Number of capabilities the installed module provides. + @$pb.TagNumber(3) + $core.int get capabilityCount => $_getIZ(2); + @$pb.TagNumber(3) + set capabilityCount($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasCapabilityCount() => $_has(2); + @$pb.TagNumber(3) + void clearCapabilityCount() => $_clearField(3); +} + +class ListApprovalsRequest extends $pb.GeneratedMessage { + factory ListApprovalsRequest({ + $core.Iterable<$core.String>? statuses, + $core.int? limit, + }) { + final $result = create(); + if (statuses != null) { + $result.statuses.addAll(statuses); + } + if (limit != null) { + $result.limit = limit; + } + return $result; + } + ListApprovalsRequest._() : super(); + factory ListApprovalsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListApprovalsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListApprovalsRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'statuses') + ..a<$core.int>(2, _omitFieldNames ? '' : 'limit', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListApprovalsRequest clone() => ListApprovalsRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListApprovalsRequest copyWith(void Function(ListApprovalsRequest) updates) => super.copyWith((message) => updates(message as ListApprovalsRequest)) as ListApprovalsRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListApprovalsRequest create() => ListApprovalsRequest._(); + ListApprovalsRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListApprovalsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListApprovalsRequest? _defaultInstance; + + /// Filter by status. Empty = all. Allowed wire values: + /// "pending", "approved", "rejected", "expired". + @$pb.TagNumber(1) + $pb.PbList<$core.String> get statuses => $_getList(0); + + /// Maximum rows; defaults to 100 when 0. + @$pb.TagNumber(2) + $core.int get limit => $_getIZ(1); + @$pb.TagNumber(2) + set limit($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasLimit() => $_has(1); + @$pb.TagNumber(2) + void clearLimit() => $_clearField(2); +} + +class ApprovalList extends $pb.GeneratedMessage { + factory ApprovalList({ + $core.Iterable? entries, + }) { + final $result = create(); + if (entries != null) { + $result.entries.addAll(entries); + } + return $result; + } + ApprovalList._() : super(); + factory ApprovalList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ApprovalList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApprovalList', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'entries', $pb.PbFieldType.PM, subBuilder: PendingApprovalEntry.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ApprovalList clone() => ApprovalList()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ApprovalList copyWith(void Function(ApprovalList) updates) => super.copyWith((message) => updates(message as ApprovalList)) as ApprovalList; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ApprovalList create() => ApprovalList._(); + ApprovalList createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ApprovalList getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ApprovalList? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbList get entries => $_getList(0); +} + +class PendingApprovalEntry extends $pb.GeneratedMessage { + factory PendingApprovalEntry({ + $core.String? approvalId, + $core.String? flowExecution, + $core.String? flowName, + $core.String? stepId, + $core.String? prompt, + $core.String? payloadPreview, + $core.String? createdAt, + $core.String? expiresAt, + $core.String? status, + $core.String? decidedAt, + $core.String? decidedBy, + $core.String? reason, + }) { + final $result = create(); + if (approvalId != null) { + $result.approvalId = approvalId; + } + if (flowExecution != null) { + $result.flowExecution = flowExecution; + } + if (flowName != null) { + $result.flowName = flowName; + } + if (stepId != null) { + $result.stepId = stepId; + } + if (prompt != null) { + $result.prompt = prompt; + } + if (payloadPreview != null) { + $result.payloadPreview = payloadPreview; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (expiresAt != null) { + $result.expiresAt = expiresAt; + } + if (status != null) { + $result.status = status; + } + if (decidedAt != null) { + $result.decidedAt = decidedAt; + } + if (decidedBy != null) { + $result.decidedBy = decidedBy; + } + if (reason != null) { + $result.reason = reason; + } + return $result; + } + PendingApprovalEntry._() : super(); + factory PendingApprovalEntry.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PendingApprovalEntry.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PendingApprovalEntry', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'approvalId') + ..aOS(2, _omitFieldNames ? '' : 'flowExecution') + ..aOS(3, _omitFieldNames ? '' : 'flowName') + ..aOS(4, _omitFieldNames ? '' : 'stepId') + ..aOS(5, _omitFieldNames ? '' : 'prompt') + ..aOS(6, _omitFieldNames ? '' : 'payloadPreview') + ..aOS(7, _omitFieldNames ? '' : 'createdAt') + ..aOS(8, _omitFieldNames ? '' : 'expiresAt') + ..aOS(9, _omitFieldNames ? '' : 'status') + ..aOS(10, _omitFieldNames ? '' : 'decidedAt') + ..aOS(11, _omitFieldNames ? '' : 'decidedBy') + ..aOS(12, _omitFieldNames ? '' : 'reason') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PendingApprovalEntry clone() => PendingApprovalEntry()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PendingApprovalEntry copyWith(void Function(PendingApprovalEntry) updates) => super.copyWith((message) => updates(message as PendingApprovalEntry)) as PendingApprovalEntry; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PendingApprovalEntry create() => PendingApprovalEntry._(); + PendingApprovalEntry createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PendingApprovalEntry getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PendingApprovalEntry? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get approvalId => $_getSZ(0); + @$pb.TagNumber(1) + set approvalId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasApprovalId() => $_has(0); + @$pb.TagNumber(1) + void clearApprovalId() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get flowExecution => $_getSZ(1); + @$pb.TagNumber(2) + set flowExecution($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasFlowExecution() => $_has(1); + @$pb.TagNumber(2) + void clearFlowExecution() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get flowName => $_getSZ(2); + @$pb.TagNumber(3) + set flowName($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasFlowName() => $_has(2); + @$pb.TagNumber(3) + void clearFlowName() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get stepId => $_getSZ(3); + @$pb.TagNumber(4) + set stepId($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasStepId() => $_has(3); + @$pb.TagNumber(4) + void clearStepId() => $_clearField(4); + + @$pb.TagNumber(5) + $core.String get prompt => $_getSZ(4); + @$pb.TagNumber(5) + set prompt($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPrompt() => $_has(4); + @$pb.TagNumber(5) + void clearPrompt() => $_clearField(5); + + /// Truncated string preview of the payload the flow handed to + /// the approval step, for reviewer context. + @$pb.TagNumber(6) + $core.String get payloadPreview => $_getSZ(5); + @$pb.TagNumber(6) + set payloadPreview($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasPayloadPreview() => $_has(5); + @$pb.TagNumber(6) + void clearPayloadPreview() => $_clearField(6); + + @$pb.TagNumber(7) + $core.String get createdAt => $_getSZ(6); + @$pb.TagNumber(7) + set createdAt($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasCreatedAt() => $_has(6); + @$pb.TagNumber(7) + void clearCreatedAt() => $_clearField(7); + + /// Empty when the approval has no timeout. + @$pb.TagNumber(8) + $core.String get expiresAt => $_getSZ(7); + @$pb.TagNumber(8) + set expiresAt($core.String v) { $_setString(7, v); } + @$pb.TagNumber(8) + $core.bool hasExpiresAt() => $_has(7); + @$pb.TagNumber(8) + void clearExpiresAt() => $_clearField(8); + + /// One of "pending", "approved", "rejected", "expired". + @$pb.TagNumber(9) + $core.String get status => $_getSZ(8); + @$pb.TagNumber(9) + set status($core.String v) { $_setString(8, v); } + @$pb.TagNumber(9) + $core.bool hasStatus() => $_has(8); + @$pb.TagNumber(9) + void clearStatus() => $_clearField(9); + + /// Empty until decided. + @$pb.TagNumber(10) + $core.String get decidedAt => $_getSZ(9); + @$pb.TagNumber(10) + set decidedAt($core.String v) { $_setString(9, v); } + @$pb.TagNumber(10) + $core.bool hasDecidedAt() => $_has(9); + @$pb.TagNumber(10) + void clearDecidedAt() => $_clearField(10); + + @$pb.TagNumber(11) + $core.String get decidedBy => $_getSZ(10); + @$pb.TagNumber(11) + set decidedBy($core.String v) { $_setString(10, v); } + @$pb.TagNumber(11) + $core.bool hasDecidedBy() => $_has(10); + @$pb.TagNumber(11) + void clearDecidedBy() => $_clearField(11); + + @$pb.TagNumber(12) + $core.String get reason => $_getSZ(11); + @$pb.TagNumber(12) + set reason($core.String v) { $_setString(11, v); } + @$pb.TagNumber(12) + $core.bool hasReason() => $_has(11); + @$pb.TagNumber(12) + void clearReason() => $_clearField(12); +} + +class DecideApprovalRequest extends $pb.GeneratedMessage { + factory DecideApprovalRequest({ + $core.String? approvalId, + DecideApprovalRequest_Decision? decision, + $core.String? reviewer, + $core.String? reason, + }) { + final $result = create(); + if (approvalId != null) { + $result.approvalId = approvalId; + } + if (decision != null) { + $result.decision = decision; + } + if (reviewer != null) { + $result.reviewer = reviewer; + } + if (reason != null) { + $result.reason = reason; + } + return $result; + } + DecideApprovalRequest._() : super(); + factory DecideApprovalRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DecideApprovalRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DecideApprovalRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'approvalId') + ..e(2, _omitFieldNames ? '' : 'decision', $pb.PbFieldType.OE, defaultOrMaker: DecideApprovalRequest_Decision.DECISION_UNSPECIFIED, valueOf: DecideApprovalRequest_Decision.valueOf, enumValues: DecideApprovalRequest_Decision.values) + ..aOS(3, _omitFieldNames ? '' : 'reviewer') + ..aOS(4, _omitFieldNames ? '' : 'reason') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DecideApprovalRequest clone() => DecideApprovalRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DecideApprovalRequest copyWith(void Function(DecideApprovalRequest) updates) => super.copyWith((message) => updates(message as DecideApprovalRequest)) as DecideApprovalRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DecideApprovalRequest create() => DecideApprovalRequest._(); + DecideApprovalRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DecideApprovalRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DecideApprovalRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get approvalId => $_getSZ(0); + @$pb.TagNumber(1) + set approvalId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasApprovalId() => $_has(0); + @$pb.TagNumber(1) + void clearApprovalId() => $_clearField(1); + + @$pb.TagNumber(2) + DecideApprovalRequest_Decision get decision => $_getN(1); + @$pb.TagNumber(2) + set decision(DecideApprovalRequest_Decision v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasDecision() => $_has(1); + @$pb.TagNumber(2) + void clearDecision() => $_clearField(2); + + /// Reviewer attribution, recorded in the audit trail. Required. + @$pb.TagNumber(3) + $core.String get reviewer => $_getSZ(2); + @$pb.TagNumber(3) + set reviewer($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasReviewer() => $_has(2); + @$pb.TagNumber(3) + void clearReviewer() => $_clearField(3); + + /// Free-form reason. Required for REJECT, ignored for APPROVE. + @$pb.TagNumber(4) + $core.String get reason => $_getSZ(3); + @$pb.TagNumber(4) + set reason($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasReason() => $_has(3); + @$pb.TagNumber(4) + void clearReason() => $_clearField(4); +} + +class DecideApprovalResponse extends $pb.GeneratedMessage { + factory DecideApprovalResponse({ + $core.String? approvalId, + $core.String? status, + }) { + final $result = create(); + if (approvalId != null) { + $result.approvalId = approvalId; + } + if (status != null) { + $result.status = status; + } + return $result; + } + DecideApprovalResponse._() : super(); + factory DecideApprovalResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DecideApprovalResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DecideApprovalResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'approvalId') + ..aOS(2, _omitFieldNames ? '' : 'status') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DecideApprovalResponse clone() => DecideApprovalResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DecideApprovalResponse copyWith(void Function(DecideApprovalResponse) updates) => super.copyWith((message) => updates(message as DecideApprovalResponse)) as DecideApprovalResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DecideApprovalResponse create() => DecideApprovalResponse._(); + DecideApprovalResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DecideApprovalResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DecideApprovalResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get approvalId => $_getSZ(0); + @$pb.TagNumber(1) + set approvalId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasApprovalId() => $_has(0); + @$pb.TagNumber(1) + void clearApprovalId() => $_clearField(1); + + /// The new status: "approved" or "rejected". + @$pb.TagNumber(2) + $core.String get status => $_getSZ(1); + @$pb.TagNumber(2) + set status($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasStatus() => $_has(1); + @$pb.TagNumber(2) + void clearStatus() => $_clearField(2); +} + +class StoreEntry extends $pb.GeneratedMessage { + factory StoreEntry({ + $core.String? name, + $core.String? taglineEn, + $core.String? taglineDe, + $core.String? descriptionEn, + $core.String? descriptionDe, + $core.String? category, + $core.Iterable<$core.String>? tags, + $core.Iterable<$core.String>? requiresCapabilities, + $core.Iterable<$core.String>? requiresServices, + $core.String? license, + $core.String? repository, + $core.String? bestVersion, + $core.String? status, + $core.bool? installed, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (taglineEn != null) { + $result.taglineEn = taglineEn; + } + if (taglineDe != null) { + $result.taglineDe = taglineDe; + } + if (descriptionEn != null) { + $result.descriptionEn = descriptionEn; + } + if (descriptionDe != null) { + $result.descriptionDe = descriptionDe; + } + if (category != null) { + $result.category = category; + } + if (tags != null) { + $result.tags.addAll(tags); + } + if (requiresCapabilities != null) { + $result.requiresCapabilities.addAll(requiresCapabilities); + } + if (requiresServices != null) { + $result.requiresServices.addAll(requiresServices); + } + if (license != null) { + $result.license = license; + } + if (repository != null) { + $result.repository = repository; + } + if (bestVersion != null) { + $result.bestVersion = bestVersion; + } + if (status != null) { + $result.status = status; + } + if (installed != null) { + $result.installed = installed; + } + return $result; + } + StoreEntry._() : super(); + factory StoreEntry.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StoreEntry.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StoreEntry', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'taglineEn') + ..aOS(3, _omitFieldNames ? '' : 'taglineDe') + ..aOS(4, _omitFieldNames ? '' : 'descriptionEn') + ..aOS(5, _omitFieldNames ? '' : 'descriptionDe') + ..aOS(6, _omitFieldNames ? '' : 'category') + ..pPS(7, _omitFieldNames ? '' : 'tags') + ..pPS(8, _omitFieldNames ? '' : 'requiresCapabilities') + ..pPS(9, _omitFieldNames ? '' : 'requiresServices') + ..aOS(10, _omitFieldNames ? '' : 'license') + ..aOS(11, _omitFieldNames ? '' : 'repository') + ..aOS(12, _omitFieldNames ? '' : 'bestVersion') + ..aOS(13, _omitFieldNames ? '' : 'status') + ..aOB(14, _omitFieldNames ? '' : 'installed') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StoreEntry clone() => StoreEntry()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StoreEntry copyWith(void Function(StoreEntry) updates) => super.copyWith((message) => updates(message as StoreEntry)) as StoreEntry; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StoreEntry create() => StoreEntry._(); + StoreEntry createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StoreEntry getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StoreEntry? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get taglineEn => $_getSZ(1); + @$pb.TagNumber(2) + set taglineEn($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasTaglineEn() => $_has(1); + @$pb.TagNumber(2) + void clearTaglineEn() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get taglineDe => $_getSZ(2); + @$pb.TagNumber(3) + set taglineDe($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasTaglineDe() => $_has(2); + @$pb.TagNumber(3) + void clearTaglineDe() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get descriptionEn => $_getSZ(3); + @$pb.TagNumber(4) + set descriptionEn($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasDescriptionEn() => $_has(3); + @$pb.TagNumber(4) + void clearDescriptionEn() => $_clearField(4); + + @$pb.TagNumber(5) + $core.String get descriptionDe => $_getSZ(4); + @$pb.TagNumber(5) + set descriptionDe($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasDescriptionDe() => $_has(4); + @$pb.TagNumber(5) + void clearDescriptionDe() => $_clearField(5); + + @$pb.TagNumber(6) + $core.String get category => $_getSZ(5); + @$pb.TagNumber(6) + set category($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasCategory() => $_has(5); + @$pb.TagNumber(6) + void clearCategory() => $_clearField(6); + + @$pb.TagNumber(7) + $pb.PbList<$core.String> get tags => $_getList(6); + + @$pb.TagNumber(8) + $pb.PbList<$core.String> get requiresCapabilities => $_getList(7); + + @$pb.TagNumber(9) + $pb.PbList<$core.String> get requiresServices => $_getList(8); + + @$pb.TagNumber(10) + $core.String get license => $_getSZ(9); + @$pb.TagNumber(10) + set license($core.String v) { $_setString(9, v); } + @$pb.TagNumber(10) + $core.bool hasLicense() => $_has(9); + @$pb.TagNumber(10) + void clearLicense() => $_clearField(10); + + @$pb.TagNumber(11) + $core.String get repository => $_getSZ(10); + @$pb.TagNumber(11) + set repository($core.String v) { $_setString(10, v); } + @$pb.TagNumber(11) + $core.bool hasRepository() => $_has(10); + @$pb.TagNumber(11) + void clearRepository() => $_clearField(11); + + @$pb.TagNumber(12) + $core.String get bestVersion => $_getSZ(11); + @$pb.TagNumber(12) + set bestVersion($core.String v) { $_setString(11, v); } + @$pb.TagNumber(12) + $core.bool hasBestVersion() => $_has(11); + @$pb.TagNumber(12) + void clearBestVersion() => $_clearField(12); + + /// Status of best_version: "published", "alpha", "planned", or empty. + @$pb.TagNumber(13) + $core.String get status => $_getSZ(12); + @$pb.TagNumber(13) + set status($core.String v) { $_setString(12, v); } + @$pb.TagNumber(13) + $core.bool hasStatus() => $_has(12); + @$pb.TagNumber(13) + void clearStatus() => $_clearField(13); + + @$pb.TagNumber(14) + $core.bool get installed => $_getBF(13); + @$pb.TagNumber(14) + set installed($core.bool v) { $_setBool(13, v); } + @$pb.TagNumber(14) + $core.bool hasInstalled() => $_has(13); + @$pb.TagNumber(14) + void clearInstalled() => $_clearField(14); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/fai/v1/hub.pbenum.dart b/lib/src/generated/fai/v1/hub.pbenum.dart new file mode 100644 index 0000000..ac79243 --- /dev/null +++ b/lib/src/generated/fai/v1/hub.pbenum.dart @@ -0,0 +1,51 @@ +// +// Generated code. Do not modify. +// source: fai/v1/hub.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class HealthStatus_State extends $pb.ProtobufEnum { + static const HealthStatus_State UNKNOWN = HealthStatus_State._(0, _omitEnumNames ? '' : 'UNKNOWN'); + static const HealthStatus_State SERVING = HealthStatus_State._(1, _omitEnumNames ? '' : 'SERVING'); + static const HealthStatus_State NOT_SERVING = HealthStatus_State._(2, _omitEnumNames ? '' : 'NOT_SERVING'); + + static const $core.List values = [ + UNKNOWN, + SERVING, + NOT_SERVING, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2); + static HealthStatus_State? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const HealthStatus_State._(super.v, super.n); +} + +class DecideApprovalRequest_Decision extends $pb.ProtobufEnum { + static const DecideApprovalRequest_Decision DECISION_UNSPECIFIED = DecideApprovalRequest_Decision._(0, _omitEnumNames ? '' : 'DECISION_UNSPECIFIED'); + static const DecideApprovalRequest_Decision APPROVE = DecideApprovalRequest_Decision._(1, _omitEnumNames ? '' : 'APPROVE'); + static const DecideApprovalRequest_Decision REJECT = DecideApprovalRequest_Decision._(2, _omitEnumNames ? '' : 'REJECT'); + + static const $core.List values = [ + DECISION_UNSPECIFIED, + APPROVE, + REJECT, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2); + static DecideApprovalRequest_Decision? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const DecideApprovalRequest_Decision._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/generated/fai/v1/hub.pbgrpc.dart b/lib/src/generated/fai/v1/hub.pbgrpc.dart new file mode 100644 index 0000000..9727f7b --- /dev/null +++ b/lib/src/generated/fai/v1/hub.pbgrpc.dart @@ -0,0 +1,392 @@ +// +// Generated code. Do not modify. +// source: fai/v1/hub.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../google/protobuf/empty.pb.dart' as $1; +import 'hub.pb.dart' as $0; + +export 'hub.pb.dart'; + +/// The Hub service is what CLI clients, web UIs, or other tools talk to. +@$pb.GrpcServiceName('fai.v1.Hub') +class HubClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = ''; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; + + static final _$submit = $grpc.ClientMethod<$0.SubmitRequest, $0.SubmitResponse>( + '/fai.v1.Hub/Submit', + ($0.SubmitRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.SubmitResponse.fromBuffer(value)); + static final _$listModules = $grpc.ClientMethod<$1.Empty, $0.ModuleList>( + '/fai.v1.Hub/ListModules', + ($1.Empty value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ModuleList.fromBuffer(value)); + static final _$health = $grpc.ClientMethod<$1.Empty, $0.HealthStatus>( + '/fai.v1.Hub/Health', + ($1.Empty value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.HealthStatus.fromBuffer(value)); + + HubClient(super.channel, {super.options, super.interceptors}); + + /// Submit a flow for execution. + $grpc.ResponseFuture<$0.SubmitResponse> submit($0.SubmitRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$submit, request, options: options); + } + + /// List modules known to this hub. + $grpc.ResponseFuture<$0.ModuleList> listModules($1.Empty request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$listModules, request, options: options); + } + + /// Liveness / readiness probe. + $grpc.ResponseFuture<$0.HealthStatus> health($1.Empty request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$health, request, options: options); + } +} + +@$pb.GrpcServiceName('fai.v1.Hub') +abstract class HubServiceBase extends $grpc.Service { + $core.String get $name => 'fai.v1.Hub'; + + HubServiceBase() { + $addMethod($grpc.ServiceMethod<$0.SubmitRequest, $0.SubmitResponse>( + 'Submit', + submit_Pre, + false, + false, + ($core.List<$core.int> value) => $0.SubmitRequest.fromBuffer(value), + ($0.SubmitResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.Empty, $0.ModuleList>( + 'ListModules', + listModules_Pre, + false, + false, + ($core.List<$core.int> value) => $1.Empty.fromBuffer(value), + ($0.ModuleList value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.Empty, $0.HealthStatus>( + 'Health', + health_Pre, + false, + false, + ($core.List<$core.int> value) => $1.Empty.fromBuffer(value), + ($0.HealthStatus value) => value.writeToBuffer())); + } + + $async.Future<$0.SubmitResponse> submit_Pre($grpc.ServiceCall $call, $async.Future<$0.SubmitRequest> $request) async { + return submit($call, await $request); + } + + $async.Future<$0.ModuleList> listModules_Pre($grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async { + return listModules($call, await $request); + } + + $async.Future<$0.HealthStatus> health_Pre($grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async { + return health($call, await $request); + } + + $async.Future<$0.SubmitResponse> submit($grpc.ServiceCall call, $0.SubmitRequest request); + $async.Future<$0.ModuleList> listModules($grpc.ServiceCall call, $1.Empty request); + $async.Future<$0.HealthStatus> health($grpc.ServiceCall call, $1.Empty request); +} +/// HubAdmin exposes administrative operations on the hub: inspect +/// installed modules, query the event log, manage saved flows. +/// +/// Calls to HubAdmin from external clients are unauthenticated in +/// Phase 0/0.5 (localhost trust). Phase 1+ adds bearer-token / mTLS +/// auth on this surface. Calls from within modules require the +/// `hub:` permission scope (read / install / admin). +@$pb.GrpcServiceName('fai.v1.HubAdmin') +class HubAdminClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = ''; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; + + static final _$listCapabilities = $grpc.ClientMethod<$1.Empty, $0.CapabilityList>( + '/fai.v1.HubAdmin/ListCapabilities', + ($1.Empty value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.CapabilityList.fromBuffer(value)); + static final _$moduleInfo = $grpc.ClientMethod<$0.ModuleInfoRequest, $0.ModuleInfoResponse>( + '/fai.v1.HubAdmin/ModuleInfo', + ($0.ModuleInfoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ModuleInfoResponse.fromBuffer(value)); + static final _$checkPermission = $grpc.ClientMethod<$0.CheckPermissionRequest, $0.CheckPermissionResponse>( + '/fai.v1.HubAdmin/CheckPermission', + ($0.CheckPermissionRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.CheckPermissionResponse.fromBuffer(value)); + static final _$eventLog = $grpc.ClientMethod<$0.EventLogRequest, $0.EventLogResponse>( + '/fai.v1.HubAdmin/EventLog', + ($0.EventLogRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.EventLogResponse.fromBuffer(value)); + static final _$saveFlow = $grpc.ClientMethod<$0.SaveFlowRequest, $0.SaveFlowResponse>( + '/fai.v1.HubAdmin/SaveFlow', + ($0.SaveFlowRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.SaveFlowResponse.fromBuffer(value)); + static final _$deleteFlow = $grpc.ClientMethod<$0.DeleteFlowRequest, $0.DeleteFlowResponse>( + '/fai.v1.HubAdmin/DeleteFlow', + ($0.DeleteFlowRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.DeleteFlowResponse.fromBuffer(value)); + static final _$listFlows = $grpc.ClientMethod<$1.Empty, $0.FlowList>( + '/fai.v1.HubAdmin/ListFlows', + ($1.Empty value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.FlowList.fromBuffer(value)); + static final _$runSavedFlow = $grpc.ClientMethod<$0.RunSavedFlowRequest, $0.SubmitResponse>( + '/fai.v1.HubAdmin/RunSavedFlow', + ($0.RunSavedFlowRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.SubmitResponse.fromBuffer(value)); + static final _$searchStore = $grpc.ClientMethod<$0.SearchStoreRequest, $0.StoreSearchResponse>( + '/fai.v1.HubAdmin/SearchStore', + ($0.SearchStoreRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.StoreSearchResponse.fromBuffer(value)); + static final _$installModule = $grpc.ClientMethod<$0.InstallModuleRequest, $0.InstallModuleResponse>( + '/fai.v1.HubAdmin/InstallModule', + ($0.InstallModuleRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.InstallModuleResponse.fromBuffer(value)); + static final _$listApprovals = $grpc.ClientMethod<$0.ListApprovalsRequest, $0.ApprovalList>( + '/fai.v1.HubAdmin/ListApprovals', + ($0.ListApprovalsRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ApprovalList.fromBuffer(value)); + static final _$decideApproval = $grpc.ClientMethod<$0.DecideApprovalRequest, $0.DecideApprovalResponse>( + '/fai.v1.HubAdmin/DecideApproval', + ($0.DecideApprovalRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.DecideApprovalResponse.fromBuffer(value)); + + HubAdminClient(super.channel, {super.options, super.interceptors}); + + /// List capabilities provided by all installed modules. + $grpc.ResponseFuture<$0.CapabilityList> listCapabilities($1.Empty request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$listCapabilities, request, options: options); + } + + /// Return full manifest data for one installed module. + $grpc.ResponseFuture<$0.ModuleInfoResponse> moduleInfo($0.ModuleInfoRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$moduleInfo, request, options: options); + } + + /// Check whether a module is allowed a given permission under the + /// operator's policy. Returns the decision plus the reason. + $grpc.ResponseFuture<$0.CheckPermissionResponse> checkPermission($0.CheckPermissionRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$checkPermission, request, options: options); + } + + /// Read a slice of the event log, newest first. + $grpc.ResponseFuture<$0.EventLogResponse> eventLog($0.EventLogRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$eventLog, request, options: options); + } + + /// Saved-flow management. A saved flow is a YAML file under + /// /flows/.yaml; it can be re-run by name later. + $grpc.ResponseFuture<$0.SaveFlowResponse> saveFlow($0.SaveFlowRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$saveFlow, request, options: options); + } + + $grpc.ResponseFuture<$0.DeleteFlowResponse> deleteFlow($0.DeleteFlowRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$deleteFlow, request, options: options); + } + + $grpc.ResponseFuture<$0.FlowList> listFlows($1.Empty request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$listFlows, request, options: options); + } + + $grpc.ResponseFuture<$0.SubmitResponse> runSavedFlow($0.RunSavedFlowRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$runSavedFlow, request, options: options); + } + + /// Search the bundled (and Phase 1+: federated) store index for + /// modules matching a query. + $grpc.ResponseFuture<$0.StoreSearchResponse> searchStore($0.SearchStoreRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$searchStore, request, options: options); + } + + /// Install a module from a .fai bundle (local path or http(s) URL). + $grpc.ResponseFuture<$0.InstallModuleResponse> installModule($0.InstallModuleRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$installModule, request, options: options); + } + + /// List system.approval@^0 entries, optionally filtered by status. + $grpc.ResponseFuture<$0.ApprovalList> listApprovals($0.ListApprovalsRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$listApprovals, request, options: options); + } + + /// Reviewer decision on a pending approval. `decision` selects + /// approve / reject; `reviewer` and `reason` supply the audit + /// attribution. The flow that posted the approval resumes (or + /// fails) on the next polling tick. + $grpc.ResponseFuture<$0.DecideApprovalResponse> decideApproval($0.DecideApprovalRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$decideApproval, request, options: options); + } +} + +@$pb.GrpcServiceName('fai.v1.HubAdmin') +abstract class HubAdminServiceBase extends $grpc.Service { + $core.String get $name => 'fai.v1.HubAdmin'; + + HubAdminServiceBase() { + $addMethod($grpc.ServiceMethod<$1.Empty, $0.CapabilityList>( + 'ListCapabilities', + listCapabilities_Pre, + false, + false, + ($core.List<$core.int> value) => $1.Empty.fromBuffer(value), + ($0.CapabilityList value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ModuleInfoRequest, $0.ModuleInfoResponse>( + 'ModuleInfo', + moduleInfo_Pre, + false, + false, + ($core.List<$core.int> value) => $0.ModuleInfoRequest.fromBuffer(value), + ($0.ModuleInfoResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.CheckPermissionRequest, $0.CheckPermissionResponse>( + 'CheckPermission', + checkPermission_Pre, + false, + false, + ($core.List<$core.int> value) => $0.CheckPermissionRequest.fromBuffer(value), + ($0.CheckPermissionResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.EventLogRequest, $0.EventLogResponse>( + 'EventLog', + eventLog_Pre, + false, + false, + ($core.List<$core.int> value) => $0.EventLogRequest.fromBuffer(value), + ($0.EventLogResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SaveFlowRequest, $0.SaveFlowResponse>( + 'SaveFlow', + saveFlow_Pre, + false, + false, + ($core.List<$core.int> value) => $0.SaveFlowRequest.fromBuffer(value), + ($0.SaveFlowResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.DeleteFlowRequest, $0.DeleteFlowResponse>( + 'DeleteFlow', + deleteFlow_Pre, + false, + false, + ($core.List<$core.int> value) => $0.DeleteFlowRequest.fromBuffer(value), + ($0.DeleteFlowResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.Empty, $0.FlowList>( + 'ListFlows', + listFlows_Pre, + false, + false, + ($core.List<$core.int> value) => $1.Empty.fromBuffer(value), + ($0.FlowList value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.RunSavedFlowRequest, $0.SubmitResponse>( + 'RunSavedFlow', + runSavedFlow_Pre, + false, + false, + ($core.List<$core.int> value) => $0.RunSavedFlowRequest.fromBuffer(value), + ($0.SubmitResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SearchStoreRequest, $0.StoreSearchResponse>( + 'SearchStore', + searchStore_Pre, + false, + false, + ($core.List<$core.int> value) => $0.SearchStoreRequest.fromBuffer(value), + ($0.StoreSearchResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.InstallModuleRequest, $0.InstallModuleResponse>( + 'InstallModule', + installModule_Pre, + false, + false, + ($core.List<$core.int> value) => $0.InstallModuleRequest.fromBuffer(value), + ($0.InstallModuleResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ListApprovalsRequest, $0.ApprovalList>( + 'ListApprovals', + listApprovals_Pre, + false, + false, + ($core.List<$core.int> value) => $0.ListApprovalsRequest.fromBuffer(value), + ($0.ApprovalList value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.DecideApprovalRequest, $0.DecideApprovalResponse>( + 'DecideApproval', + decideApproval_Pre, + false, + false, + ($core.List<$core.int> value) => $0.DecideApprovalRequest.fromBuffer(value), + ($0.DecideApprovalResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.CapabilityList> listCapabilities_Pre($grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async { + return listCapabilities($call, await $request); + } + + $async.Future<$0.ModuleInfoResponse> moduleInfo_Pre($grpc.ServiceCall $call, $async.Future<$0.ModuleInfoRequest> $request) async { + return moduleInfo($call, await $request); + } + + $async.Future<$0.CheckPermissionResponse> checkPermission_Pre($grpc.ServiceCall $call, $async.Future<$0.CheckPermissionRequest> $request) async { + return checkPermission($call, await $request); + } + + $async.Future<$0.EventLogResponse> eventLog_Pre($grpc.ServiceCall $call, $async.Future<$0.EventLogRequest> $request) async { + return eventLog($call, await $request); + } + + $async.Future<$0.SaveFlowResponse> saveFlow_Pre($grpc.ServiceCall $call, $async.Future<$0.SaveFlowRequest> $request) async { + return saveFlow($call, await $request); + } + + $async.Future<$0.DeleteFlowResponse> deleteFlow_Pre($grpc.ServiceCall $call, $async.Future<$0.DeleteFlowRequest> $request) async { + return deleteFlow($call, await $request); + } + + $async.Future<$0.FlowList> listFlows_Pre($grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async { + return listFlows($call, await $request); + } + + $async.Future<$0.SubmitResponse> runSavedFlow_Pre($grpc.ServiceCall $call, $async.Future<$0.RunSavedFlowRequest> $request) async { + return runSavedFlow($call, await $request); + } + + $async.Future<$0.StoreSearchResponse> searchStore_Pre($grpc.ServiceCall $call, $async.Future<$0.SearchStoreRequest> $request) async { + return searchStore($call, await $request); + } + + $async.Future<$0.InstallModuleResponse> installModule_Pre($grpc.ServiceCall $call, $async.Future<$0.InstallModuleRequest> $request) async { + return installModule($call, await $request); + } + + $async.Future<$0.ApprovalList> listApprovals_Pre($grpc.ServiceCall $call, $async.Future<$0.ListApprovalsRequest> $request) async { + return listApprovals($call, await $request); + } + + $async.Future<$0.DecideApprovalResponse> decideApproval_Pre($grpc.ServiceCall $call, $async.Future<$0.DecideApprovalRequest> $request) async { + return decideApproval($call, await $request); + } + + $async.Future<$0.CapabilityList> listCapabilities($grpc.ServiceCall call, $1.Empty request); + $async.Future<$0.ModuleInfoResponse> moduleInfo($grpc.ServiceCall call, $0.ModuleInfoRequest request); + $async.Future<$0.CheckPermissionResponse> checkPermission($grpc.ServiceCall call, $0.CheckPermissionRequest request); + $async.Future<$0.EventLogResponse> eventLog($grpc.ServiceCall call, $0.EventLogRequest request); + $async.Future<$0.SaveFlowResponse> saveFlow($grpc.ServiceCall call, $0.SaveFlowRequest request); + $async.Future<$0.DeleteFlowResponse> deleteFlow($grpc.ServiceCall call, $0.DeleteFlowRequest request); + $async.Future<$0.FlowList> listFlows($grpc.ServiceCall call, $1.Empty request); + $async.Future<$0.SubmitResponse> runSavedFlow($grpc.ServiceCall call, $0.RunSavedFlowRequest request); + $async.Future<$0.StoreSearchResponse> searchStore($grpc.ServiceCall call, $0.SearchStoreRequest request); + $async.Future<$0.InstallModuleResponse> installModule($grpc.ServiceCall call, $0.InstallModuleRequest request); + $async.Future<$0.ApprovalList> listApprovals($grpc.ServiceCall call, $0.ListApprovalsRequest request); + $async.Future<$0.DecideApprovalResponse> decideApproval($grpc.ServiceCall call, $0.DecideApprovalRequest request); +} diff --git a/lib/src/generated/fai/v1/hub.pbjson.dart b/lib/src/generated/fai/v1/hub.pbjson.dart new file mode 100644 index 0000000..984d83a --- /dev/null +++ b/lib/src/generated/fai/v1/hub.pbjson.dart @@ -0,0 +1,569 @@ +// +// Generated code. Do not modify. +// source: fai/v1/hub.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use submitRequestDescriptor instead') +const SubmitRequest$json = { + '1': 'SubmitRequest', + '2': [ + {'1': 'flow_yaml', '3': 1, '4': 1, '5': 12, '10': 'flowYaml'}, + {'1': 'inputs', '3': 2, '4': 3, '5': 11, '6': '.fai.v1.SubmitRequest.InputsEntry', '10': 'inputs'}, + ], + '3': [SubmitRequest_InputsEntry$json], +}; + +@$core.Deprecated('Use submitRequestDescriptor instead') +const SubmitRequest_InputsEntry$json = { + '1': 'InputsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.fai.v1.Payload', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `SubmitRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List submitRequestDescriptor = $convert.base64Decode( + 'Cg1TdWJtaXRSZXF1ZXN0EhsKCWZsb3dfeWFtbBgBIAEoDFIIZmxvd1lhbWwSOQoGaW5wdXRzGA' + 'IgAygLMiEuZmFpLnYxLlN1Ym1pdFJlcXVlc3QuSW5wdXRzRW50cnlSBmlucHV0cxpKCgtJbnB1' + 'dHNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIlCgV2YWx1ZRgCIAEoCzIPLmZhaS52MS5QYXlsb2' + 'FkUgV2YWx1ZToCOAE='); + +@$core.Deprecated('Use submitResponseDescriptor instead') +const SubmitResponse$json = { + '1': 'SubmitResponse', + '2': [ + {'1': 'invocation_id', '3': 1, '4': 1, '5': 11, '6': '.fai.v1.InvocationId', '10': 'invocationId'}, + {'1': 'outputs', '3': 2, '4': 3, '5': 11, '6': '.fai.v1.SubmitResponse.OutputsEntry', '10': 'outputs'}, + ], + '3': [SubmitResponse_OutputsEntry$json], +}; + +@$core.Deprecated('Use submitResponseDescriptor instead') +const SubmitResponse_OutputsEntry$json = { + '1': 'OutputsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.fai.v1.Payload', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `SubmitResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List submitResponseDescriptor = $convert.base64Decode( + 'Cg5TdWJtaXRSZXNwb25zZRI5Cg1pbnZvY2F0aW9uX2lkGAEgASgLMhQuZmFpLnYxLkludm9jYX' + 'Rpb25JZFIMaW52b2NhdGlvbklkEj0KB291dHB1dHMYAiADKAsyIy5mYWkudjEuU3VibWl0UmVz' + 'cG9uc2UuT3V0cHV0c0VudHJ5UgdvdXRwdXRzGksKDE91dHB1dHNFbnRyeRIQCgNrZXkYASABKA' + 'lSA2tleRIlCgV2YWx1ZRgCIAEoCzIPLmZhaS52MS5QYXlsb2FkUgV2YWx1ZToCOAE='); + +@$core.Deprecated('Use moduleListDescriptor instead') +const ModuleList$json = { + '1': 'ModuleList', + '2': [ + {'1': 'modules', '3': 1, '4': 3, '5': 11, '6': '.fai.v1.ModuleSummary', '10': 'modules'}, + ], +}; + +/// Descriptor for `ModuleList`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List moduleListDescriptor = $convert.base64Decode( + 'CgpNb2R1bGVMaXN0Ei8KB21vZHVsZXMYASADKAsyFS5mYWkudjEuTW9kdWxlU3VtbWFyeVIHbW' + '9kdWxlcw=='); + +@$core.Deprecated('Use moduleSummaryDescriptor instead') +const ModuleSummary$json = { + '1': 'ModuleSummary', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, + {'1': 'provides', '3': 3, '4': 3, '5': 11, '6': '.fai.v1.CapabilityRef', '10': 'provides'}, + ], +}; + +/// Descriptor for `ModuleSummary`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List moduleSummaryDescriptor = $convert.base64Decode( + 'Cg1Nb2R1bGVTdW1tYXJ5EhIKBG5hbWUYASABKAlSBG5hbWUSGAoHdmVyc2lvbhgCIAEoCVIHdm' + 'Vyc2lvbhIxCghwcm92aWRlcxgDIAMoCzIVLmZhaS52MS5DYXBhYmlsaXR5UmVmUghwcm92aWRl' + 'cw=='); + +@$core.Deprecated('Use healthStatusDescriptor instead') +const HealthStatus$json = { + '1': 'HealthStatus', + '2': [ + {'1': 'state', '3': 1, '4': 1, '5': 14, '6': '.fai.v1.HealthStatus.State', '10': 'state'}, + {'1': 'detail', '3': 2, '4': 1, '5': 9, '10': 'detail'}, + ], + '4': [HealthStatus_State$json], +}; + +@$core.Deprecated('Use healthStatusDescriptor instead') +const HealthStatus_State$json = { + '1': 'State', + '2': [ + {'1': 'UNKNOWN', '2': 0}, + {'1': 'SERVING', '2': 1}, + {'1': 'NOT_SERVING', '2': 2}, + ], +}; + +/// Descriptor for `HealthStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List healthStatusDescriptor = $convert.base64Decode( + 'CgxIZWFsdGhTdGF0dXMSMAoFc3RhdGUYASABKA4yGi5mYWkudjEuSGVhbHRoU3RhdHVzLlN0YX' + 'RlUgVzdGF0ZRIWCgZkZXRhaWwYAiABKAlSBmRldGFpbCIyCgVTdGF0ZRILCgdVTktOT1dOEAAS' + 'CwoHU0VSVklORxABEg8KC05PVF9TRVJWSU5HEAI='); + +@$core.Deprecated('Use capabilityListDescriptor instead') +const CapabilityList$json = { + '1': 'CapabilityList', + '2': [ + {'1': 'capabilities', '3': 1, '4': 3, '5': 11, '6': '.fai.v1.CapabilityEntry', '10': 'capabilities'}, + ], +}; + +/// Descriptor for `CapabilityList`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List capabilityListDescriptor = $convert.base64Decode( + 'Cg5DYXBhYmlsaXR5TGlzdBI7CgxjYXBhYmlsaXRpZXMYASADKAsyFy5mYWkudjEuQ2FwYWJpbG' + 'l0eUVudHJ5UgxjYXBhYmlsaXRpZXM='); + +@$core.Deprecated('Use capabilityEntryDescriptor instead') +const CapabilityEntry$json = { + '1': 'CapabilityEntry', + '2': [ + {'1': 'capability', '3': 1, '4': 1, '5': 9, '10': 'capability'}, + {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, + {'1': 'module_name', '3': 3, '4': 1, '5': 9, '10': 'moduleName'}, + {'1': 'module_version', '3': 4, '4': 1, '5': 9, '10': 'moduleVersion'}, + ], +}; + +/// Descriptor for `CapabilityEntry`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List capabilityEntryDescriptor = $convert.base64Decode( + 'Cg9DYXBhYmlsaXR5RW50cnkSHgoKY2FwYWJpbGl0eRgBIAEoCVIKY2FwYWJpbGl0eRIYCgd2ZX' + 'JzaW9uGAIgASgJUgd2ZXJzaW9uEh8KC21vZHVsZV9uYW1lGAMgASgJUgptb2R1bGVOYW1lEiUK' + 'Dm1vZHVsZV92ZXJzaW9uGAQgASgJUg1tb2R1bGVWZXJzaW9u'); + +@$core.Deprecated('Use moduleInfoRequestDescriptor instead') +const ModuleInfoRequest$json = { + '1': 'ModuleInfoRequest', + '2': [ + {'1': 'module_name', '3': 1, '4': 1, '5': 9, '10': 'moduleName'}, + ], +}; + +/// Descriptor for `ModuleInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List moduleInfoRequestDescriptor = $convert.base64Decode( + 'ChFNb2R1bGVJbmZvUmVxdWVzdBIfCgttb2R1bGVfbmFtZRgBIAEoCVIKbW9kdWxlTmFtZQ=='); + +@$core.Deprecated('Use moduleInfoResponseDescriptor instead') +const ModuleInfoResponse$json = { + '1': 'ModuleInfoResponse', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, + {'1': 'provides', '3': 3, '4': 3, '5': 11, '6': '.fai.v1.CapabilityRef', '10': 'provides'}, + {'1': 'permissions', '3': 4, '4': 3, '5': 9, '10': 'permissions'}, + {'1': 'directory', '3': 5, '4': 1, '5': 9, '10': 'directory'}, + ], +}; + +/// Descriptor for `ModuleInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List moduleInfoResponseDescriptor = $convert.base64Decode( + 'ChJNb2R1bGVJbmZvUmVzcG9uc2USEgoEbmFtZRgBIAEoCVIEbmFtZRIYCgd2ZXJzaW9uGAIgAS' + 'gJUgd2ZXJzaW9uEjEKCHByb3ZpZGVzGAMgAygLMhUuZmFpLnYxLkNhcGFiaWxpdHlSZWZSCHBy' + 'b3ZpZGVzEiAKC3Blcm1pc3Npb25zGAQgAygJUgtwZXJtaXNzaW9ucxIcCglkaXJlY3RvcnkYBS' + 'ABKAlSCWRpcmVjdG9yeQ=='); + +@$core.Deprecated('Use checkPermissionRequestDescriptor instead') +const CheckPermissionRequest$json = { + '1': 'CheckPermissionRequest', + '2': [ + {'1': 'module_name', '3': 1, '4': 1, '5': 9, '10': 'moduleName'}, + {'1': 'permission', '3': 2, '4': 1, '5': 9, '10': 'permission'}, + ], +}; + +/// Descriptor for `CheckPermissionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List checkPermissionRequestDescriptor = $convert.base64Decode( + 'ChZDaGVja1Blcm1pc3Npb25SZXF1ZXN0Eh8KC21vZHVsZV9uYW1lGAEgASgJUgptb2R1bGVOYW' + '1lEh4KCnBlcm1pc3Npb24YAiABKAlSCnBlcm1pc3Npb24='); + +@$core.Deprecated('Use checkPermissionResponseDescriptor instead') +const CheckPermissionResponse$json = { + '1': 'CheckPermissionResponse', + '2': [ + {'1': 'allowed', '3': 1, '4': 1, '5': 8, '10': 'allowed'}, + {'1': 'reason', '3': 2, '4': 1, '5': 9, '10': 'reason'}, + ], +}; + +/// Descriptor for `CheckPermissionResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List checkPermissionResponseDescriptor = $convert.base64Decode( + 'ChdDaGVja1Blcm1pc3Npb25SZXNwb25zZRIYCgdhbGxvd2VkGAEgASgIUgdhbGxvd2VkEhYKBn' + 'JlYXNvbhgCIAEoCVIGcmVhc29u'); + +@$core.Deprecated('Use eventLogRequestDescriptor instead') +const EventLogRequest$json = { + '1': 'EventLogRequest', + '2': [ + {'1': 'limit', '3': 1, '4': 1, '5': 5, '10': 'limit'}, + {'1': 'event_types', '3': 2, '4': 3, '5': 9, '10': 'eventTypes'}, + ], +}; + +/// Descriptor for `EventLogRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List eventLogRequestDescriptor = $convert.base64Decode( + 'Cg9FdmVudExvZ1JlcXVlc3QSFAoFbGltaXQYASABKAVSBWxpbWl0Eh8KC2V2ZW50X3R5cGVzGA' + 'IgAygJUgpldmVudFR5cGVz'); + +@$core.Deprecated('Use eventLogResponseDescriptor instead') +const EventLogResponse$json = { + '1': 'EventLogResponse', + '2': [ + {'1': 'events', '3': 1, '4': 3, '5': 11, '6': '.fai.v1.LoggedEvent', '10': 'events'}, + ], +}; + +/// Descriptor for `EventLogResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List eventLogResponseDescriptor = $convert.base64Decode( + 'ChBFdmVudExvZ1Jlc3BvbnNlEisKBmV2ZW50cxgBIAMoCzITLmZhaS52MS5Mb2dnZWRFdmVudF' + 'IGZXZlbnRz'); + +@$core.Deprecated('Use loggedEventDescriptor instead') +const LoggedEvent$json = { + '1': 'LoggedEvent', + '2': [ + {'1': 'event_id', '3': 1, '4': 1, '5': 9, '10': 'eventId'}, + {'1': 'timestamp', '3': 2, '4': 1, '5': 9, '10': 'timestamp'}, + {'1': 'event_type', '3': 3, '4': 1, '5': 9, '10': 'eventType'}, + {'1': 'flow_execution', '3': 4, '4': 1, '5': 9, '10': 'flowExecution'}, + {'1': 'invocation_id', '3': 5, '4': 1, '5': 9, '10': 'invocationId'}, + {'1': 'flow_name', '3': 6, '4': 1, '5': 9, '10': 'flowName'}, + {'1': 'step_id', '3': 7, '4': 1, '5': 9, '10': 'stepId'}, + {'1': 'module_name', '3': 8, '4': 1, '5': 9, '10': 'moduleName'}, + {'1': 'module_version', '3': 9, '4': 1, '5': 9, '10': 'moduleVersion'}, + {'1': 'duration_ms', '3': 10, '4': 1, '5': 3, '10': 'durationMs'}, + {'1': 'error', '3': 11, '4': 1, '5': 9, '10': 'error'}, + ], +}; + +/// Descriptor for `LoggedEvent`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List loggedEventDescriptor = $convert.base64Decode( + 'CgtMb2dnZWRFdmVudBIZCghldmVudF9pZBgBIAEoCVIHZXZlbnRJZBIcCgl0aW1lc3RhbXAYAi' + 'ABKAlSCXRpbWVzdGFtcBIdCgpldmVudF90eXBlGAMgASgJUglldmVudFR5cGUSJQoOZmxvd19l' + 'eGVjdXRpb24YBCABKAlSDWZsb3dFeGVjdXRpb24SIwoNaW52b2NhdGlvbl9pZBgFIAEoCVIMaW' + '52b2NhdGlvbklkEhsKCWZsb3dfbmFtZRgGIAEoCVIIZmxvd05hbWUSFwoHc3RlcF9pZBgHIAEo' + 'CVIGc3RlcElkEh8KC21vZHVsZV9uYW1lGAggASgJUgptb2R1bGVOYW1lEiUKDm1vZHVsZV92ZX' + 'JzaW9uGAkgASgJUg1tb2R1bGVWZXJzaW9uEh8KC2R1cmF0aW9uX21zGAogASgDUgpkdXJhdGlv' + 'bk1zEhQKBWVycm9yGAsgASgJUgVlcnJvcg=='); + +@$core.Deprecated('Use saveFlowRequestDescriptor instead') +const SaveFlowRequest$json = { + '1': 'SaveFlowRequest', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'flow_yaml', '3': 2, '4': 1, '5': 12, '10': 'flowYaml'}, + {'1': 'overwrite', '3': 3, '4': 1, '5': 8, '10': 'overwrite'}, + ], +}; + +/// Descriptor for `SaveFlowRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List saveFlowRequestDescriptor = $convert.base64Decode( + 'Cg9TYXZlRmxvd1JlcXVlc3QSEgoEbmFtZRgBIAEoCVIEbmFtZRIbCglmbG93X3lhbWwYAiABKA' + 'xSCGZsb3dZYW1sEhwKCW92ZXJ3cml0ZRgDIAEoCFIJb3ZlcndyaXRl'); + +@$core.Deprecated('Use saveFlowResponseDescriptor instead') +const SaveFlowResponse$json = { + '1': 'SaveFlowResponse', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'created', '3': 2, '4': 1, '5': 8, '10': 'created'}, + ], +}; + +/// Descriptor for `SaveFlowResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List saveFlowResponseDescriptor = $convert.base64Decode( + 'ChBTYXZlRmxvd1Jlc3BvbnNlEhIKBG5hbWUYASABKAlSBG5hbWUSGAoHY3JlYXRlZBgCIAEoCF' + 'IHY3JlYXRlZA=='); + +@$core.Deprecated('Use deleteFlowRequestDescriptor instead') +const DeleteFlowRequest$json = { + '1': 'DeleteFlowRequest', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `DeleteFlowRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deleteFlowRequestDescriptor = $convert.base64Decode( + 'ChFEZWxldGVGbG93UmVxdWVzdBISCgRuYW1lGAEgASgJUgRuYW1l'); + +@$core.Deprecated('Use deleteFlowResponseDescriptor instead') +const DeleteFlowResponse$json = { + '1': 'DeleteFlowResponse', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `DeleteFlowResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deleteFlowResponseDescriptor = $convert.base64Decode( + 'ChJEZWxldGVGbG93UmVzcG9uc2USEgoEbmFtZRgBIAEoCVIEbmFtZQ=='); + +@$core.Deprecated('Use flowListDescriptor instead') +const FlowList$json = { + '1': 'FlowList', + '2': [ + {'1': 'flows', '3': 1, '4': 3, '5': 11, '6': '.fai.v1.FlowSummary', '10': 'flows'}, + ], +}; + +/// Descriptor for `FlowList`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List flowListDescriptor = $convert.base64Decode( + 'CghGbG93TGlzdBIpCgVmbG93cxgBIAMoCzITLmZhaS52MS5GbG93U3VtbWFyeVIFZmxvd3M='); + +@$core.Deprecated('Use flowSummaryDescriptor instead') +const FlowSummary$json = { + '1': 'FlowSummary', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'path', '3': 2, '4': 1, '5': 9, '10': 'path'}, + {'1': 'size_bytes', '3': 3, '4': 1, '5': 3, '10': 'sizeBytes'}, + ], +}; + +/// Descriptor for `FlowSummary`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List flowSummaryDescriptor = $convert.base64Decode( + 'CgtGbG93U3VtbWFyeRISCgRuYW1lGAEgASgJUgRuYW1lEhIKBHBhdGgYAiABKAlSBHBhdGgSHQ' + 'oKc2l6ZV9ieXRlcxgDIAEoA1IJc2l6ZUJ5dGVz'); + +@$core.Deprecated('Use runSavedFlowRequestDescriptor instead') +const RunSavedFlowRequest$json = { + '1': 'RunSavedFlowRequest', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'inputs', '3': 2, '4': 3, '5': 11, '6': '.fai.v1.RunSavedFlowRequest.InputsEntry', '10': 'inputs'}, + ], + '3': [RunSavedFlowRequest_InputsEntry$json], +}; + +@$core.Deprecated('Use runSavedFlowRequestDescriptor instead') +const RunSavedFlowRequest_InputsEntry$json = { + '1': 'InputsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.fai.v1.Payload', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `RunSavedFlowRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List runSavedFlowRequestDescriptor = $convert.base64Decode( + 'ChNSdW5TYXZlZEZsb3dSZXF1ZXN0EhIKBG5hbWUYASABKAlSBG5hbWUSPwoGaW5wdXRzGAIgAy' + 'gLMicuZmFpLnYxLlJ1blNhdmVkRmxvd1JlcXVlc3QuSW5wdXRzRW50cnlSBmlucHV0cxpKCgtJ' + 'bnB1dHNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIlCgV2YWx1ZRgCIAEoCzIPLmZhaS52MS5QYX' + 'lsb2FkUgV2YWx1ZToCOAE='); + +@$core.Deprecated('Use searchStoreRequestDescriptor instead') +const SearchStoreRequest$json = { + '1': 'SearchStoreRequest', + '2': [ + {'1': 'query', '3': 1, '4': 1, '5': 9, '10': 'query'}, + {'1': 'category', '3': 2, '4': 1, '5': 9, '10': 'category'}, + {'1': 'tag', '3': 3, '4': 1, '5': 9, '10': 'tag'}, + {'1': 'status', '3': 4, '4': 1, '5': 9, '10': 'status'}, + {'1': 'limit', '3': 5, '4': 1, '5': 5, '10': 'limit'}, + ], +}; + +/// Descriptor for `SearchStoreRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List searchStoreRequestDescriptor = $convert.base64Decode( + 'ChJTZWFyY2hTdG9yZVJlcXVlc3QSFAoFcXVlcnkYASABKAlSBXF1ZXJ5EhoKCGNhdGVnb3J5GA' + 'IgASgJUghjYXRlZ29yeRIQCgN0YWcYAyABKAlSA3RhZxIWCgZzdGF0dXMYBCABKAlSBnN0YXR1' + 'cxIUCgVsaW1pdBgFIAEoBVIFbGltaXQ='); + +@$core.Deprecated('Use storeSearchResponseDescriptor instead') +const StoreSearchResponse$json = { + '1': 'StoreSearchResponse', + '2': [ + {'1': 'entries', '3': 1, '4': 3, '5': 11, '6': '.fai.v1.StoreEntry', '10': 'entries'}, + ], +}; + +/// Descriptor for `StoreSearchResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List storeSearchResponseDescriptor = $convert.base64Decode( + 'ChNTdG9yZVNlYXJjaFJlc3BvbnNlEiwKB2VudHJpZXMYASADKAsyEi5mYWkudjEuU3RvcmVFbn' + 'RyeVIHZW50cmllcw=='); + +@$core.Deprecated('Use installModuleRequestDescriptor instead') +const InstallModuleRequest$json = { + '1': 'InstallModuleRequest', + '2': [ + {'1': 'source', '3': 1, '4': 1, '5': 9, '10': 'source'}, + {'1': 'expected_sha256', '3': 2, '4': 1, '5': 9, '10': 'expectedSha256'}, + ], +}; + +/// Descriptor for `InstallModuleRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List installModuleRequestDescriptor = $convert.base64Decode( + 'ChRJbnN0YWxsTW9kdWxlUmVxdWVzdBIWCgZzb3VyY2UYASABKAlSBnNvdXJjZRInCg9leHBlY3' + 'RlZF9zaGEyNTYYAiABKAlSDmV4cGVjdGVkU2hhMjU2'); + +@$core.Deprecated('Use installModuleResponseDescriptor instead') +const InstallModuleResponse$json = { + '1': 'InstallModuleResponse', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, + {'1': 'capability_count', '3': 3, '4': 1, '5': 5, '10': 'capabilityCount'}, + ], +}; + +/// Descriptor for `InstallModuleResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List installModuleResponseDescriptor = $convert.base64Decode( + 'ChVJbnN0YWxsTW9kdWxlUmVzcG9uc2USEgoEbmFtZRgBIAEoCVIEbmFtZRIYCgd2ZXJzaW9uGA' + 'IgASgJUgd2ZXJzaW9uEikKEGNhcGFiaWxpdHlfY291bnQYAyABKAVSD2NhcGFiaWxpdHlDb3Vu' + 'dA=='); + +@$core.Deprecated('Use listApprovalsRequestDescriptor instead') +const ListApprovalsRequest$json = { + '1': 'ListApprovalsRequest', + '2': [ + {'1': 'statuses', '3': 1, '4': 3, '5': 9, '10': 'statuses'}, + {'1': 'limit', '3': 2, '4': 1, '5': 5, '10': 'limit'}, + ], +}; + +/// Descriptor for `ListApprovalsRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listApprovalsRequestDescriptor = $convert.base64Decode( + 'ChRMaXN0QXBwcm92YWxzUmVxdWVzdBIaCghzdGF0dXNlcxgBIAMoCVIIc3RhdHVzZXMSFAoFbG' + 'ltaXQYAiABKAVSBWxpbWl0'); + +@$core.Deprecated('Use approvalListDescriptor instead') +const ApprovalList$json = { + '1': 'ApprovalList', + '2': [ + {'1': 'entries', '3': 1, '4': 3, '5': 11, '6': '.fai.v1.PendingApprovalEntry', '10': 'entries'}, + ], +}; + +/// Descriptor for `ApprovalList`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List approvalListDescriptor = $convert.base64Decode( + 'CgxBcHByb3ZhbExpc3QSNgoHZW50cmllcxgBIAMoCzIcLmZhaS52MS5QZW5kaW5nQXBwcm92YW' + 'xFbnRyeVIHZW50cmllcw=='); + +@$core.Deprecated('Use pendingApprovalEntryDescriptor instead') +const PendingApprovalEntry$json = { + '1': 'PendingApprovalEntry', + '2': [ + {'1': 'approval_id', '3': 1, '4': 1, '5': 9, '10': 'approvalId'}, + {'1': 'flow_execution', '3': 2, '4': 1, '5': 9, '10': 'flowExecution'}, + {'1': 'flow_name', '3': 3, '4': 1, '5': 9, '10': 'flowName'}, + {'1': 'step_id', '3': 4, '4': 1, '5': 9, '10': 'stepId'}, + {'1': 'prompt', '3': 5, '4': 1, '5': 9, '10': 'prompt'}, + {'1': 'payload_preview', '3': 6, '4': 1, '5': 9, '10': 'payloadPreview'}, + {'1': 'created_at', '3': 7, '4': 1, '5': 9, '10': 'createdAt'}, + {'1': 'expires_at', '3': 8, '4': 1, '5': 9, '10': 'expiresAt'}, + {'1': 'status', '3': 9, '4': 1, '5': 9, '10': 'status'}, + {'1': 'decided_at', '3': 10, '4': 1, '5': 9, '10': 'decidedAt'}, + {'1': 'decided_by', '3': 11, '4': 1, '5': 9, '10': 'decidedBy'}, + {'1': 'reason', '3': 12, '4': 1, '5': 9, '10': 'reason'}, + ], +}; + +/// Descriptor for `PendingApprovalEntry`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pendingApprovalEntryDescriptor = $convert.base64Decode( + 'ChRQZW5kaW5nQXBwcm92YWxFbnRyeRIfCgthcHByb3ZhbF9pZBgBIAEoCVIKYXBwcm92YWxJZB' + 'IlCg5mbG93X2V4ZWN1dGlvbhgCIAEoCVINZmxvd0V4ZWN1dGlvbhIbCglmbG93X25hbWUYAyAB' + 'KAlSCGZsb3dOYW1lEhcKB3N0ZXBfaWQYBCABKAlSBnN0ZXBJZBIWCgZwcm9tcHQYBSABKAlSBn' + 'Byb21wdBInCg9wYXlsb2FkX3ByZXZpZXcYBiABKAlSDnBheWxvYWRQcmV2aWV3Eh0KCmNyZWF0' + 'ZWRfYXQYByABKAlSCWNyZWF0ZWRBdBIdCgpleHBpcmVzX2F0GAggASgJUglleHBpcmVzQXQSFg' + 'oGc3RhdHVzGAkgASgJUgZzdGF0dXMSHQoKZGVjaWRlZF9hdBgKIAEoCVIJZGVjaWRlZEF0Eh0K' + 'CmRlY2lkZWRfYnkYCyABKAlSCWRlY2lkZWRCeRIWCgZyZWFzb24YDCABKAlSBnJlYXNvbg=='); + +@$core.Deprecated('Use decideApprovalRequestDescriptor instead') +const DecideApprovalRequest$json = { + '1': 'DecideApprovalRequest', + '2': [ + {'1': 'approval_id', '3': 1, '4': 1, '5': 9, '10': 'approvalId'}, + {'1': 'decision', '3': 2, '4': 1, '5': 14, '6': '.fai.v1.DecideApprovalRequest.Decision', '10': 'decision'}, + {'1': 'reviewer', '3': 3, '4': 1, '5': 9, '10': 'reviewer'}, + {'1': 'reason', '3': 4, '4': 1, '5': 9, '10': 'reason'}, + ], + '4': [DecideApprovalRequest_Decision$json], +}; + +@$core.Deprecated('Use decideApprovalRequestDescriptor instead') +const DecideApprovalRequest_Decision$json = { + '1': 'Decision', + '2': [ + {'1': 'DECISION_UNSPECIFIED', '2': 0}, + {'1': 'APPROVE', '2': 1}, + {'1': 'REJECT', '2': 2}, + ], +}; + +/// Descriptor for `DecideApprovalRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List decideApprovalRequestDescriptor = $convert.base64Decode( + 'ChVEZWNpZGVBcHByb3ZhbFJlcXVlc3QSHwoLYXBwcm92YWxfaWQYASABKAlSCmFwcHJvdmFsSW' + 'QSQgoIZGVjaXNpb24YAiABKA4yJi5mYWkudjEuRGVjaWRlQXBwcm92YWxSZXF1ZXN0LkRlY2lz' + 'aW9uUghkZWNpc2lvbhIaCghyZXZpZXdlchgDIAEoCVIIcmV2aWV3ZXISFgoGcmVhc29uGAQgAS' + 'gJUgZyZWFzb24iPQoIRGVjaXNpb24SGAoUREVDSVNJT05fVU5TUEVDSUZJRUQQABILCgdBUFBS' + 'T1ZFEAESCgoGUkVKRUNUEAI='); + +@$core.Deprecated('Use decideApprovalResponseDescriptor instead') +const DecideApprovalResponse$json = { + '1': 'DecideApprovalResponse', + '2': [ + {'1': 'approval_id', '3': 1, '4': 1, '5': 9, '10': 'approvalId'}, + {'1': 'status', '3': 2, '4': 1, '5': 9, '10': 'status'}, + ], +}; + +/// Descriptor for `DecideApprovalResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List decideApprovalResponseDescriptor = $convert.base64Decode( + 'ChZEZWNpZGVBcHByb3ZhbFJlc3BvbnNlEh8KC2FwcHJvdmFsX2lkGAEgASgJUgphcHByb3ZhbE' + 'lkEhYKBnN0YXR1cxgCIAEoCVIGc3RhdHVz'); + +@$core.Deprecated('Use storeEntryDescriptor instead') +const StoreEntry$json = { + '1': 'StoreEntry', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'tagline_en', '3': 2, '4': 1, '5': 9, '10': 'taglineEn'}, + {'1': 'tagline_de', '3': 3, '4': 1, '5': 9, '10': 'taglineDe'}, + {'1': 'description_en', '3': 4, '4': 1, '5': 9, '10': 'descriptionEn'}, + {'1': 'description_de', '3': 5, '4': 1, '5': 9, '10': 'descriptionDe'}, + {'1': 'category', '3': 6, '4': 1, '5': 9, '10': 'category'}, + {'1': 'tags', '3': 7, '4': 3, '5': 9, '10': 'tags'}, + {'1': 'requires_capabilities', '3': 8, '4': 3, '5': 9, '10': 'requiresCapabilities'}, + {'1': 'requires_services', '3': 9, '4': 3, '5': 9, '10': 'requiresServices'}, + {'1': 'license', '3': 10, '4': 1, '5': 9, '10': 'license'}, + {'1': 'repository', '3': 11, '4': 1, '5': 9, '10': 'repository'}, + {'1': 'best_version', '3': 12, '4': 1, '5': 9, '10': 'bestVersion'}, + {'1': 'status', '3': 13, '4': 1, '5': 9, '10': 'status'}, + {'1': 'installed', '3': 14, '4': 1, '5': 8, '10': 'installed'}, + ], +}; + +/// Descriptor for `StoreEntry`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List storeEntryDescriptor = $convert.base64Decode( + 'CgpTdG9yZUVudHJ5EhIKBG5hbWUYASABKAlSBG5hbWUSHQoKdGFnbGluZV9lbhgCIAEoCVIJdG' + 'FnbGluZUVuEh0KCnRhZ2xpbmVfZGUYAyABKAlSCXRhZ2xpbmVEZRIlCg5kZXNjcmlwdGlvbl9l' + 'bhgEIAEoCVINZGVzY3JpcHRpb25FbhIlCg5kZXNjcmlwdGlvbl9kZRgFIAEoCVINZGVzY3JpcH' + 'Rpb25EZRIaCghjYXRlZ29yeRgGIAEoCVIIY2F0ZWdvcnkSEgoEdGFncxgHIAMoCVIEdGFncxIz' + 'ChVyZXF1aXJlc19jYXBhYmlsaXRpZXMYCCADKAlSFHJlcXVpcmVzQ2FwYWJpbGl0aWVzEisKEX' + 'JlcXVpcmVzX3NlcnZpY2VzGAkgAygJUhByZXF1aXJlc1NlcnZpY2VzEhgKB2xpY2Vuc2UYCiAB' + 'KAlSB2xpY2Vuc2USHgoKcmVwb3NpdG9yeRgLIAEoCVIKcmVwb3NpdG9yeRIhCgxiZXN0X3Zlcn' + 'Npb24YDCABKAlSC2Jlc3RWZXJzaW9uEhYKBnN0YXR1cxgNIAEoCVIGc3RhdHVzEhwKCWluc3Rh' + 'bGxlZBgOIAEoCFIJaW5zdGFsbGVk'); + diff --git a/lib/src/generated/fai/v1/module.pb.dart b/lib/src/generated/fai/v1/module.pb.dart new file mode 100644 index 0000000..3499430 --- /dev/null +++ b/lib/src/generated/fai/v1/module.pb.dart @@ -0,0 +1,296 @@ +// +// Generated code. Do not modify. +// source: fai/v1/module.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'common.pb.dart' as $4; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +class InvokeRequest extends $pb.GeneratedMessage { + factory InvokeRequest({ + $4.InvocationId? invocationId, + $4.CapabilityRef? capability, + $core.Iterable<$core.MapEntry<$core.String, $4.Payload>>? inputs, + $fixnum.Int64? deadlineMs, + }) { + final $result = create(); + if (invocationId != null) { + $result.invocationId = invocationId; + } + if (capability != null) { + $result.capability = capability; + } + if (inputs != null) { + $result.inputs.addEntries(inputs); + } + if (deadlineMs != null) { + $result.deadlineMs = deadlineMs; + } + return $result; + } + InvokeRequest._() : super(); + factory InvokeRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory InvokeRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'InvokeRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOM<$4.InvocationId>(1, _omitFieldNames ? '' : 'invocationId', subBuilder: $4.InvocationId.create) + ..aOM<$4.CapabilityRef>(2, _omitFieldNames ? '' : 'capability', subBuilder: $4.CapabilityRef.create) + ..m<$core.String, $4.Payload>(3, _omitFieldNames ? '' : 'inputs', entryClassName: 'InvokeRequest.InputsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $4.Payload.create, valueDefaultOrMaker: $4.Payload.getDefault, packageName: const $pb.PackageName('fai.v1')) + ..a<$fixnum.Int64>(4, _omitFieldNames ? '' : 'deadlineMs', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InvokeRequest clone() => InvokeRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InvokeRequest copyWith(void Function(InvokeRequest) updates) => super.copyWith((message) => updates(message as InvokeRequest)) as InvokeRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static InvokeRequest create() => InvokeRequest._(); + InvokeRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static InvokeRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static InvokeRequest? _defaultInstance; + + @$pb.TagNumber(1) + $4.InvocationId get invocationId => $_getN(0); + @$pb.TagNumber(1) + set invocationId($4.InvocationId v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasInvocationId() => $_has(0); + @$pb.TagNumber(1) + void clearInvocationId() => $_clearField(1); + @$pb.TagNumber(1) + $4.InvocationId ensureInvocationId() => $_ensure(0); + + @$pb.TagNumber(2) + $4.CapabilityRef get capability => $_getN(1); + @$pb.TagNumber(2) + set capability($4.CapabilityRef v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasCapability() => $_has(1); + @$pb.TagNumber(2) + void clearCapability() => $_clearField(2); + @$pb.TagNumber(2) + $4.CapabilityRef ensureCapability() => $_ensure(1); + + @$pb.TagNumber(3) + $pb.PbMap<$core.String, $4.Payload> get inputs => $_getMap(2); + + @$pb.TagNumber(4) + $fixnum.Int64 get deadlineMs => $_getI64(3); + @$pb.TagNumber(4) + set deadlineMs($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasDeadlineMs() => $_has(3); + @$pb.TagNumber(4) + void clearDeadlineMs() => $_clearField(4); +} + +enum InvokeResponse_Result { + success, + error, + notSet +} + +class InvokeResponse extends $pb.GeneratedMessage { + factory InvokeResponse({ + Success? success, + $4.FaiError? error, + }) { + final $result = create(); + if (success != null) { + $result.success = success; + } + if (error != null) { + $result.error = error; + } + return $result; + } + InvokeResponse._() : super(); + factory InvokeResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory InvokeResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, InvokeResponse_Result> _InvokeResponse_ResultByTag = { + 1 : InvokeResponse_Result.success, + 2 : InvokeResponse_Result.error, + 0 : InvokeResponse_Result.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'InvokeResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..oo(0, [1, 2]) + ..aOM(1, _omitFieldNames ? '' : 'success', subBuilder: Success.create) + ..aOM<$4.FaiError>(2, _omitFieldNames ? '' : 'error', subBuilder: $4.FaiError.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InvokeResponse clone() => InvokeResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + InvokeResponse copyWith(void Function(InvokeResponse) updates) => super.copyWith((message) => updates(message as InvokeResponse)) as InvokeResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static InvokeResponse create() => InvokeResponse._(); + InvokeResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static InvokeResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static InvokeResponse? _defaultInstance; + + InvokeResponse_Result whichResult() => _InvokeResponse_ResultByTag[$_whichOneof(0)]!; + void clearResult() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + Success get success => $_getN(0); + @$pb.TagNumber(1) + set success(Success v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSuccess() => $_has(0); + @$pb.TagNumber(1) + void clearSuccess() => $_clearField(1); + @$pb.TagNumber(1) + Success ensureSuccess() => $_ensure(0); + + @$pb.TagNumber(2) + $4.FaiError get error => $_getN(1); + @$pb.TagNumber(2) + set error($4.FaiError v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasError() => $_has(1); + @$pb.TagNumber(2) + void clearError() => $_clearField(2); + @$pb.TagNumber(2) + $4.FaiError ensureError() => $_ensure(1); +} + +class Success extends $pb.GeneratedMessage { + factory Success({ + $core.Iterable<$core.MapEntry<$core.String, $4.Payload>>? outputs, + }) { + final $result = create(); + if (outputs != null) { + $result.outputs.addEntries(outputs); + } + return $result; + } + Success._() : super(); + factory Success.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Success.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Success', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..m<$core.String, $4.Payload>(1, _omitFieldNames ? '' : 'outputs', entryClassName: 'Success.OutputsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $4.Payload.create, valueDefaultOrMaker: $4.Payload.getDefault, packageName: const $pb.PackageName('fai.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Success clone() => Success()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Success copyWith(void Function(Success) updates) => super.copyWith((message) => updates(message as Success)) as Success; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Success create() => Success._(); + Success createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Success getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Success? _defaultInstance; + + @$pb.TagNumber(1) + $pb.PbMap<$core.String, $4.Payload> get outputs => $_getMap(0); +} + +class ModuleDescriptor extends $pb.GeneratedMessage { + factory ModuleDescriptor({ + $core.String? name, + $core.String? version, + $core.Iterable<$4.CapabilityRef>? provides, + $core.Iterable<$core.String>? permissions, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (version != null) { + $result.version = version; + } + if (provides != null) { + $result.provides.addAll(provides); + } + if (permissions != null) { + $result.permissions.addAll(permissions); + } + return $result; + } + ModuleDescriptor._() : super(); + factory ModuleDescriptor.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ModuleDescriptor.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ModuleDescriptor', package: const $pb.PackageName(_omitMessageNames ? '' : 'fai.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'version') + ..pc<$4.CapabilityRef>(3, _omitFieldNames ? '' : 'provides', $pb.PbFieldType.PM, subBuilder: $4.CapabilityRef.create) + ..pPS(4, _omitFieldNames ? '' : 'permissions') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleDescriptor clone() => ModuleDescriptor()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ModuleDescriptor copyWith(void Function(ModuleDescriptor) updates) => super.copyWith((message) => updates(message as ModuleDescriptor)) as ModuleDescriptor; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ModuleDescriptor create() => ModuleDescriptor._(); + ModuleDescriptor createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ModuleDescriptor getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ModuleDescriptor? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get version => $_getSZ(1); + @$pb.TagNumber(2) + set version($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasVersion() => $_has(1); + @$pb.TagNumber(2) + void clearVersion() => $_clearField(2); + + @$pb.TagNumber(3) + $pb.PbList<$4.CapabilityRef> get provides => $_getList(2); + + @$pb.TagNumber(4) + $pb.PbList<$core.String> get permissions => $_getList(3); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/fai/v1/module.pbenum.dart b/lib/src/generated/fai/v1/module.pbenum.dart new file mode 100644 index 0000000..2df86b9 --- /dev/null +++ b/lib/src/generated/fai/v1/module.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: fai/v1/module.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/src/generated/fai/v1/module.pbgrpc.dart b/lib/src/generated/fai/v1/module.pbgrpc.dart new file mode 100644 index 0000000..cf3573b --- /dev/null +++ b/lib/src/generated/fai/v1/module.pbgrpc.dart @@ -0,0 +1,92 @@ +// +// Generated code. Do not modify. +// source: fai/v1/module.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../google/protobuf/empty.pb.dart' as $1; +import 'module.pb.dart' as $2; + +export 'module.pb.dart'; + +/// The Module service is what the hub calls to invoke a module. +/// +/// In Phase 0, modules run in-process as WASM components and this +/// service is not over the wire. The proto definition exists so that +/// external module processes (OCI, remote) can implement the same +/// contract in Phase 1+. +@$pb.GrpcServiceName('fai.v1.Module') +class ModuleClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = ''; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; + + static final _$invoke = $grpc.ClientMethod<$2.InvokeRequest, $2.InvokeResponse>( + '/fai.v1.Module/Invoke', + ($2.InvokeRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.InvokeResponse.fromBuffer(value)); + static final _$describe = $grpc.ClientMethod<$1.Empty, $2.ModuleDescriptor>( + '/fai.v1.Module/Describe', + ($1.Empty value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.ModuleDescriptor.fromBuffer(value)); + + ModuleClient(super.channel, {super.options, super.interceptors}); + + /// Invoke the module once with typed inputs, receive typed outputs. + $grpc.ResponseFuture<$2.InvokeResponse> invoke($2.InvokeRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$invoke, request, options: options); + } + + /// Return the module's self-description. + $grpc.ResponseFuture<$2.ModuleDescriptor> describe($1.Empty request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$describe, request, options: options); + } +} + +@$pb.GrpcServiceName('fai.v1.Module') +abstract class ModuleServiceBase extends $grpc.Service { + $core.String get $name => 'fai.v1.Module'; + + ModuleServiceBase() { + $addMethod($grpc.ServiceMethod<$2.InvokeRequest, $2.InvokeResponse>( + 'Invoke', + invoke_Pre, + false, + false, + ($core.List<$core.int> value) => $2.InvokeRequest.fromBuffer(value), + ($2.InvokeResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.Empty, $2.ModuleDescriptor>( + 'Describe', + describe_Pre, + false, + false, + ($core.List<$core.int> value) => $1.Empty.fromBuffer(value), + ($2.ModuleDescriptor value) => value.writeToBuffer())); + } + + $async.Future<$2.InvokeResponse> invoke_Pre($grpc.ServiceCall $call, $async.Future<$2.InvokeRequest> $request) async { + return invoke($call, await $request); + } + + $async.Future<$2.ModuleDescriptor> describe_Pre($grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async { + return describe($call, await $request); + } + + $async.Future<$2.InvokeResponse> invoke($grpc.ServiceCall call, $2.InvokeRequest request); + $async.Future<$2.ModuleDescriptor> describe($grpc.ServiceCall call, $1.Empty request); +} diff --git a/lib/src/generated/fai/v1/module.pbjson.dart b/lib/src/generated/fai/v1/module.pbjson.dart new file mode 100644 index 0000000..f62fde4 --- /dev/null +++ b/lib/src/generated/fai/v1/module.pbjson.dart @@ -0,0 +1,106 @@ +// +// Generated code. Do not modify. +// source: fai/v1/module.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use invokeRequestDescriptor instead') +const InvokeRequest$json = { + '1': 'InvokeRequest', + '2': [ + {'1': 'invocation_id', '3': 1, '4': 1, '5': 11, '6': '.fai.v1.InvocationId', '10': 'invocationId'}, + {'1': 'capability', '3': 2, '4': 1, '5': 11, '6': '.fai.v1.CapabilityRef', '10': 'capability'}, + {'1': 'inputs', '3': 3, '4': 3, '5': 11, '6': '.fai.v1.InvokeRequest.InputsEntry', '10': 'inputs'}, + {'1': 'deadline_ms', '3': 4, '4': 1, '5': 4, '10': 'deadlineMs'}, + ], + '3': [InvokeRequest_InputsEntry$json], +}; + +@$core.Deprecated('Use invokeRequestDescriptor instead') +const InvokeRequest_InputsEntry$json = { + '1': 'InputsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.fai.v1.Payload', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `InvokeRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List invokeRequestDescriptor = $convert.base64Decode( + 'Cg1JbnZva2VSZXF1ZXN0EjkKDWludm9jYXRpb25faWQYASABKAsyFC5mYWkudjEuSW52b2NhdG' + 'lvbklkUgxpbnZvY2F0aW9uSWQSNQoKY2FwYWJpbGl0eRgCIAEoCzIVLmZhaS52MS5DYXBhYmls' + 'aXR5UmVmUgpjYXBhYmlsaXR5EjkKBmlucHV0cxgDIAMoCzIhLmZhaS52MS5JbnZva2VSZXF1ZX' + 'N0LklucHV0c0VudHJ5UgZpbnB1dHMSHwoLZGVhZGxpbmVfbXMYBCABKARSCmRlYWRsaW5lTXMa' + 'SgoLSW5wdXRzRW50cnkSEAoDa2V5GAEgASgJUgNrZXkSJQoFdmFsdWUYAiABKAsyDy5mYWkudj' + 'EuUGF5bG9hZFIFdmFsdWU6AjgB'); + +@$core.Deprecated('Use invokeResponseDescriptor instead') +const InvokeResponse$json = { + '1': 'InvokeResponse', + '2': [ + {'1': 'success', '3': 1, '4': 1, '5': 11, '6': '.fai.v1.Success', '9': 0, '10': 'success'}, + {'1': 'error', '3': 2, '4': 1, '5': 11, '6': '.fai.v1.FaiError', '9': 0, '10': 'error'}, + ], + '8': [ + {'1': 'result'}, + ], +}; + +/// Descriptor for `InvokeResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List invokeResponseDescriptor = $convert.base64Decode( + 'Cg5JbnZva2VSZXNwb25zZRIrCgdzdWNjZXNzGAEgASgLMg8uZmFpLnYxLlN1Y2Nlc3NIAFIHc3' + 'VjY2VzcxIoCgVlcnJvchgCIAEoCzIQLmZhaS52MS5GYWlFcnJvckgAUgVlcnJvckIICgZyZXN1' + 'bHQ='); + +@$core.Deprecated('Use successDescriptor instead') +const Success$json = { + '1': 'Success', + '2': [ + {'1': 'outputs', '3': 1, '4': 3, '5': 11, '6': '.fai.v1.Success.OutputsEntry', '10': 'outputs'}, + ], + '3': [Success_OutputsEntry$json], +}; + +@$core.Deprecated('Use successDescriptor instead') +const Success_OutputsEntry$json = { + '1': 'OutputsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.fai.v1.Payload', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `Success`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List successDescriptor = $convert.base64Decode( + 'CgdTdWNjZXNzEjYKB291dHB1dHMYASADKAsyHC5mYWkudjEuU3VjY2Vzcy5PdXRwdXRzRW50cn' + 'lSB291dHB1dHMaSwoMT3V0cHV0c0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiUKBXZhbHVlGAIg' + 'ASgLMg8uZmFpLnYxLlBheWxvYWRSBXZhbHVlOgI4AQ=='); + +@$core.Deprecated('Use moduleDescriptorDescriptor instead') +const ModuleDescriptor$json = { + '1': 'ModuleDescriptor', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, + {'1': 'provides', '3': 3, '4': 3, '5': 11, '6': '.fai.v1.CapabilityRef', '10': 'provides'}, + {'1': 'permissions', '3': 4, '4': 3, '5': 9, '10': 'permissions'}, + ], +}; + +/// Descriptor for `ModuleDescriptor`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List moduleDescriptorDescriptor = $convert.base64Decode( + 'ChBNb2R1bGVEZXNjcmlwdG9yEhIKBG5hbWUYASABKAlSBG5hbWUSGAoHdmVyc2lvbhgCIAEoCV' + 'IHdmVyc2lvbhIxCghwcm92aWRlcxgDIAMoCzIVLmZhaS52MS5DYXBhYmlsaXR5UmVmUghwcm92' + 'aWRlcxIgCgtwZXJtaXNzaW9ucxgEIAMoCVILcGVybWlzc2lvbnM='); + diff --git a/lib/src/generated/google/protobuf/empty.pb.dart b/lib/src/generated/google/protobuf/empty.pb.dart new file mode 100644 index 0000000..5f538b8 --- /dev/null +++ b/lib/src/generated/google/protobuf/empty.pb.dart @@ -0,0 +1,52 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/empty.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A generic empty message that you can re-use to avoid defining duplicated +/// empty messages in your APIs. A typical example is to use it as the request +/// or the response type of an API method. For instance: +/// +/// service Foo { +/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +/// } +class Empty extends $pb.GeneratedMessage { + factory Empty() => create(); + Empty._() : super(); + factory Empty.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Empty.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Empty', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Empty clone() => Empty()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty)) as Empty; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Empty create() => Empty._(); + Empty createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Empty getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Empty? _defaultInstance; +} + + +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/google/protobuf/empty.pbenum.dart b/lib/src/generated/google/protobuf/empty.pbenum.dart new file mode 100644 index 0000000..dce3af5 --- /dev/null +++ b/lib/src/generated/google/protobuf/empty.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/empty.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/src/generated/google/protobuf/empty.pbjson.dart b/lib/src/generated/google/protobuf/empty.pbjson.dart new file mode 100644 index 0000000..b193544 --- /dev/null +++ b/lib/src/generated/google/protobuf/empty.pbjson.dart @@ -0,0 +1,24 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/empty.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use emptyDescriptor instead') +const Empty$json = { + '1': 'Empty', +}; + +/// Descriptor for `Empty`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List emptyDescriptor = $convert.base64Decode( + 'CgVFbXB0eQ=='); + diff --git a/lib/src/generated/google/protobuf/struct.pb.dart b/lib/src/generated/google/protobuf/struct.pb.dart new file mode 100644 index 0000000..5e8d591 --- /dev/null +++ b/lib/src/generated/google/protobuf/struct.pb.dart @@ -0,0 +1,267 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/struct.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; +import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; + +import 'struct.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'struct.pbenum.dart'; + +/// `Struct` represents a structured data value, consisting of fields +/// which map to dynamically typed values. In some languages, `Struct` +/// might be supported by a native representation. For example, in +/// scripting languages like JS a struct is represented as an +/// object. The details of that representation are described together +/// with the proto support for the language. +/// +/// The JSON representation for `Struct` is JSON object. +class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { + factory Struct({ + $core.Iterable<$core.MapEntry<$core.String, Value>>? fields, + }) { + final $result = create(); + if (fields != null) { + $result.fields.addEntries(fields); + } + return $result; + } + Struct._() : super(); + factory Struct.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Struct.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Struct', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.StructMixin.toProto3JsonHelper, fromProto3Json: $mixin.StructMixin.fromProto3JsonHelper) + ..m<$core.String, Value>(1, _omitFieldNames ? '' : 'fields', entryClassName: 'Struct.FieldsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: Value.create, valueDefaultOrMaker: Value.getDefault, packageName: const $pb.PackageName('google.protobuf')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Struct clone() => Struct()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Struct copyWith(void Function(Struct) updates) => super.copyWith((message) => updates(message as Struct)) as Struct; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Struct create() => Struct._(); + Struct createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Struct getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Struct? _defaultInstance; + + /// Unordered map of dynamically typed values. + @$pb.TagNumber(1) + $pb.PbMap<$core.String, Value> get fields => $_getMap(0); +} + +enum Value_Kind { + nullValue, + numberValue, + stringValue, + boolValue, + structValue, + listValue, + notSet +} + +/// `Value` represents a dynamically typed value which can be either +/// null, a number, a string, a boolean, a recursive struct value, or a +/// list of values. A producer of value is expected to set one of these +/// variants. Absence of any variant indicates an error. +/// +/// The JSON representation for `Value` is JSON value. +class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { + factory Value({ + NullValue? nullValue, + $core.double? numberValue, + $core.String? stringValue, + $core.bool? boolValue, + Struct? structValue, + ListValue? listValue, + }) { + final $result = create(); + if (nullValue != null) { + $result.nullValue = nullValue; + } + if (numberValue != null) { + $result.numberValue = numberValue; + } + if (stringValue != null) { + $result.stringValue = stringValue; + } + if (boolValue != null) { + $result.boolValue = boolValue; + } + if (structValue != null) { + $result.structValue = structValue; + } + if (listValue != null) { + $result.listValue = listValue; + } + return $result; + } + Value._() : super(); + factory Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Value_Kind> _Value_KindByTag = { + 1 : Value_Kind.nullValue, + 2 : Value_Kind.numberValue, + 3 : Value_Kind.stringValue, + 4 : Value_Kind.boolValue, + 5 : Value_Kind.structValue, + 6 : Value_Kind.listValue, + 0 : Value_Kind.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.ValueMixin.fromProto3JsonHelper) + ..oo(0, [1, 2, 3, 4, 5, 6]) + ..e(1, _omitFieldNames ? '' : 'nullValue', $pb.PbFieldType.OE, defaultOrMaker: NullValue.NULL_VALUE, valueOf: NullValue.valueOf, enumValues: NullValue.values) + ..a<$core.double>(2, _omitFieldNames ? '' : 'numberValue', $pb.PbFieldType.OD) + ..aOS(3, _omitFieldNames ? '' : 'stringValue') + ..aOB(4, _omitFieldNames ? '' : 'boolValue') + ..aOM(5, _omitFieldNames ? '' : 'structValue', subBuilder: Struct.create) + ..aOM(6, _omitFieldNames ? '' : 'listValue', subBuilder: ListValue.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Value clone() => Value()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Value copyWith(void Function(Value) updates) => super.copyWith((message) => updates(message as Value)) as Value; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Value create() => Value._(); + Value createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Value? _defaultInstance; + + Value_Kind whichKind() => _Value_KindByTag[$_whichOneof(0)]!; + void clearKind() => $_clearField($_whichOneof(0)); + + /// Represents a null value. + @$pb.TagNumber(1) + NullValue get nullValue => $_getN(0); + @$pb.TagNumber(1) + set nullValue(NullValue v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasNullValue() => $_has(0); + @$pb.TagNumber(1) + void clearNullValue() => $_clearField(1); + + /// Represents a double value. + @$pb.TagNumber(2) + $core.double get numberValue => $_getN(1); + @$pb.TagNumber(2) + set numberValue($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasNumberValue() => $_has(1); + @$pb.TagNumber(2) + void clearNumberValue() => $_clearField(2); + + /// Represents a string value. + @$pb.TagNumber(3) + $core.String get stringValue => $_getSZ(2); + @$pb.TagNumber(3) + set stringValue($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasStringValue() => $_has(2); + @$pb.TagNumber(3) + void clearStringValue() => $_clearField(3); + + /// Represents a boolean value. + @$pb.TagNumber(4) + $core.bool get boolValue => $_getBF(3); + @$pb.TagNumber(4) + set boolValue($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(4) + $core.bool hasBoolValue() => $_has(3); + @$pb.TagNumber(4) + void clearBoolValue() => $_clearField(4); + + /// Represents a structured value. + @$pb.TagNumber(5) + Struct get structValue => $_getN(4); + @$pb.TagNumber(5) + set structValue(Struct v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasStructValue() => $_has(4); + @$pb.TagNumber(5) + void clearStructValue() => $_clearField(5); + @$pb.TagNumber(5) + Struct ensureStructValue() => $_ensure(4); + + /// Represents a repeated `Value`. + @$pb.TagNumber(6) + ListValue get listValue => $_getN(5); + @$pb.TagNumber(6) + set listValue(ListValue v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasListValue() => $_has(5); + @$pb.TagNumber(6) + void clearListValue() => $_clearField(6); + @$pb.TagNumber(6) + ListValue ensureListValue() => $_ensure(5); +} + +/// `ListValue` is a wrapper around a repeated field of values. +/// +/// The JSON representation for `ListValue` is JSON array. +class ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin { + factory ListValue({ + $core.Iterable? values, + }) { + final $result = create(); + if (values != null) { + $result.values.addAll(values); + } + return $result; + } + ListValue._() : super(); + factory ListValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.ListValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.ListValueMixin.fromProto3JsonHelper) + ..pc(1, _omitFieldNames ? '' : 'values', $pb.PbFieldType.PM, subBuilder: Value.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListValue clone() => ListValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListValue copyWith(void Function(ListValue) updates) => super.copyWith((message) => updates(message as ListValue)) as ListValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListValue create() => ListValue._(); + ListValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListValue? _defaultInstance; + + /// Repeated field of dynamically typed values. + @$pb.TagNumber(1) + $pb.PbList get values => $_getList(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/google/protobuf/struct.pbenum.dart b/lib/src/generated/google/protobuf/struct.pbenum.dart new file mode 100644 index 0000000..d943f80 --- /dev/null +++ b/lib/src/generated/google/protobuf/struct.pbenum.dart @@ -0,0 +1,35 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/struct.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// `NullValue` is a singleton enumeration to represent the null value for the +/// `Value` type union. +/// +/// The JSON representation for `NullValue` is JSON `null`. +class NullValue extends $pb.ProtobufEnum { + /// Null value. + static const NullValue NULL_VALUE = NullValue._(0, _omitEnumNames ? '' : 'NULL_VALUE'); + + static const $core.List values = [ + NULL_VALUE, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 0); + static NullValue? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const NullValue._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/generated/google/protobuf/struct.pbjson.dart b/lib/src/generated/google/protobuf/struct.pbjson.dart new file mode 100644 index 0000000..594067a --- /dev/null +++ b/lib/src/generated/google/protobuf/struct.pbjson.dart @@ -0,0 +1,90 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/struct.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use nullValueDescriptor instead') +const NullValue$json = { + '1': 'NullValue', + '2': [ + {'1': 'NULL_VALUE', '2': 0}, + ], +}; + +/// Descriptor for `NullValue`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List nullValueDescriptor = $convert.base64Decode( + 'CglOdWxsVmFsdWUSDgoKTlVMTF9WQUxVRRAA'); + +@$core.Deprecated('Use structDescriptor instead') +const Struct$json = { + '1': 'Struct', + '2': [ + {'1': 'fields', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.Struct.FieldsEntry', '10': 'fields'}, + ], + '3': [Struct_FieldsEntry$json], +}; + +@$core.Deprecated('Use structDescriptor instead') +const Struct_FieldsEntry$json = { + '1': 'FieldsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.Value', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `Struct`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List structDescriptor = $convert.base64Decode( + 'CgZTdHJ1Y3QSOwoGZmllbGRzGAEgAygLMiMuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdC5GaWVsZH' + 'NFbnRyeVIGZmllbGRzGlEKC0ZpZWxkc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiwKBXZhbHVl' + 'GAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgV2YWx1ZToCOAE='); + +@$core.Deprecated('Use valueDescriptor instead') +const Value$json = { + '1': 'Value', + '2': [ + {'1': 'null_value', '3': 1, '4': 1, '5': 14, '6': '.google.protobuf.NullValue', '9': 0, '10': 'nullValue'}, + {'1': 'number_value', '3': 2, '4': 1, '5': 1, '9': 0, '10': 'numberValue'}, + {'1': 'string_value', '3': 3, '4': 1, '5': 9, '9': 0, '10': 'stringValue'}, + {'1': 'bool_value', '3': 4, '4': 1, '5': 8, '9': 0, '10': 'boolValue'}, + {'1': 'struct_value', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Struct', '9': 0, '10': 'structValue'}, + {'1': 'list_value', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.ListValue', '9': 0, '10': 'listValue'}, + ], + '8': [ + {'1': 'kind'}, + ], +}; + +/// Descriptor for `Value`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List valueDescriptor = $convert.base64Decode( + 'CgVWYWx1ZRI7CgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZU' + 'gAUgludWxsVmFsdWUSIwoMbnVtYmVyX3ZhbHVlGAIgASgBSABSC251bWJlclZhbHVlEiMKDHN0' + 'cmluZ192YWx1ZRgDIAEoCUgAUgtzdHJpbmdWYWx1ZRIfCgpib29sX3ZhbHVlGAQgASgISABSCW' + 'Jvb2xWYWx1ZRI8CgxzdHJ1Y3RfdmFsdWUYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0' + 'SABSC3N0cnVjdFZhbHVlEjsKCmxpc3RfdmFsdWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuTG' + 'lzdFZhbHVlSABSCWxpc3RWYWx1ZUIGCgRraW5k'); + +@$core.Deprecated('Use listValueDescriptor instead') +const ListValue$json = { + '1': 'ListValue', + '2': [ + {'1': 'values', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.Value', '10': 'values'}, + ], +}; + +/// Descriptor for `ListValue`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List listValueDescriptor = $convert.base64Decode( + 'CglMaXN0VmFsdWUSLgoGdmFsdWVzGAEgAygLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgZ2YW' + 'x1ZXM='); + diff --git a/lib/src/generated/google/protobuf/timestamp.pb.dart b/lib/src/generated/google/protobuf/timestamp.pb.dart new file mode 100644 index 0000000..9682446 --- /dev/null +++ b/lib/src/generated/google/protobuf/timestamp.pb.dart @@ -0,0 +1,185 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; +import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A Timestamp represents a point in time independent of any time zone or local +/// calendar, encoded as a count of seconds and fractions of seconds at +/// nanosecond resolution. The count is relative to an epoch at UTC midnight on +/// January 1, 1970, in the proleptic Gregorian calendar which extends the +/// Gregorian calendar backwards to year one. +/// +/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +/// second table is needed for interpretation, using a [24-hour linear +/// smear](https://developers.google.com/time/smear). +/// +/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +/// restricting to that range, we ensure that we can convert to and from [RFC +/// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. +/// +/// # Examples +/// +/// Example 1: Compute Timestamp from POSIX `time()`. +/// +/// Timestamp timestamp; +/// timestamp.set_seconds(time(NULL)); +/// timestamp.set_nanos(0); +/// +/// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +/// +/// struct timeval tv; +/// gettimeofday(&tv, NULL); +/// +/// Timestamp timestamp; +/// timestamp.set_seconds(tv.tv_sec); +/// timestamp.set_nanos(tv.tv_usec * 1000); +/// +/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +/// +/// FILETIME ft; +/// GetSystemTimeAsFileTime(&ft); +/// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +/// +/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +/// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +/// Timestamp timestamp; +/// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +/// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +/// +/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +/// +/// long millis = System.currentTimeMillis(); +/// +/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +/// .setNanos((int) ((millis % 1000) * 1000000)).build(); +/// +/// Example 5: Compute Timestamp from Java `Instant.now()`. +/// +/// Instant now = Instant.now(); +/// +/// Timestamp timestamp = +/// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) +/// .setNanos(now.getNano()).build(); +/// +/// Example 6: Compute Timestamp from current time in Python. +/// +/// timestamp = Timestamp() +/// timestamp.GetCurrentTime() +/// +/// # JSON Mapping +/// +/// In JSON format, the Timestamp type is encoded as a string in the +/// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +/// where {year} is always expressed using four digits while {month}, {day}, +/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +/// is required. A ProtoJSON serializer should always use UTC (as indicated by +/// "Z") when printing the Timestamp type and a ProtoJSON parser should be +/// able to accept both UTC and other timezones (as indicated by an offset). +/// +/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +/// 01:30 UTC on January 15, 2017. +/// +/// In JavaScript, one can convert a Date object to this format using the +/// standard +/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +/// method. In Python, a standard `datetime.datetime` object can be converted +/// to this format using +/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +/// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() +/// ) to obtain a formatter capable of generating timestamps in this format. +class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { + factory Timestamp({ + $fixnum.Int64? seconds, + $core.int? nanos, + }) { + final $result = create(); + if (seconds != null) { + $result.seconds = seconds; + } + if (nanos != null) { + $result.nanos = nanos; + } + return $result; + } + Timestamp._() : super(); + factory Timestamp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Timestamp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Timestamp', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.TimestampMixin.toProto3JsonHelper, fromProto3Json: $mixin.TimestampMixin.fromProto3JsonHelper) + ..aInt64(1, _omitFieldNames ? '' : 'seconds') + ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Timestamp clone() => Timestamp()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Timestamp copyWith(void Function(Timestamp) updates) => super.copyWith((message) => updates(message as Timestamp)) as Timestamp; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Timestamp create() => Timestamp._(); + Timestamp createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Timestamp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Timestamp? _defaultInstance; + + /// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + /// be between -62135596800 and 253402300799 inclusive (which corresponds to + /// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + @$pb.TagNumber(1) + $fixnum.Int64 get seconds => $_getI64(0); + @$pb.TagNumber(1) + set seconds($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasSeconds() => $_has(0); + @$pb.TagNumber(1) + void clearSeconds() => $_clearField(1); + + /// Non-negative fractions of a second at nanosecond resolution. This field is + /// the nanosecond portion of the duration, not an alternative to seconds. + /// Negative second values with fractions must still have non-negative nanos + /// values that count forward in time. Must be between 0 and 999,999,999 + /// inclusive. + @$pb.TagNumber(2) + $core.int get nanos => $_getIZ(1); + @$pb.TagNumber(2) + set nanos($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasNanos() => $_has(1); + @$pb.TagNumber(2) + void clearNanos() => $_clearField(2); + /// Creates a new instance from [dateTime]. + /// + /// Time zone information will not be preserved. + static Timestamp fromDateTime($core.DateTime dateTime) { + final result = create(); + $mixin.TimestampMixin.setFromDateTime(result, dateTime); + return result; + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/google/protobuf/timestamp.pbenum.dart b/lib/src/generated/google/protobuf/timestamp.pbenum.dart new file mode 100644 index 0000000..4a7bffe --- /dev/null +++ b/lib/src/generated/google/protobuf/timestamp.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/src/generated/google/protobuf/timestamp.pbjson.dart b/lib/src/generated/google/protobuf/timestamp.pbjson.dart new file mode 100644 index 0000000..3e2fcc9 --- /dev/null +++ b/lib/src/generated/google/protobuf/timestamp.pbjson.dart @@ -0,0 +1,29 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use timestampDescriptor instead') +const Timestamp$json = { + '1': 'Timestamp', + '2': [ + {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, + {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, + ], +}; + +/// Descriptor for `Timestamp`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List timestampDescriptor = $convert.base64Decode( + 'CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbm' + 'Fub3M='); + diff --git a/lib/src/hub_client.dart b/lib/src/hub_client.dart index 25e57f4..bf71f62 100644 --- a/lib/src/hub_client.dart +++ b/lib/src/hub_client.dart @@ -1,11 +1,14 @@ -// HubClient — typed wrapper around the F∆I Hub gRPC service. +// HubClient — typed Dart wrapper around the F∆I gRPC surface. // -// Status (2026-05-05): scaffold. The generated proto bindings -// from `fai/platform`'s proto/fai/v1/ directory will populate -// the actual RPC implementations under `lib/src/generated/` -// once the codegen tooling is wired (planned: a small -// `tools/generate.sh` script that runs `protoc` with -// `protoc-gen-dart` against the platform repo's protos). +// Holds a single grpc.ClientChannel keyed by [HubEndpoint]. Each +// public method maps onto exactly one RPC on Hub or HubAdmin, so +// callers don't have to know which service hosts which call. + +import 'package:grpc/grpc.dart'; + +import 'generated/fai/v1/hub.pb.dart' as pb; +import 'generated/fai/v1/hub.pbgrpc.dart' as grpc_hub; +import 'generated/google/protobuf/empty.pb.dart' show Empty; /// Connection coordinates for a hub endpoint. class HubEndpoint { @@ -29,15 +32,126 @@ class HubEndpoint { String toString() => '${secure ? "https" : "http"}://$host:$port'; } -/// Stub client interface. The real implementation will arrive -/// when proto codegen is wired in. Studio uses this type as the -/// future-stable surface; the mock data layer in -/// `fai_studio/lib/data/mock.dart` is the placeholder until then. +/// Re-exports of generated protobuf types so callers don't have +/// to import the `generated/` directory directly. +typedef CapabilityEntry = pb.CapabilityEntry; +typedef CapabilityList = pb.CapabilityList; +typedef LoggedEvent = pb.LoggedEvent; +typedef PendingApprovalEntry = pb.PendingApprovalEntry; + +/// Typed client for the F∆I Hub gRPC surface. Construct once, +/// reuse for the process lifetime, call [close] on shutdown. class HubClient { final HubEndpoint endpoint; + final ClientChannel _channel; + final grpc_hub.HubClient _hub; + final grpc_hub.HubAdminClient _admin; - HubClient({this.endpoint = const HubEndpoint()}); + HubClient({this.endpoint = const HubEndpoint()}) + : _channel = ClientChannel( + endpoint.host, + port: endpoint.port, + options: ChannelOptions( + credentials: endpoint.secure + ? const ChannelCredentials.secure() + : const ChannelCredentials.insecure(), + ), + ), + _hub = grpc_hub.HubClient( + ClientChannel( + endpoint.host, + port: endpoint.port, + options: ChannelOptions( + credentials: endpoint.secure + ? const ChannelCredentials.secure() + : const ChannelCredentials.insecure(), + ), + ), + ), + _admin = grpc_hub.HubAdminClient( + ClientChannel( + endpoint.host, + port: endpoint.port, + options: ChannelOptions( + credentials: endpoint.secure + ? const ChannelCredentials.secure() + : const ChannelCredentials.insecure(), + ), + ), + ); - /// Closes the underlying channel. No-op while stubbed. - Future close() async {} + /// Liveness probe. Returns true when the hub responds with + /// SERVING. False on any failure (includes connection refused). + Future healthy() async { + try { + final r = await _hub.health(Empty()); + return r.state == pb.HealthStatus_State.SERVING; + } catch (_) { + return false; + } + } + + /// All capabilities provided by installed modules. + Future> listCapabilities() async { + final r = await _admin.listCapabilities(Empty()); + return r.capabilities; + } + + /// Recent events from the audit log, newest-first. Pass an + /// empty `types` list for all event types. + Future> eventLog({ + int limit = 100, + List types = const [], + }) async { + final req = pb.EventLogRequest() + ..limit = limit + ..eventTypes.addAll(types); + final r = await _admin.eventLog(req); + return r.events; + } + + /// Pending approvals filtered by status. Defaults to all. + Future> listApprovals({ + List statuses = const [], + int limit = 100, + }) async { + final req = pb.ListApprovalsRequest() + ..limit = limit + ..statuses.addAll(statuses); + final r = await _admin.listApprovals(req); + return r.entries; + } + + /// Approve a pending approval. The flow that posted it resumes + /// on its next polling tick. + Future approve({ + required String approvalId, + required String reviewer, + }) async { + final req = pb.DecideApprovalRequest() + ..approvalId = approvalId + ..reviewer = reviewer + ..decision = pb.DecideApprovalRequest_Decision.APPROVE; + await _admin.decideApproval(req); + } + + /// Reject a pending approval. The flow fails with the supplied + /// reason on its next polling tick. + Future reject({ + required String approvalId, + required String reviewer, + required String reason, + }) async { + final req = pb.DecideApprovalRequest() + ..approvalId = approvalId + ..reviewer = reviewer + ..reason = reason + ..decision = pb.DecideApprovalRequest_Decision.REJECT; + await _admin.decideApproval(req); + } + + /// Closes the gRPC channel. Idempotent. + Future close() async { + await _channel.shutdown(); + } } diff --git a/pubspec.yaml b/pubspec.yaml index cb610fe..2d1baf5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,6 +10,7 @@ environment: dependencies: grpc: ^4.0.0 protobuf: ^4.0.0 + fixnum: ^1.1.0 dev_dependencies: lints: ^6.0.0 diff --git a/test/fai_dart_sdk_test.dart b/test/fai_dart_sdk_test.dart index 59e700c..f94f0da 100644 --- a/test/fai_dart_sdk_test.dart +++ b/test/fai_dart_sdk_test.dart @@ -23,7 +23,7 @@ void main() { expect(c.endpoint.host, '127.0.0.1'); }); - test('close is a no-op on the stub', () async { + test('close shuts the channel cleanly', () async { final c = HubClient(); await c.close(); }); diff --git a/tools/generate.sh b/tools/generate.sh new file mode 100755 index 0000000..41560e4 --- /dev/null +++ b/tools/generate.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash +# Generate Dart bindings for the F∆I gRPC surface. +# +# Reads .proto files from the sibling fai_platform repo and +# writes Dart code into lib/src/generated/. Run after +# `dart pub global activate protoc_plugin` so that +# `protoc-gen-dart` is on PATH (`$HOME/.pub-cache/bin`). +# +# Usage: +# tools/generate.sh +# +# Env overrides: +# PROTO_ROOT Path to fai_platform/proto/ (default: ../fai_platform/proto) +# OUT_DIR Output dir (default: lib/src/generated) +set -euo pipefail + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +SDK_ROOT="$( cd -- "$SCRIPT_DIR/.." && pwd )" + +PROTO_ROOT="${PROTO_ROOT:-$SDK_ROOT/../fai_platform/proto}" +OUT_DIR="${OUT_DIR:-$SDK_ROOT/lib/src/generated}" + +if [[ ! -d "$PROTO_ROOT" ]]; then + echo "error: PROTO_ROOT does not exist: $PROTO_ROOT" >&2 + echo "Set PROTO_ROOT to the fai_platform/proto directory." >&2 + exit 1 +fi + +if ! command -v protoc >/dev/null 2>&1; then + echo "error: protoc not found on PATH" >&2 + echo "Install: brew install protobuf (macOS)" >&2 + exit 1 +fi + +# Make sure protoc-gen-dart is reachable. pub-cache/bin is the +# canonical location after `dart pub global activate protoc_plugin`. +export PATH="$HOME/.pub-cache/bin:$PATH" +if ! command -v protoc-gen-dart >/dev/null 2>&1; then + echo "error: protoc-gen-dart not found" >&2 + echo "Install: dart pub global activate protoc_plugin" >&2 + exit 1 +fi + +mkdir -p "$OUT_DIR" + +# Find every proto file under the package root and pass them to +# protoc with --dart_out for messages and grpc=true for services. +PROTO_FILES=() +while IFS= read -r -d '' file; do + PROTO_FILES+=("$file") +done < <(find "$PROTO_ROOT" -name '*.proto' -print0) + +if [[ ${#PROTO_FILES[@]} -eq 0 ]]; then + echo "error: no .proto files found under $PROTO_ROOT" >&2 + exit 1 +fi + +# Locate the well-known-types include directory. Required so we +# can generate Dart bindings for google.protobuf.Empty, +# google.protobuf.Struct, etc. that the platform's protos import. +WKT_INCLUDE="" +for candidate in \ + "/opt/homebrew/include" \ + "/usr/local/include" \ + "/usr/include"; do + if [[ -f "$candidate/google/protobuf/empty.proto" ]]; then + WKT_INCLUDE="$candidate" + break + fi +done + +if [[ -z "$WKT_INCLUDE" ]]; then + echo "error: google/protobuf/empty.proto not found in standard include dirs" >&2 + echo "Install protobuf (brew install protobuf) so the well-known types ship alongside protoc." >&2 + exit 1 +fi + +WKT_PROTOS=( + "$WKT_INCLUDE/google/protobuf/empty.proto" + "$WKT_INCLUDE/google/protobuf/struct.proto" + "$WKT_INCLUDE/google/protobuf/timestamp.proto" +) + +echo "generating Dart bindings" +echo " protos: ${#PROTO_FILES[@]} files under $PROTO_ROOT" +echo " WKT include: $WKT_INCLUDE" +echo " output: $OUT_DIR" + +protoc \ + --proto_path="$PROTO_ROOT" \ + --proto_path="$WKT_INCLUDE" \ + --dart_out=grpc:"$OUT_DIR" \ + "${PROTO_FILES[@]}" \ + "${WKT_PROTOS[@]}" + +echo "done. generated files:" +find "$OUT_DIR" -name '*.dart' | sort