client/golnag/passport/push_xiaomi.pb.go

553 lines
20 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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
}