auto updated.

This commit is contained in:
yanweidong 2025-09-13 20:58:31 +08:00
parent a5ac99b1e0
commit b646562853
6 changed files with 0 additions and 1771 deletions

View File

@ -1,590 +0,0 @@
// This is a generated file - do not edit.
//
// Generated from push_xiaomi.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: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 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 ? '' : 'notify'),
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 BaseItem extends $pb.GeneratedMessage {
factory BaseItem({
$core.String? payload,
$core.String? restrictedPackageName,
$core.String? title,
$core.String? description,
$fixnum.Int64? timeToLive,
$fixnum.Int64? timeToSend,
$core.String? soundUri,
$core.String? notifyForeground,
$core.String? notifyEffect,
$core.String? intentUri,
$core.String? webUri,
$core.String? jobkey,
$core.String? appVersion,
$core.String? appVersionNotIn,
$core.String? connpt,
$core.String? onlySendOnce,
$core.int? notifyId,
}) {
final result = create();
if (payload != null) result.payload = payload;
if (restrictedPackageName != null)
result.restrictedPackageName = restrictedPackageName;
if (title != null) result.title = title;
if (description != null) result.description = description;
if (timeToLive != null) result.timeToLive = timeToLive;
if (timeToSend != null) result.timeToSend = timeToSend;
if (soundUri != null) result.soundUri = soundUri;
if (notifyForeground != null) result.notifyForeground = notifyForeground;
if (notifyEffect != null) result.notifyEffect = notifyEffect;
if (intentUri != null) result.intentUri = intentUri;
if (webUri != null) result.webUri = webUri;
if (jobkey != null) result.jobkey = jobkey;
if (appVersion != null) result.appVersion = appVersion;
if (appVersionNotIn != null) result.appVersionNotIn = appVersionNotIn;
if (connpt != null) result.connpt = connpt;
if (onlySendOnce != null) result.onlySendOnce = onlySendOnce;
if (notifyId != null) result.notifyId = notifyId;
return result;
}
BaseItem._();
factory BaseItem.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory BaseItem.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'BaseItem',
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'payload')
..aOS(2, _omitFieldNames ? '' : 'restrictedPackageName')
..aOS(3, _omitFieldNames ? '' : 'title')
..aOS(4, _omitFieldNames ? '' : 'description')
..aInt64(5, _omitFieldNames ? '' : 'timeToLive')
..aInt64(6, _omitFieldNames ? '' : 'timeToSend')
..aOS(7, _omitFieldNames ? '' : 'soundUri')
..aOS(8, _omitFieldNames ? '' : 'notifyForeground')
..aOS(9, _omitFieldNames ? '' : 'notifyEffect')
..aOS(10, _omitFieldNames ? '' : 'intentUri')
..aOS(11, _omitFieldNames ? '' : 'webUri')
..aOS(12, _omitFieldNames ? '' : 'jobkey')
..aOS(13, _omitFieldNames ? '' : 'appVersion')
..aOS(14, _omitFieldNames ? '' : 'appVersionNotIn')
..aOS(15, _omitFieldNames ? '' : 'connpt')
..aOS(16, _omitFieldNames ? '' : 'onlySendOnce')
..a<$core.int>(17, _omitFieldNames ? '' : 'notifyId', $pb.PbFieldType.O3)
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
BaseItem clone() => BaseItem()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
BaseItem copyWith(void Function(BaseItem) updates) =>
super.copyWith((message) => updates(message as BaseItem)) as BaseItem;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static BaseItem create() => BaseItem._();
@$core.override
BaseItem createEmptyInstance() => create();
static $pb.PbList<BaseItem> createRepeated() => $pb.PbList<BaseItem>();
@$core.pragma('dart2js:noInline')
static BaseItem getDefault() =>
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BaseItem>(create);
static BaseItem? _defaultInstance;
@$pb.TagNumber(1)
$core.String get payload => $_getSZ(0);
@$pb.TagNumber(1)
set payload($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasPayload() => $_has(0);
@$pb.TagNumber(1)
void clearPayload() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get restrictedPackageName => $_getSZ(1);
@$pb.TagNumber(2)
set restrictedPackageName($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasRestrictedPackageName() => $_has(1);
@$pb.TagNumber(2)
void clearRestrictedPackageName() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get title => $_getSZ(2);
@$pb.TagNumber(3)
set title($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasTitle() => $_has(2);
@$pb.TagNumber(3)
void clearTitle() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get description => $_getSZ(3);
@$pb.TagNumber(4)
set description($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasDescription() => $_has(3);
@$pb.TagNumber(4)
void clearDescription() => $_clearField(4);
@$pb.TagNumber(5)
$fixnum.Int64 get timeToLive => $_getI64(4);
@$pb.TagNumber(5)
set timeToLive($fixnum.Int64 value) => $_setInt64(4, value);
@$pb.TagNumber(5)
$core.bool hasTimeToLive() => $_has(4);
@$pb.TagNumber(5)
void clearTimeToLive() => $_clearField(5);
@$pb.TagNumber(6)
$fixnum.Int64 get timeToSend => $_getI64(5);
@$pb.TagNumber(6)
set timeToSend($fixnum.Int64 value) => $_setInt64(5, value);
@$pb.TagNumber(6)
$core.bool hasTimeToSend() => $_has(5);
@$pb.TagNumber(6)
void clearTimeToSend() => $_clearField(6);
@$pb.TagNumber(7)
$core.String get soundUri => $_getSZ(6);
@$pb.TagNumber(7)
set soundUri($core.String value) => $_setString(6, value);
@$pb.TagNumber(7)
$core.bool hasSoundUri() => $_has(6);
@$pb.TagNumber(7)
void clearSoundUri() => $_clearField(7);
@$pb.TagNumber(8)
$core.String get notifyForeground => $_getSZ(7);
@$pb.TagNumber(8)
set notifyForeground($core.String value) => $_setString(7, value);
@$pb.TagNumber(8)
$core.bool hasNotifyForeground() => $_has(7);
@$pb.TagNumber(8)
void clearNotifyForeground() => $_clearField(8);
@$pb.TagNumber(9)
$core.String get notifyEffect => $_getSZ(8);
@$pb.TagNumber(9)
set notifyEffect($core.String value) => $_setString(8, value);
@$pb.TagNumber(9)
$core.bool hasNotifyEffect() => $_has(8);
@$pb.TagNumber(9)
void clearNotifyEffect() => $_clearField(9);
@$pb.TagNumber(10)
$core.String get intentUri => $_getSZ(9);
@$pb.TagNumber(10)
set intentUri($core.String value) => $_setString(9, value);
@$pb.TagNumber(10)
$core.bool hasIntentUri() => $_has(9);
@$pb.TagNumber(10)
void clearIntentUri() => $_clearField(10);
@$pb.TagNumber(11)
$core.String get webUri => $_getSZ(10);
@$pb.TagNumber(11)
set webUri($core.String value) => $_setString(10, value);
@$pb.TagNumber(11)
$core.bool hasWebUri() => $_has(10);
@$pb.TagNumber(11)
void clearWebUri() => $_clearField(11);
@$pb.TagNumber(12)
$core.String get jobkey => $_getSZ(11);
@$pb.TagNumber(12)
set jobkey($core.String value) => $_setString(11, value);
@$pb.TagNumber(12)
$core.bool hasJobkey() => $_has(11);
@$pb.TagNumber(12)
void clearJobkey() => $_clearField(12);
@$pb.TagNumber(13)
$core.String get appVersion => $_getSZ(12);
@$pb.TagNumber(13)
set appVersion($core.String value) => $_setString(12, value);
@$pb.TagNumber(13)
$core.bool hasAppVersion() => $_has(12);
@$pb.TagNumber(13)
void clearAppVersion() => $_clearField(13);
@$pb.TagNumber(14)
$core.String get appVersionNotIn => $_getSZ(13);
@$pb.TagNumber(14)
set appVersionNotIn($core.String value) => $_setString(13, value);
@$pb.TagNumber(14)
$core.bool hasAppVersionNotIn() => $_has(13);
@$pb.TagNumber(14)
void clearAppVersionNotIn() => $_clearField(14);
@$pb.TagNumber(15)
$core.String get connpt => $_getSZ(14);
@$pb.TagNumber(15)
set connpt($core.String value) => $_setString(14, value);
@$pb.TagNumber(15)
$core.bool hasConnpt() => $_has(14);
@$pb.TagNumber(15)
void clearConnpt() => $_clearField(15);
@$pb.TagNumber(16)
$core.String get onlySendOnce => $_getSZ(15);
@$pb.TagNumber(16)
set onlySendOnce($core.String value) => $_setString(15, value);
@$pb.TagNumber(16)
$core.bool hasOnlySendOnce() => $_has(15);
@$pb.TagNumber(16)
void clearOnlySendOnce() => $_clearField(16);
@$pb.TagNumber(17)
$core.int get notifyId => $_getIZ(16);
@$pb.TagNumber(17)
set notifyId($core.int value) => $_setSignedInt32(16, value);
@$pb.TagNumber(17)
$core.bool hasNotifyId() => $_has(16);
@$pb.TagNumber(17)
void clearNotifyId() => $_clearField(17);
}
class ARequest extends $pb.GeneratedMessage {
factory ARequest({
$core.String? pushType,
$core.Iterable<$core.String>? pushId,
BaseItem? message,
}) {
final result = create();
if (pushType != null) result.pushType = pushType;
if (pushId != null) result.pushId.addAll(pushId);
if (message != null) result.message = message;
return result;
}
ARequest._();
factory ARequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory ARequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'ARequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'pushType')
..pPS(2, _omitFieldNames ? '' : 'pushId')
..aOM<BaseItem>(3, _omitFieldNames ? '' : 'message',
subBuilder: BaseItem.create)
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
ARequest clone() => ARequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
ARequest copyWith(void Function(ARequest) updates) =>
super.copyWith((message) => updates(message as ARequest)) as ARequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ARequest create() => ARequest._();
@$core.override
ARequest createEmptyInstance() => create();
static $pb.PbList<ARequest> createRepeated() => $pb.PbList<ARequest>();
@$core.pragma('dart2js:noInline')
static ARequest getDefault() =>
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ARequest>(create);
static ARequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get pushType => $_getSZ(0);
@$pb.TagNumber(1)
set pushType($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasPushType() => $_has(0);
@$pb.TagNumber(1)
void clearPushType() => $_clearField(1);
@$pb.TagNumber(2)
$pb.PbList<$core.String> get pushId => $_getList(1);
@$pb.TagNumber(3)
BaseItem get message => $_getN(2);
@$pb.TagNumber(3)
set message(BaseItem value) => $_setField(3, value);
@$pb.TagNumber(3)
$core.bool hasMessage() => $_has(2);
@$pb.TagNumber(3)
void clearMessage() => $_clearField(3);
@$pb.TagNumber(3)
BaseItem ensureMessage() => $_ensure(2);
}
class TopicRequest extends $pb.GeneratedMessage {
factory TopicRequest({
$core.String? topic,
BaseItem? message,
}) {
final result = create();
if (topic != null) result.topic = topic;
if (message != null) result.message = message;
return result;
}
TopicRequest._();
factory TopicRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory TopicRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'TopicRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'topic')
..aOM<BaseItem>(2, _omitFieldNames ? '' : 'message',
subBuilder: BaseItem.create)
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
TopicRequest clone() => TopicRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
TopicRequest copyWith(void Function(TopicRequest) updates) =>
super.copyWith((message) => updates(message as TopicRequest))
as TopicRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static TopicRequest create() => TopicRequest._();
@$core.override
TopicRequest createEmptyInstance() => create();
static $pb.PbList<TopicRequest> createRepeated() =>
$pb.PbList<TopicRequest>();
@$core.pragma('dart2js:noInline')
static TopicRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<TopicRequest>(create);
static TopicRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get topic => $_getSZ(0);
@$pb.TagNumber(1)
set topic($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasTopic() => $_has(0);
@$pb.TagNumber(1)
void clearTopic() => $_clearField(1);
@$pb.TagNumber(2)
BaseItem get message => $_getN(1);
@$pb.TagNumber(2)
set message(BaseItem value) => $_setField(2, value);
@$pb.TagNumber(2)
$core.bool hasMessage() => $_has(1);
@$pb.TagNumber(2)
void clearMessage() => $_clearField(2);
@$pb.TagNumber(2)
BaseItem ensureMessage() => $_ensure(1);
}
class MultiTopicRequest extends $pb.GeneratedMessage {
factory MultiTopicRequest({
$core.String? topics,
$core.String? topicOp,
BaseItem? message,
}) {
final result = create();
if (topics != null) result.topics = topics;
if (topicOp != null) result.topicOp = topicOp;
if (message != null) result.message = message;
return result;
}
MultiTopicRequest._();
factory MultiTopicRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory MultiTopicRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'MultiTopicRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'topics')
..aOS(2, _omitFieldNames ? '' : 'topicOp')
..aOM<BaseItem>(3, _omitFieldNames ? '' : 'message',
subBuilder: BaseItem.create)
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
MultiTopicRequest clone() => MultiTopicRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
MultiTopicRequest copyWith(void Function(MultiTopicRequest) updates) =>
super.copyWith((message) => updates(message as MultiTopicRequest))
as MultiTopicRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static MultiTopicRequest create() => MultiTopicRequest._();
@$core.override
MultiTopicRequest createEmptyInstance() => create();
static $pb.PbList<MultiTopicRequest> createRepeated() =>
$pb.PbList<MultiTopicRequest>();
@$core.pragma('dart2js:noInline')
static MultiTopicRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<MultiTopicRequest>(create);
static MultiTopicRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get topics => $_getSZ(0);
@$pb.TagNumber(1)
set topics($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasTopics() => $_has(0);
@$pb.TagNumber(1)
void clearTopics() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get topicOp => $_getSZ(1);
@$pb.TagNumber(2)
set topicOp($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasTopicOp() => $_has(1);
@$pb.TagNumber(2)
void clearTopicOp() => $_clearField(2);
@$pb.TagNumber(3)
BaseItem get message => $_getN(2);
@$pb.TagNumber(3)
set message(BaseItem value) => $_setField(3, value);
@$pb.TagNumber(3)
$core.bool hasMessage() => $_has(2);
@$pb.TagNumber(3)
void clearMessage() => $_clearField(3);
@$pb.TagNumber(3)
BaseItem ensureMessage() => $_ensure(2);
}
const $core.bool _omitFieldNames =
$core.bool.fromEnvironment('protobuf.omit_field_names');
const $core.bool _omitMessageNames =
$core.bool.fromEnvironment('protobuf.omit_message_names');

View File

@ -1,11 +0,0 @@
// This is a generated file - do not edit.
//
// Generated from push_xiaomi.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

View File

@ -1,181 +0,0 @@
// This is a generated file - do not edit.
//
// Generated from push_xiaomi.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:grpc/service_api.dart' as $grpc;
import 'package:protobuf/protobuf.dart' as $pb;
import 'push_xiaomi.pb.dart' as $0;
export 'push_xiaomi.pb.dart';
@$pb.GrpcServiceName('notify.Xiaomi')
class XiaomiClient 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 = [
'',
];
XiaomiClient(super.channel, {super.options, super.interceptors});
/// regid列表或alias列表推送单条消息regId可以属于不同的包名
$grpc.ResponseFuture<$0.StatusReply> regid(
$0.ARequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$regid, request, options: options);
}
/// alias或一组alias列表推送某条消息alias可以属于不同的包名
$grpc.ResponseFuture<$0.StatusReply> alias(
$0.ARequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$alias, request, options: options);
}
/// topic推送单条消息
$grpc.ResponseFuture<$0.StatusReply> topic(
$0.TopicRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$topic, request, options: options);
}
/// topic推送单条消息
$grpc.ResponseFuture<$0.StatusReply> multiTopic(
$0.MultiTopicRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$multiTopic, request, options: options);
}
///
$grpc.ResponseFuture<$0.StatusReply> all(
$0.BaseItem request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$all, request, options: options);
}
// method descriptors
static final _$regid = $grpc.ClientMethod<$0.ARequest, $0.StatusReply>(
'/notify.Xiaomi/Regid',
($0.ARequest value) => value.writeToBuffer(),
$0.StatusReply.fromBuffer);
static final _$alias = $grpc.ClientMethod<$0.ARequest, $0.StatusReply>(
'/notify.Xiaomi/Alias',
($0.ARequest value) => value.writeToBuffer(),
$0.StatusReply.fromBuffer);
static final _$topic = $grpc.ClientMethod<$0.TopicRequest, $0.StatusReply>(
'/notify.Xiaomi/Topic',
($0.TopicRequest value) => value.writeToBuffer(),
$0.StatusReply.fromBuffer);
static final _$multiTopic =
$grpc.ClientMethod<$0.MultiTopicRequest, $0.StatusReply>(
'/notify.Xiaomi/MultiTopic',
($0.MultiTopicRequest value) => value.writeToBuffer(),
$0.StatusReply.fromBuffer);
static final _$all = $grpc.ClientMethod<$0.BaseItem, $0.StatusReply>(
'/notify.Xiaomi/All',
($0.BaseItem value) => value.writeToBuffer(),
$0.StatusReply.fromBuffer);
}
@$pb.GrpcServiceName('notify.Xiaomi')
abstract class XiaomiServiceBase extends $grpc.Service {
$core.String get $name => 'notify.Xiaomi';
XiaomiServiceBase() {
$addMethod($grpc.ServiceMethod<$0.ARequest, $0.StatusReply>(
'Regid',
regid_Pre,
false,
false,
($core.List<$core.int> value) => $0.ARequest.fromBuffer(value),
($0.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.ARequest, $0.StatusReply>(
'Alias',
alias_Pre,
false,
false,
($core.List<$core.int> value) => $0.ARequest.fromBuffer(value),
($0.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.TopicRequest, $0.StatusReply>(
'Topic',
topic_Pre,
false,
false,
($core.List<$core.int> value) => $0.TopicRequest.fromBuffer(value),
($0.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.MultiTopicRequest, $0.StatusReply>(
'MultiTopic',
multiTopic_Pre,
false,
false,
($core.List<$core.int> value) => $0.MultiTopicRequest.fromBuffer(value),
($0.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.BaseItem, $0.StatusReply>(
'All',
all_Pre,
false,
false,
($core.List<$core.int> value) => $0.BaseItem.fromBuffer(value),
($0.StatusReply value) => value.writeToBuffer()));
}
$async.Future<$0.StatusReply> regid_Pre(
$grpc.ServiceCall $call, $async.Future<$0.ARequest> $request) async {
return regid($call, await $request);
}
$async.Future<$0.StatusReply> regid(
$grpc.ServiceCall call, $0.ARequest request);
$async.Future<$0.StatusReply> alias_Pre(
$grpc.ServiceCall $call, $async.Future<$0.ARequest> $request) async {
return alias($call, await $request);
}
$async.Future<$0.StatusReply> alias(
$grpc.ServiceCall call, $0.ARequest request);
$async.Future<$0.StatusReply> topic_Pre(
$grpc.ServiceCall $call, $async.Future<$0.TopicRequest> $request) async {
return topic($call, await $request);
}
$async.Future<$0.StatusReply> topic(
$grpc.ServiceCall call, $0.TopicRequest request);
$async.Future<$0.StatusReply> multiTopic_Pre($grpc.ServiceCall $call,
$async.Future<$0.MultiTopicRequest> $request) async {
return multiTopic($call, await $request);
}
$async.Future<$0.StatusReply> multiTopic(
$grpc.ServiceCall call, $0.MultiTopicRequest request);
$async.Future<$0.StatusReply> all_Pre(
$grpc.ServiceCall $call, $async.Future<$0.BaseItem> $request) async {
return all($call, await $request);
}
$async.Future<$0.StatusReply> all(
$grpc.ServiceCall call, $0.BaseItem request);
}

View File

@ -1,154 +0,0 @@
// This is a generated file - do not edit.
//
// Generated from push_xiaomi.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, unused_import
import 'dart:convert' as $convert;
import 'dart:core' as $core;
import 'dart:typed_data' as $typed_data;
@$core.Deprecated('Use statusReplyDescriptor instead')
const StatusReply$json = {
'1': 'StatusReply',
'2': [
{'1': 'status', '3': 1, '4': 1, '5': 3, '10': 'status'},
{'1': 'identity', '3': 2, '4': 1, '5': 9, '10': 'identity'},
{'1': 'message', '3': 3, '4': 1, '5': 9, '10': 'message'},
{'1': 'timeseq', '3': 4, '4': 1, '5': 3, '10': 'timeseq'},
],
};
/// Descriptor for `StatusReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List statusReplyDescriptor = $convert.base64Decode(
'CgtTdGF0dXNSZXBseRIWCgZzdGF0dXMYASABKANSBnN0YXR1cxIaCghpZGVudGl0eRgCIAEoCV'
'IIaWRlbnRpdHkSGAoHbWVzc2FnZRgDIAEoCVIHbWVzc2FnZRIYCgd0aW1lc2VxGAQgASgDUgd0'
'aW1lc2Vx');
@$core.Deprecated('Use baseItemDescriptor instead')
const BaseItem$json = {
'1': 'BaseItem',
'2': [
{'1': 'payload', '3': 1, '4': 1, '5': 9, '10': 'payload'},
{
'1': 'restricted_package_name',
'3': 2,
'4': 1,
'5': 9,
'10': 'restrictedPackageName'
},
{'1': 'title', '3': 3, '4': 1, '5': 9, '10': 'title'},
{'1': 'description', '3': 4, '4': 1, '5': 9, '10': 'description'},
{'1': 'time_to_live', '3': 5, '4': 1, '5': 3, '10': 'timeToLive'},
{'1': 'time_to_send', '3': 6, '4': 1, '5': 3, '10': 'timeToSend'},
{'1': 'sound_uri', '3': 7, '4': 1, '5': 9, '10': 'soundUri'},
{
'1': 'notify_foreground',
'3': 8,
'4': 1,
'5': 9,
'10': 'notifyForeground'
},
{'1': 'notify_effect', '3': 9, '4': 1, '5': 9, '10': 'notifyEffect'},
{'1': 'intent_uri', '3': 10, '4': 1, '5': 9, '10': 'intentUri'},
{'1': 'web_uri', '3': 11, '4': 1, '5': 9, '10': 'webUri'},
{'1': 'jobkey', '3': 12, '4': 1, '5': 9, '10': 'jobkey'},
{'1': 'app_version', '3': 13, '4': 1, '5': 9, '10': 'appVersion'},
{
'1': 'app_version_not_in',
'3': 14,
'4': 1,
'5': 9,
'10': 'appVersionNotIn'
},
{'1': 'connpt', '3': 15, '4': 1, '5': 9, '10': 'connpt'},
{'1': 'only_send_once', '3': 16, '4': 1, '5': 9, '10': 'onlySendOnce'},
{'1': 'notify_id', '3': 17, '4': 1, '5': 5, '10': 'notifyId'},
],
};
/// Descriptor for `BaseItem`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List baseItemDescriptor = $convert.base64Decode(
'CghCYXNlSXRlbRIYCgdwYXlsb2FkGAEgASgJUgdwYXlsb2FkEjYKF3Jlc3RyaWN0ZWRfcGFja2'
'FnZV9uYW1lGAIgASgJUhVyZXN0cmljdGVkUGFja2FnZU5hbWUSFAoFdGl0bGUYAyABKAlSBXRp'
'dGxlEiAKC2Rlc2NyaXB0aW9uGAQgASgJUgtkZXNjcmlwdGlvbhIgCgx0aW1lX3RvX2xpdmUYBS'
'ABKANSCnRpbWVUb0xpdmUSIAoMdGltZV90b19zZW5kGAYgASgDUgp0aW1lVG9TZW5kEhsKCXNv'
'dW5kX3VyaRgHIAEoCVIIc291bmRVcmkSKwoRbm90aWZ5X2ZvcmVncm91bmQYCCABKAlSEG5vdG'
'lmeUZvcmVncm91bmQSIwoNbm90aWZ5X2VmZmVjdBgJIAEoCVIMbm90aWZ5RWZmZWN0Eh0KCmlu'
'dGVudF91cmkYCiABKAlSCWludGVudFVyaRIXCgd3ZWJfdXJpGAsgASgJUgZ3ZWJVcmkSFgoGam'
'9ia2V5GAwgASgJUgZqb2JrZXkSHwoLYXBwX3ZlcnNpb24YDSABKAlSCmFwcFZlcnNpb24SKwoS'
'YXBwX3ZlcnNpb25fbm90X2luGA4gASgJUg9hcHBWZXJzaW9uTm90SW4SFgoGY29ubnB0GA8gAS'
'gJUgZjb25ucHQSJAoOb25seV9zZW5kX29uY2UYECABKAlSDG9ubHlTZW5kT25jZRIbCglub3Rp'
'ZnlfaWQYESABKAVSCG5vdGlmeUlk');
@$core.Deprecated('Use aRequestDescriptor instead')
const ARequest$json = {
'1': 'ARequest',
'2': [
{'1': 'push_type', '3': 1, '4': 1, '5': 9, '10': 'pushType'},
{'1': 'push_id', '3': 2, '4': 3, '5': 9, '10': 'pushId'},
{
'1': 'message',
'3': 3,
'4': 1,
'5': 11,
'6': '.notify.BaseItem',
'10': 'message'
},
],
};
/// Descriptor for `ARequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List aRequestDescriptor = $convert.base64Decode(
'CghBUmVxdWVzdBIbCglwdXNoX3R5cGUYASABKAlSCHB1c2hUeXBlEhcKB3B1c2hfaWQYAiADKA'
'lSBnB1c2hJZBIqCgdtZXNzYWdlGAMgASgLMhAubm90aWZ5LkJhc2VJdGVtUgdtZXNzYWdl');
@$core.Deprecated('Use topicRequestDescriptor instead')
const TopicRequest$json = {
'1': 'TopicRequest',
'2': [
{'1': 'topic', '3': 1, '4': 1, '5': 9, '10': 'topic'},
{
'1': 'message',
'3': 2,
'4': 1,
'5': 11,
'6': '.notify.BaseItem',
'10': 'message'
},
],
};
/// Descriptor for `TopicRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List topicRequestDescriptor = $convert.base64Decode(
'CgxUb3BpY1JlcXVlc3QSFAoFdG9waWMYASABKAlSBXRvcGljEioKB21lc3NhZ2UYAiABKAsyEC'
'5ub3RpZnkuQmFzZUl0ZW1SB21lc3NhZ2U=');
@$core.Deprecated('Use multiTopicRequestDescriptor instead')
const MultiTopicRequest$json = {
'1': 'MultiTopicRequest',
'2': [
{'1': 'topics', '3': 1, '4': 1, '5': 9, '10': 'topics'},
{'1': 'topic_op', '3': 2, '4': 1, '5': 9, '10': 'topicOp'},
{
'1': 'message',
'3': 3,
'4': 1,
'5': 11,
'6': '.notify.BaseItem',
'10': 'message'
},
],
};
/// Descriptor for `MultiTopicRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List multiTopicRequestDescriptor = $convert.base64Decode(
'ChFNdWx0aVRvcGljUmVxdWVzdBIWCgZ0b3BpY3MYASABKAlSBnRvcGljcxIZCgh0b3BpY19vcB'
'gCIAEoCVIHdG9waWNPcBIqCgdtZXNzYWdlGAMgASgLMhAubm90aWZ5LkJhc2VJdGVtUgdtZXNz'
'YWdl');

View File

@ -1,552 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.8
// protoc (unknown)
// source: push_xiaomi.proto
package notify
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type StatusReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Status int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 状态码
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 标识码
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //状态说明
Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatusReply) Reset() {
*x = StatusReply{}
mi := &file_push_xiaomi_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StatusReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatusReply) ProtoMessage() {}
func (x *StatusReply) ProtoReflect() protoreflect.Message {
mi := &file_push_xiaomi_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
func (*StatusReply) Descriptor() ([]byte, []int) {
return file_push_xiaomi_proto_rawDescGZIP(), []int{0}
}
func (x *StatusReply) GetStatus() int64 {
if x != nil {
return x.Status
}
return 0
}
func (x *StatusReply) GetIdentity() string {
if x != nil {
return x.Identity
}
return ""
}
func (x *StatusReply) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *StatusReply) GetTimeseq() int64 {
if x != nil {
return x.Timeseq
}
return 0
}
type BaseItem struct {
state protoimpl.MessageState `protogen:"open.v1"`
Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // 消息的内容。(注意:需要对payload字符串做urlencode处理
RestrictedPackageName string `protobuf:"bytes,2,opt,name=restricted_package_name,json=restrictedPackageName,proto3" json:"restricted_package_name,omitempty"` // App的包名。备注:中间用逗号分割。
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // 通知栏展示的通知的标题不允许全是空白字符长度小于50 一个中英文字符均计算为1通知栏消息必填
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 通知栏展示的通知的描述不允许全是空白字符长度小于128一个中英文字符均计算为1通知栏消息必填
TimeToLive int64 `protobuf:"varint,5,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` // 可选项。如果用户离线,设置消息在服务器保存的时间,单位:ms。服务器默认最长保留两周。
TimeToSend int64 `protobuf:"varint,6,opt,name=time_to_send,json=timeToSend,proto3" json:"time_to_send,omitempty"` // 可选项。定时发送消息。用自1970年1月1日以来00:00:00.0 UTC时间表示以毫秒为单位的时间。注:仅支持七天内的定时消息。
SoundUri string `protobuf:"bytes,7,opt,name=sound_uri,json=soundUri,proto3" json:"sound_uri,omitempty"` // 可选项自定义通知栏消息铃声url
NotifyForeground string `protobuf:"bytes,8,opt,name=notify_foreground,json=notifyForeground,proto3" json:"notify_foreground,omitempty"` // 可选项 '1'弹出通知栏消息(默认);'0'不会弹出通知栏消息
NotifyEffect string `protobuf:"bytes,9,opt,name=notify_effect,json=notifyEffect,proto3" json:"notify_effect,omitempty"` // 可选项,预定义通知栏消息的点击行为;"1":打开app的Launcher Activity。"2":打开app的任一Activity需要extra.intent_uri。"3":打开网页需要传入extra.web_uri
IntentUri string `protobuf:"bytes,10,opt,name=intent_uri,json=intentUri,proto3" json:"intent_uri,omitempty"` // 可选项打开当前app的任一组件。
WebUri string `protobuf:"bytes,11,opt,name=web_uri,json=webUri,proto3" json:"web_uri,omitempty"` // 可选项,打开某一个网页。
Jobkey string `protobuf:"bytes,12,opt,name=jobkey,proto3" json:"jobkey,omitempty"` // 可选项使用推送批次JobKey功能聚合消息。由数字[0-9]),大小写字母([a-zA-Z]下划线_和中划线-组成长度不大于20个字符
AppVersion string `protobuf:"bytes,13,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` // 可以接收消息的app版本号用逗号分割。目前支持MiPush_SDK_Client_2_2_12_sdk.jar及以后的版本。
AppVersionNotIn string `protobuf:"bytes,14,opt,name=app_version_not_in,json=appVersionNotIn,proto3" json:"app_version_not_in,omitempty"` // 无法接收消息的app版本号用逗号分割。
Connpt string `protobuf:"bytes,15,opt,name=connpt,proto3" json:"connpt,omitempty"` // 可选项,指定在特定的网络环境下才能接收到消息。目前仅支持指定"wifi"。
OnlySendOnce string `protobuf:"bytes,16,opt,name=only_send_once,json=onlySendOnce,proto3" json:"only_send_once,omitempty"` // 可选项extra.only_send_once的值设置为'1',表示该消息仅在设备在线时发送一次,不缓存离线消息进行多次下发
NotifyId int32 `protobuf:"varint,17,opt,name=notify_id,json=notifyId,proto3" json:"notify_id,omitempty"` // 可选项。默认情况下通知栏只显示一条推送消息。如果通知栏要显示多条推送消息需要针对不同的消息设置不同的notify_id相同notify_id的通知栏消息会覆盖之前的且要求notify_id为取值在0~2147483647的整数。
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BaseItem) Reset() {
*x = BaseItem{}
mi := &file_push_xiaomi_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BaseItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BaseItem) ProtoMessage() {}
func (x *BaseItem) ProtoReflect() protoreflect.Message {
mi := &file_push_xiaomi_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BaseItem.ProtoReflect.Descriptor instead.
func (*BaseItem) Descriptor() ([]byte, []int) {
return file_push_xiaomi_proto_rawDescGZIP(), []int{1}
}
func (x *BaseItem) GetPayload() string {
if x != nil {
return x.Payload
}
return ""
}
func (x *BaseItem) GetRestrictedPackageName() string {
if x != nil {
return x.RestrictedPackageName
}
return ""
}
func (x *BaseItem) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *BaseItem) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *BaseItem) GetTimeToLive() int64 {
if x != nil {
return x.TimeToLive
}
return 0
}
func (x *BaseItem) GetTimeToSend() int64 {
if x != nil {
return x.TimeToSend
}
return 0
}
func (x *BaseItem) GetSoundUri() string {
if x != nil {
return x.SoundUri
}
return ""
}
func (x *BaseItem) GetNotifyForeground() string {
if x != nil {
return x.NotifyForeground
}
return ""
}
func (x *BaseItem) GetNotifyEffect() string {
if x != nil {
return x.NotifyEffect
}
return ""
}
func (x *BaseItem) GetIntentUri() string {
if x != nil {
return x.IntentUri
}
return ""
}
func (x *BaseItem) GetWebUri() string {
if x != nil {
return x.WebUri
}
return ""
}
func (x *BaseItem) GetJobkey() string {
if x != nil {
return x.Jobkey
}
return ""
}
func (x *BaseItem) GetAppVersion() string {
if x != nil {
return x.AppVersion
}
return ""
}
func (x *BaseItem) GetAppVersionNotIn() string {
if x != nil {
return x.AppVersionNotIn
}
return ""
}
func (x *BaseItem) GetConnpt() string {
if x != nil {
return x.Connpt
}
return ""
}
func (x *BaseItem) GetOnlySendOnce() string {
if x != nil {
return x.OnlySendOnce
}
return ""
}
func (x *BaseItem) GetNotifyId() int32 {
if x != nil {
return x.NotifyId
}
return 0
}
type ARequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
PushType string `protobuf:"bytes,1,opt,name=push_type,json=pushType,proto3" json:"push_type,omitempty"` // 推送类型:"alias";"registration_id"; 注:需要与push_id对应
PushId []string `protobuf:"bytes,2,rep,name=push_id,json=pushId,proto3" json:"push_id,omitempty"` // 根据alias或registration_id或account发送消息到指定设备上用逗号分割。
Message *BaseItem `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ARequest) Reset() {
*x = ARequest{}
mi := &file_push_xiaomi_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ARequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ARequest) ProtoMessage() {}
func (x *ARequest) ProtoReflect() protoreflect.Message {
mi := &file_push_xiaomi_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ARequest.ProtoReflect.Descriptor instead.
func (*ARequest) Descriptor() ([]byte, []int) {
return file_push_xiaomi_proto_rawDescGZIP(), []int{2}
}
func (x *ARequest) GetPushType() string {
if x != nil {
return x.PushType
}
return ""
}
func (x *ARequest) GetPushId() []string {
if x != nil {
return x.PushId
}
return nil
}
func (x *ARequest) GetMessage() *BaseItem {
if x != nil {
return x.Message
}
return nil
}
type TopicRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` // 根据topic发送消息给订阅了该topic的所有设备
Message *BaseItem `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TopicRequest) Reset() {
*x = TopicRequest{}
mi := &file_push_xiaomi_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TopicRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TopicRequest) ProtoMessage() {}
func (x *TopicRequest) ProtoReflect() protoreflect.Message {
mi := &file_push_xiaomi_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TopicRequest.ProtoReflect.Descriptor instead.
func (*TopicRequest) Descriptor() ([]byte, []int) {
return file_push_xiaomi_proto_rawDescGZIP(), []int{3}
}
func (x *TopicRequest) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
func (x *TopicRequest) GetMessage() *BaseItem {
if x != nil {
return x.Message
}
return nil
}
type MultiTopicRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Topics string `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` // topic列表使用;$;分割。注: topics参数需要和topic_op参数配合使用另外topic的数量不能超过5。
TopicOp string `protobuf:"bytes,2,opt,name=topic_op,json=topicOp,proto3" json:"topic_op,omitempty"` // topic之间的操作关系。支持以下三种:UNION并集INTERSECTION交集EXCEPT差集例如:topics的列表元素是[A, B, C, D]则并集结果是ABCD交集的结果是A ∩B ∩C ∩D差集的结果是A-B-C-D。
Message *BaseItem `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *MultiTopicRequest) Reset() {
*x = MultiTopicRequest{}
mi := &file_push_xiaomi_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *MultiTopicRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiTopicRequest) ProtoMessage() {}
func (x *MultiTopicRequest) ProtoReflect() protoreflect.Message {
mi := &file_push_xiaomi_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiTopicRequest.ProtoReflect.Descriptor instead.
func (*MultiTopicRequest) Descriptor() ([]byte, []int) {
return file_push_xiaomi_proto_rawDescGZIP(), []int{4}
}
func (x *MultiTopicRequest) GetTopics() string {
if x != nil {
return x.Topics
}
return ""
}
func (x *MultiTopicRequest) GetTopicOp() string {
if x != nil {
return x.TopicOp
}
return ""
}
func (x *MultiTopicRequest) GetMessage() *BaseItem {
if x != nil {
return x.Message
}
return nil
}
var File_push_xiaomi_proto protoreflect.FileDescriptor
const file_push_xiaomi_proto_rawDesc = "" +
"\n" +
"\x11push_xiaomi.proto\x12\x06notify\"u\n" +
"\vStatusReply\x12\x16\n" +
"\x06status\x18\x01 \x01(\x03R\x06status\x12\x1a\n" +
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" +
"\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" +
"\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\xc0\x04\n" +
"\bBaseItem\x12\x18\n" +
"\apayload\x18\x01 \x01(\tR\apayload\x126\n" +
"\x17restricted_package_name\x18\x02 \x01(\tR\x15restrictedPackageName\x12\x14\n" +
"\x05title\x18\x03 \x01(\tR\x05title\x12 \n" +
"\vdescription\x18\x04 \x01(\tR\vdescription\x12 \n" +
"\ftime_to_live\x18\x05 \x01(\x03R\n" +
"timeToLive\x12 \n" +
"\ftime_to_send\x18\x06 \x01(\x03R\n" +
"timeToSend\x12\x1b\n" +
"\tsound_uri\x18\a \x01(\tR\bsoundUri\x12+\n" +
"\x11notify_foreground\x18\b \x01(\tR\x10notifyForeground\x12#\n" +
"\rnotify_effect\x18\t \x01(\tR\fnotifyEffect\x12\x1d\n" +
"\n" +
"intent_uri\x18\n" +
" \x01(\tR\tintentUri\x12\x17\n" +
"\aweb_uri\x18\v \x01(\tR\x06webUri\x12\x16\n" +
"\x06jobkey\x18\f \x01(\tR\x06jobkey\x12\x1f\n" +
"\vapp_version\x18\r \x01(\tR\n" +
"appVersion\x12+\n" +
"\x12app_version_not_in\x18\x0e \x01(\tR\x0fappVersionNotIn\x12\x16\n" +
"\x06connpt\x18\x0f \x01(\tR\x06connpt\x12$\n" +
"\x0eonly_send_once\x18\x10 \x01(\tR\fonlySendOnce\x12\x1b\n" +
"\tnotify_id\x18\x11 \x01(\x05R\bnotifyId\"l\n" +
"\bARequest\x12\x1b\n" +
"\tpush_type\x18\x01 \x01(\tR\bpushType\x12\x17\n" +
"\apush_id\x18\x02 \x03(\tR\x06pushId\x12*\n" +
"\amessage\x18\x03 \x01(\v2\x10.notify.BaseItemR\amessage\"P\n" +
"\fTopicRequest\x12\x14\n" +
"\x05topic\x18\x01 \x01(\tR\x05topic\x12*\n" +
"\amessage\x18\x02 \x01(\v2\x10.notify.BaseItemR\amessage\"r\n" +
"\x11MultiTopicRequest\x12\x16\n" +
"\x06topics\x18\x01 \x01(\tR\x06topics\x12\x19\n" +
"\btopic_op\x18\x02 \x01(\tR\atopicOp\x12*\n" +
"\amessage\x18\x03 \x01(\v2\x10.notify.BaseItemR\amessage2\x92\x02\n" +
"\x06Xiaomi\x120\n" +
"\x05Regid\x12\x10.notify.ARequest\x1a\x13.notify.StatusReply\"\x00\x120\n" +
"\x05Alias\x12\x10.notify.ARequest\x1a\x13.notify.StatusReply\"\x00\x124\n" +
"\x05Topic\x12\x14.notify.TopicRequest\x1a\x13.notify.StatusReply\"\x00\x12>\n" +
"\n" +
"MultiTopic\x12\x19.notify.MultiTopicRequest\x1a\x13.notify.StatusReply\"\x00\x12.\n" +
"\x03All\x12\x10.notify.BaseItem\x1a\x13.notify.StatusReply\"\x00B\n" +
"Z\b./notifyb\x06proto3"
var (
file_push_xiaomi_proto_rawDescOnce sync.Once
file_push_xiaomi_proto_rawDescData []byte
)
func file_push_xiaomi_proto_rawDescGZIP() []byte {
file_push_xiaomi_proto_rawDescOnce.Do(func() {
file_push_xiaomi_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_push_xiaomi_proto_rawDesc), len(file_push_xiaomi_proto_rawDesc)))
})
return file_push_xiaomi_proto_rawDescData
}
var file_push_xiaomi_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_push_xiaomi_proto_goTypes = []any{
(*StatusReply)(nil), // 0: notify.StatusReply
(*BaseItem)(nil), // 1: notify.BaseItem
(*ARequest)(nil), // 2: notify.ARequest
(*TopicRequest)(nil), // 3: notify.TopicRequest
(*MultiTopicRequest)(nil), // 4: notify.MultiTopicRequest
}
var file_push_xiaomi_proto_depIdxs = []int32{
1, // 0: notify.ARequest.message:type_name -> notify.BaseItem
1, // 1: notify.TopicRequest.message:type_name -> notify.BaseItem
1, // 2: notify.MultiTopicRequest.message:type_name -> notify.BaseItem
2, // 3: notify.Xiaomi.Regid:input_type -> notify.ARequest
2, // 4: notify.Xiaomi.Alias:input_type -> notify.ARequest
3, // 5: notify.Xiaomi.Topic:input_type -> notify.TopicRequest
4, // 6: notify.Xiaomi.MultiTopic:input_type -> notify.MultiTopicRequest
1, // 7: notify.Xiaomi.All:input_type -> notify.BaseItem
0, // 8: notify.Xiaomi.Regid:output_type -> notify.StatusReply
0, // 9: notify.Xiaomi.Alias:output_type -> notify.StatusReply
0, // 10: notify.Xiaomi.Topic:output_type -> notify.StatusReply
0, // 11: notify.Xiaomi.MultiTopic:output_type -> notify.StatusReply
0, // 12: notify.Xiaomi.All:output_type -> notify.StatusReply
8, // [8:13] is the sub-list for method output_type
3, // [3:8] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_push_xiaomi_proto_init() }
func file_push_xiaomi_proto_init() {
if File_push_xiaomi_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_push_xiaomi_proto_rawDesc), len(file_push_xiaomi_proto_rawDesc)),
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_push_xiaomi_proto_goTypes,
DependencyIndexes: file_push_xiaomi_proto_depIdxs,
MessageInfos: file_push_xiaomi_proto_msgTypes,
}.Build()
File_push_xiaomi_proto = out.File
file_push_xiaomi_proto_goTypes = nil
file_push_xiaomi_proto_depIdxs = nil
}

View File

@ -1,283 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: push_xiaomi.proto
package notify
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Xiaomi_Regid_FullMethodName = "/notify.Xiaomi/Regid"
Xiaomi_Alias_FullMethodName = "/notify.Xiaomi/Alias"
Xiaomi_Topic_FullMethodName = "/notify.Xiaomi/Topic"
Xiaomi_MultiTopic_FullMethodName = "/notify.Xiaomi/MultiTopic"
Xiaomi_All_FullMethodName = "/notify.Xiaomi/All"
)
// XiaomiClient is the client API for Xiaomi service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type XiaomiClient interface {
// 向一组regid列表或alias列表推送单条消息这些regId可以属于不同的包名
Regid(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向某个alias或一组alias列表推送某条消息这些alias可以属于不同的包名
Alias(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向某个topic推送单条消息
Topic(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向多个topic推送单条消息可以指定一个或多个包名
MultiTopic(ctx context.Context, in *MultiTopicRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向所有设备推送某条消息(可以指定一个或多个包名)
All(ctx context.Context, in *BaseItem, opts ...grpc.CallOption) (*StatusReply, error)
}
type xiaomiClient struct {
cc grpc.ClientConnInterface
}
func NewXiaomiClient(cc grpc.ClientConnInterface) XiaomiClient {
return &xiaomiClient{cc}
}
func (c *xiaomiClient) Regid(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_Regid_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) Alias(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_Alias_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) Topic(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_Topic_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) MultiTopic(ctx context.Context, in *MultiTopicRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_MultiTopic_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) All(ctx context.Context, in *BaseItem, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_All_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// XiaomiServer is the server API for Xiaomi service.
// All implementations must embed UnimplementedXiaomiServer
// for forward compatibility.
type XiaomiServer interface {
// 向一组regid列表或alias列表推送单条消息这些regId可以属于不同的包名
Regid(context.Context, *ARequest) (*StatusReply, error)
// 向某个alias或一组alias列表推送某条消息这些alias可以属于不同的包名
Alias(context.Context, *ARequest) (*StatusReply, error)
// 向某个topic推送单条消息
Topic(context.Context, *TopicRequest) (*StatusReply, error)
// 向多个topic推送单条消息可以指定一个或多个包名
MultiTopic(context.Context, *MultiTopicRequest) (*StatusReply, error)
// 向所有设备推送某条消息(可以指定一个或多个包名)
All(context.Context, *BaseItem) (*StatusReply, error)
mustEmbedUnimplementedXiaomiServer()
}
// UnimplementedXiaomiServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedXiaomiServer struct{}
func (UnimplementedXiaomiServer) Regid(context.Context, *ARequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Regid not implemented")
}
func (UnimplementedXiaomiServer) Alias(context.Context, *ARequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Alias not implemented")
}
func (UnimplementedXiaomiServer) Topic(context.Context, *TopicRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Topic not implemented")
}
func (UnimplementedXiaomiServer) MultiTopic(context.Context, *MultiTopicRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method MultiTopic not implemented")
}
func (UnimplementedXiaomiServer) All(context.Context, *BaseItem) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method All not implemented")
}
func (UnimplementedXiaomiServer) mustEmbedUnimplementedXiaomiServer() {}
func (UnimplementedXiaomiServer) testEmbeddedByValue() {}
// UnsafeXiaomiServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to XiaomiServer will
// result in compilation errors.
type UnsafeXiaomiServer interface {
mustEmbedUnimplementedXiaomiServer()
}
func RegisterXiaomiServer(s grpc.ServiceRegistrar, srv XiaomiServer) {
// If the following call pancis, it indicates UnimplementedXiaomiServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Xiaomi_ServiceDesc, srv)
}
func _Xiaomi_Regid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ARequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).Regid(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_Regid_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).Regid(ctx, req.(*ARequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_Alias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ARequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).Alias(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_Alias_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).Alias(ctx, req.(*ARequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_Topic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TopicRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).Topic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_Topic_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).Topic(ctx, req.(*TopicRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_MultiTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MultiTopicRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).MultiTopic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_MultiTopic_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).MultiTopic(ctx, req.(*MultiTopicRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_All_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BaseItem)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).All(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_All_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).All(ctx, req.(*BaseItem))
}
return interceptor(ctx, in, info, handler)
}
// Xiaomi_ServiceDesc is the grpc.ServiceDesc for Xiaomi service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Xiaomi_ServiceDesc = grpc.ServiceDesc{
ServiceName: "notify.Xiaomi",
HandlerType: (*XiaomiServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Regid",
Handler: _Xiaomi_Regid_Handler,
},
{
MethodName: "Alias",
Handler: _Xiaomi_Alias_Handler,
},
{
MethodName: "Topic",
Handler: _Xiaomi_Topic_Handler,
},
{
MethodName: "MultiTopic",
Handler: _Xiaomi_MultiTopic_Handler,
},
{
MethodName: "All",
Handler: _Xiaomi_All_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "push_xiaomi.proto",
}