387 lines
13 KiB
Dart
387 lines
13 KiB
Dart
// This is a generated file - do not edit.
|
|
//
|
|
// Generated from check.proto.
|
|
|
|
// @dart = 3.3
|
|
|
|
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
|
// ignore_for_file: constant_identifier_names
|
|
// ignore_for_file: curly_braces_in_flow_control_structures
|
|
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
|
// ignore_for_file: non_constant_identifier_names
|
|
|
|
import 'dart:async' as $async;
|
|
import 'dart:core' as $core;
|
|
|
|
import 'package:fixnum/fixnum.dart' as $fixnum;
|
|
import 'package:protobuf/protobuf.dart' as $pb;
|
|
|
|
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
|
|
|
|
class Crc extends $pb.GeneratedMessage {
|
|
factory Crc({
|
|
$core.String? code,
|
|
}) {
|
|
final result = create();
|
|
if (code != null) result.code = code;
|
|
return result;
|
|
}
|
|
|
|
Crc._();
|
|
|
|
factory Crc.fromBuffer($core.List<$core.int> data,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromBuffer(data, registry);
|
|
factory Crc.fromJson($core.String json,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromJson(json, registry);
|
|
|
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
|
_omitMessageNames ? '' : 'Crc',
|
|
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
|
|
createEmptyInstance: create)
|
|
..aOS(1, _omitFieldNames ? '' : 'code')
|
|
..hasRequiredFields = false;
|
|
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
Crc clone() => Crc()..mergeFromMessage(this);
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
Crc copyWith(void Function(Crc) updates) =>
|
|
super.copyWith((message) => updates(message as Crc)) as Crc;
|
|
|
|
@$core.override
|
|
$pb.BuilderInfo get info_ => _i;
|
|
|
|
@$core.pragma('dart2js:noInline')
|
|
static Crc create() => Crc._();
|
|
@$core.override
|
|
Crc createEmptyInstance() => create();
|
|
static $pb.PbList<Crc> createRepeated() => $pb.PbList<Crc>();
|
|
@$core.pragma('dart2js:noInline')
|
|
static Crc getDefault() =>
|
|
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Crc>(create);
|
|
static Crc? _defaultInstance;
|
|
|
|
@$pb.TagNumber(1)
|
|
$core.String get code => $_getSZ(0);
|
|
@$pb.TagNumber(1)
|
|
set code($core.String value) => $_setString(0, value);
|
|
@$pb.TagNumber(1)
|
|
$core.bool hasCode() => $_has(0);
|
|
@$pb.TagNumber(1)
|
|
void clearCode() => $_clearField(1);
|
|
}
|
|
|
|
class StatusReply extends $pb.GeneratedMessage {
|
|
factory StatusReply({
|
|
$fixnum.Int64? status,
|
|
$core.String? identity,
|
|
$core.String? message,
|
|
$fixnum.Int64? timeseq,
|
|
}) {
|
|
final result = create();
|
|
if (status != null) result.status = status;
|
|
if (identity != null) result.identity = identity;
|
|
if (message != null) result.message = message;
|
|
if (timeseq != null) result.timeseq = timeseq;
|
|
return result;
|
|
}
|
|
|
|
StatusReply._();
|
|
|
|
factory StatusReply.fromBuffer($core.List<$core.int> data,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromBuffer(data, registry);
|
|
factory StatusReply.fromJson($core.String json,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromJson(json, registry);
|
|
|
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
|
_omitMessageNames ? '' : 'StatusReply',
|
|
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
|
|
createEmptyInstance: create)
|
|
..aInt64(1, _omitFieldNames ? '' : 'status')
|
|
..aOS(2, _omitFieldNames ? '' : 'identity')
|
|
..aOS(3, _omitFieldNames ? '' : 'message')
|
|
..aInt64(4, _omitFieldNames ? '' : 'timeseq')
|
|
..hasRequiredFields = false;
|
|
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
StatusReply clone() => StatusReply()..mergeFromMessage(this);
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
StatusReply copyWith(void Function(StatusReply) updates) =>
|
|
super.copyWith((message) => updates(message as StatusReply))
|
|
as StatusReply;
|
|
|
|
@$core.override
|
|
$pb.BuilderInfo get info_ => _i;
|
|
|
|
@$core.pragma('dart2js:noInline')
|
|
static StatusReply create() => StatusReply._();
|
|
@$core.override
|
|
StatusReply createEmptyInstance() => create();
|
|
static $pb.PbList<StatusReply> createRepeated() => $pb.PbList<StatusReply>();
|
|
@$core.pragma('dart2js:noInline')
|
|
static StatusReply getDefault() => _defaultInstance ??=
|
|
$pb.GeneratedMessage.$_defaultFor<StatusReply>(create);
|
|
static StatusReply? _defaultInstance;
|
|
|
|
@$pb.TagNumber(1)
|
|
$fixnum.Int64 get status => $_getI64(0);
|
|
@$pb.TagNumber(1)
|
|
set status($fixnum.Int64 value) => $_setInt64(0, value);
|
|
@$pb.TagNumber(1)
|
|
$core.bool hasStatus() => $_has(0);
|
|
@$pb.TagNumber(1)
|
|
void clearStatus() => $_clearField(1);
|
|
|
|
@$pb.TagNumber(2)
|
|
$core.String get identity => $_getSZ(1);
|
|
@$pb.TagNumber(2)
|
|
set identity($core.String value) => $_setString(1, value);
|
|
@$pb.TagNumber(2)
|
|
$core.bool hasIdentity() => $_has(1);
|
|
@$pb.TagNumber(2)
|
|
void clearIdentity() => $_clearField(2);
|
|
|
|
@$pb.TagNumber(3)
|
|
$core.String get message => $_getSZ(2);
|
|
@$pb.TagNumber(3)
|
|
set message($core.String value) => $_setString(2, value);
|
|
@$pb.TagNumber(3)
|
|
$core.bool hasMessage() => $_has(2);
|
|
@$pb.TagNumber(3)
|
|
void clearMessage() => $_clearField(3);
|
|
|
|
@$pb.TagNumber(4)
|
|
$fixnum.Int64 get timeseq => $_getI64(3);
|
|
@$pb.TagNumber(4)
|
|
set timeseq($fixnum.Int64 value) => $_setInt64(3, value);
|
|
@$pb.TagNumber(4)
|
|
$core.bool hasTimeseq() => $_has(3);
|
|
@$pb.TagNumber(4)
|
|
void clearTimeseq() => $_clearField(4);
|
|
}
|
|
|
|
class CheckForUpdatesRequest extends $pb.GeneratedMessage {
|
|
factory CheckForUpdatesRequest({
|
|
$core.String? app,
|
|
$core.String? os,
|
|
$core.String? arch,
|
|
$core.String? version,
|
|
}) {
|
|
final result = create();
|
|
if (app != null) result.app = app;
|
|
if (os != null) result.os = os;
|
|
if (arch != null) result.arch = arch;
|
|
if (version != null) result.version = version;
|
|
return result;
|
|
}
|
|
|
|
CheckForUpdatesRequest._();
|
|
|
|
factory CheckForUpdatesRequest.fromBuffer($core.List<$core.int> data,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromBuffer(data, registry);
|
|
factory CheckForUpdatesRequest.fromJson($core.String json,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromJson(json, registry);
|
|
|
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
|
_omitMessageNames ? '' : 'CheckForUpdatesRequest',
|
|
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
|
|
createEmptyInstance: create)
|
|
..aOS(1, _omitFieldNames ? '' : 'app')
|
|
..aOS(2, _omitFieldNames ? '' : 'os')
|
|
..aOS(3, _omitFieldNames ? '' : 'arch')
|
|
..aOS(4, _omitFieldNames ? '' : 'version')
|
|
..hasRequiredFields = false;
|
|
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
CheckForUpdatesRequest clone() =>
|
|
CheckForUpdatesRequest()..mergeFromMessage(this);
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
CheckForUpdatesRequest copyWith(
|
|
void Function(CheckForUpdatesRequest) updates) =>
|
|
super.copyWith((message) => updates(message as CheckForUpdatesRequest))
|
|
as CheckForUpdatesRequest;
|
|
|
|
@$core.override
|
|
$pb.BuilderInfo get info_ => _i;
|
|
|
|
@$core.pragma('dart2js:noInline')
|
|
static CheckForUpdatesRequest create() => CheckForUpdatesRequest._();
|
|
@$core.override
|
|
CheckForUpdatesRequest createEmptyInstance() => create();
|
|
static $pb.PbList<CheckForUpdatesRequest> createRepeated() =>
|
|
$pb.PbList<CheckForUpdatesRequest>();
|
|
@$core.pragma('dart2js:noInline')
|
|
static CheckForUpdatesRequest getDefault() => _defaultInstance ??=
|
|
$pb.GeneratedMessage.$_defaultFor<CheckForUpdatesRequest>(create);
|
|
static CheckForUpdatesRequest? _defaultInstance;
|
|
|
|
@$pb.TagNumber(1)
|
|
$core.String get app => $_getSZ(0);
|
|
@$pb.TagNumber(1)
|
|
set app($core.String value) => $_setString(0, value);
|
|
@$pb.TagNumber(1)
|
|
$core.bool hasApp() => $_has(0);
|
|
@$pb.TagNumber(1)
|
|
void clearApp() => $_clearField(1);
|
|
|
|
@$pb.TagNumber(2)
|
|
$core.String get os => $_getSZ(1);
|
|
@$pb.TagNumber(2)
|
|
set os($core.String value) => $_setString(1, value);
|
|
@$pb.TagNumber(2)
|
|
$core.bool hasOs() => $_has(1);
|
|
@$pb.TagNumber(2)
|
|
void clearOs() => $_clearField(2);
|
|
|
|
@$pb.TagNumber(3)
|
|
$core.String get arch => $_getSZ(2);
|
|
@$pb.TagNumber(3)
|
|
set arch($core.String value) => $_setString(2, value);
|
|
@$pb.TagNumber(3)
|
|
$core.bool hasArch() => $_has(2);
|
|
@$pb.TagNumber(3)
|
|
void clearArch() => $_clearField(3);
|
|
|
|
@$pb.TagNumber(4)
|
|
$core.String get version => $_getSZ(3);
|
|
@$pb.TagNumber(4)
|
|
set version($core.String value) => $_setString(3, value);
|
|
@$pb.TagNumber(4)
|
|
$core.bool hasVersion() => $_has(3);
|
|
@$pb.TagNumber(4)
|
|
void clearVersion() => $_clearField(4);
|
|
}
|
|
|
|
class CheckForUpdatesReply extends $pb.GeneratedMessage {
|
|
factory CheckForUpdatesReply({
|
|
$core.String? identity,
|
|
$core.String? version,
|
|
$core.String? summary,
|
|
$core.String? files,
|
|
$core.String? pubdate,
|
|
}) {
|
|
final result = create();
|
|
if (identity != null) result.identity = identity;
|
|
if (version != null) result.version = version;
|
|
if (summary != null) result.summary = summary;
|
|
if (files != null) result.files = files;
|
|
if (pubdate != null) result.pubdate = pubdate;
|
|
return result;
|
|
}
|
|
|
|
CheckForUpdatesReply._();
|
|
|
|
factory CheckForUpdatesReply.fromBuffer($core.List<$core.int> data,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromBuffer(data, registry);
|
|
factory CheckForUpdatesReply.fromJson($core.String json,
|
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
|
create()..mergeFromJson(json, registry);
|
|
|
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
|
_omitMessageNames ? '' : 'CheckForUpdatesReply',
|
|
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
|
|
createEmptyInstance: create)
|
|
..aOS(1, _omitFieldNames ? '' : 'identity')
|
|
..aOS(2, _omitFieldNames ? '' : 'version')
|
|
..aOS(3, _omitFieldNames ? '' : 'summary')
|
|
..aOS(4, _omitFieldNames ? '' : 'files')
|
|
..aOS(5, _omitFieldNames ? '' : 'pubdate')
|
|
..hasRequiredFields = false;
|
|
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
CheckForUpdatesReply clone() =>
|
|
CheckForUpdatesReply()..mergeFromMessage(this);
|
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
|
CheckForUpdatesReply copyWith(void Function(CheckForUpdatesReply) updates) =>
|
|
super.copyWith((message) => updates(message as CheckForUpdatesReply))
|
|
as CheckForUpdatesReply;
|
|
|
|
@$core.override
|
|
$pb.BuilderInfo get info_ => _i;
|
|
|
|
@$core.pragma('dart2js:noInline')
|
|
static CheckForUpdatesReply create() => CheckForUpdatesReply._();
|
|
@$core.override
|
|
CheckForUpdatesReply createEmptyInstance() => create();
|
|
static $pb.PbList<CheckForUpdatesReply> createRepeated() =>
|
|
$pb.PbList<CheckForUpdatesReply>();
|
|
@$core.pragma('dart2js:noInline')
|
|
static CheckForUpdatesReply getDefault() => _defaultInstance ??=
|
|
$pb.GeneratedMessage.$_defaultFor<CheckForUpdatesReply>(create);
|
|
static CheckForUpdatesReply? _defaultInstance;
|
|
|
|
@$pb.TagNumber(1)
|
|
$core.String get identity => $_getSZ(0);
|
|
@$pb.TagNumber(1)
|
|
set identity($core.String value) => $_setString(0, value);
|
|
@$pb.TagNumber(1)
|
|
$core.bool hasIdentity() => $_has(0);
|
|
@$pb.TagNumber(1)
|
|
void clearIdentity() => $_clearField(1);
|
|
|
|
@$pb.TagNumber(2)
|
|
$core.String get version => $_getSZ(1);
|
|
@$pb.TagNumber(2)
|
|
set version($core.String value) => $_setString(1, value);
|
|
@$pb.TagNumber(2)
|
|
$core.bool hasVersion() => $_has(1);
|
|
@$pb.TagNumber(2)
|
|
void clearVersion() => $_clearField(2);
|
|
|
|
@$pb.TagNumber(3)
|
|
$core.String get summary => $_getSZ(2);
|
|
@$pb.TagNumber(3)
|
|
set summary($core.String value) => $_setString(2, value);
|
|
@$pb.TagNumber(3)
|
|
$core.bool hasSummary() => $_has(2);
|
|
@$pb.TagNumber(3)
|
|
void clearSummary() => $_clearField(3);
|
|
|
|
@$pb.TagNumber(4)
|
|
$core.String get files => $_getSZ(3);
|
|
@$pb.TagNumber(4)
|
|
set files($core.String value) => $_setString(3, value);
|
|
@$pb.TagNumber(4)
|
|
$core.bool hasFiles() => $_has(3);
|
|
@$pb.TagNumber(4)
|
|
void clearFiles() => $_clearField(4);
|
|
|
|
@$pb.TagNumber(5)
|
|
$core.String get pubdate => $_getSZ(4);
|
|
@$pb.TagNumber(5)
|
|
set pubdate($core.String value) => $_setString(4, value);
|
|
@$pb.TagNumber(5)
|
|
$core.bool hasPubdate() => $_has(4);
|
|
@$pb.TagNumber(5)
|
|
void clearPubdate() => $_clearField(5);
|
|
}
|
|
|
|
/// initial-检测是否有新版或新的配置
|
|
class CheckApi {
|
|
final $pb.RpcClient _client;
|
|
|
|
CheckApi(this._client);
|
|
|
|
/// HELLO
|
|
$async.Future<StatusReply> hello($pb.ClientContext? ctx, Crc request) =>
|
|
_client.invoke<StatusReply>(
|
|
ctx, 'Check', 'Hello', request, StatusReply());
|
|
|
|
/// 检查更新
|
|
$async.Future<CheckForUpdatesReply> updates(
|
|
$pb.ClientContext? ctx, CheckForUpdatesRequest request) =>
|
|
_client.invoke<CheckForUpdatesReply>(
|
|
ctx, 'Check', 'Updates', request, CheckForUpdatesReply());
|
|
}
|
|
|
|
const $core.bool _omitFieldNames =
|
|
$core.bool.fromEnvironment('protobuf.omit_field_names');
|
|
const $core.bool _omitMessageNames =
|
|
$core.bool.fromEnvironment('protobuf.omit_message_names');
|