182 lines
6.0 KiB
Dart
182 lines
6.0 KiB
Dart
// 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);
|
||
}
|