1// Copyright 2019 Google LLC. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15 16// Code generated by protoc-gen-go. DO NOT EDIT. 17// versions: 18// protoc-gen-go v1.26.0 19// protoc v3.12.2 20// source: google/firebase/fcm/connection/v1alpha1/connection_api.proto 21 22package connection 23 24import ( 25 context "context" 26 reflect "reflect" 27 sync "sync" 28 29 _ "google.golang.org/genproto/googleapis/api/annotations" 30 grpc "google.golang.org/grpc" 31 codes "google.golang.org/grpc/codes" 32 status "google.golang.org/grpc/status" 33 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 34 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 35 timestamppb "google.golang.org/protobuf/types/known/timestamppb" 36) 37 38const ( 39 // Verify that this generated code is sufficiently up-to-date. 40 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 41 // Verify that runtime/protoimpl is sufficiently up-to-date. 42 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 43) 44 45// Request sent to FCM from the connected client. 46type UpstreamRequest struct { 47 state protoimpl.MessageState 48 sizeCache protoimpl.SizeCache 49 unknownFields protoimpl.UnknownFields 50 51 // The type of request the client is making to FCM. 52 // 53 // Types that are assignable to RequestType: 54 // *UpstreamRequest_Ack 55 RequestType isUpstreamRequest_RequestType `protobuf_oneof:"request_type"` 56} 57 58func (x *UpstreamRequest) Reset() { 59 *x = UpstreamRequest{} 60 if protoimpl.UnsafeEnabled { 61 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[0] 62 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 63 ms.StoreMessageInfo(mi) 64 } 65} 66 67func (x *UpstreamRequest) String() string { 68 return protoimpl.X.MessageStringOf(x) 69} 70 71func (*UpstreamRequest) ProtoMessage() {} 72 73func (x *UpstreamRequest) ProtoReflect() protoreflect.Message { 74 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[0] 75 if protoimpl.UnsafeEnabled && x != nil { 76 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 77 if ms.LoadMessageInfo() == nil { 78 ms.StoreMessageInfo(mi) 79 } 80 return ms 81 } 82 return mi.MessageOf(x) 83} 84 85// Deprecated: Use UpstreamRequest.ProtoReflect.Descriptor instead. 86func (*UpstreamRequest) Descriptor() ([]byte, []int) { 87 return file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescGZIP(), []int{0} 88} 89 90func (m *UpstreamRequest) GetRequestType() isUpstreamRequest_RequestType { 91 if m != nil { 92 return m.RequestType 93 } 94 return nil 95} 96 97func (x *UpstreamRequest) GetAck() *Ack { 98 if x, ok := x.GetRequestType().(*UpstreamRequest_Ack); ok { 99 return x.Ack 100 } 101 return nil 102} 103 104type isUpstreamRequest_RequestType interface { 105 isUpstreamRequest_RequestType() 106} 107 108type UpstreamRequest_Ack struct { 109 // Message acknowledgement. 110 Ack *Ack `protobuf:"bytes,1,opt,name=ack,proto3,oneof"` 111} 112 113func (*UpstreamRequest_Ack) isUpstreamRequest_RequestType() {} 114 115// Response sent to the connected client from FCM. 116type DownstreamResponse struct { 117 state protoimpl.MessageState 118 sizeCache protoimpl.SizeCache 119 unknownFields protoimpl.UnknownFields 120 121 // The type of response FCM is sending to the client. 122 // 123 // Types that are assignable to ResponseType: 124 // *DownstreamResponse_Message 125 ResponseType isDownstreamResponse_ResponseType `protobuf_oneof:"response_type"` 126} 127 128func (x *DownstreamResponse) Reset() { 129 *x = DownstreamResponse{} 130 if protoimpl.UnsafeEnabled { 131 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[1] 132 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 133 ms.StoreMessageInfo(mi) 134 } 135} 136 137func (x *DownstreamResponse) String() string { 138 return protoimpl.X.MessageStringOf(x) 139} 140 141func (*DownstreamResponse) ProtoMessage() {} 142 143func (x *DownstreamResponse) ProtoReflect() protoreflect.Message { 144 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[1] 145 if protoimpl.UnsafeEnabled && x != nil { 146 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 147 if ms.LoadMessageInfo() == nil { 148 ms.StoreMessageInfo(mi) 149 } 150 return ms 151 } 152 return mi.MessageOf(x) 153} 154 155// Deprecated: Use DownstreamResponse.ProtoReflect.Descriptor instead. 156func (*DownstreamResponse) Descriptor() ([]byte, []int) { 157 return file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescGZIP(), []int{1} 158} 159 160func (m *DownstreamResponse) GetResponseType() isDownstreamResponse_ResponseType { 161 if m != nil { 162 return m.ResponseType 163 } 164 return nil 165} 166 167func (x *DownstreamResponse) GetMessage() *Message { 168 if x, ok := x.GetResponseType().(*DownstreamResponse_Message); ok { 169 return x.Message 170 } 171 return nil 172} 173 174type isDownstreamResponse_ResponseType interface { 175 isDownstreamResponse_ResponseType() 176} 177 178type DownstreamResponse_Message struct { 179 // Message sent to FCM via the [Send 180 // API](https://firebase.google.com/docs/cloud-messaging/send-message) 181 // targeting this client. 182 Message *Message `protobuf:"bytes,1,opt,name=message,proto3,oneof"` 183} 184 185func (*DownstreamResponse_Message) isDownstreamResponse_ResponseType() {} 186 187// Acknowledgement to indicate a client successfully received an FCM message. 188// 189// If a message is not acked, FCM will continously resend the message until 190// it expires. Duplicate delivery in this case is working as intended. 191type Ack struct { 192 state protoimpl.MessageState 193 sizeCache protoimpl.SizeCache 194 unknownFields protoimpl.UnknownFields 195 196 // Id of message being acknowledged 197 MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` 198} 199 200func (x *Ack) Reset() { 201 *x = Ack{} 202 if protoimpl.UnsafeEnabled { 203 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[2] 204 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 205 ms.StoreMessageInfo(mi) 206 } 207} 208 209func (x *Ack) String() string { 210 return protoimpl.X.MessageStringOf(x) 211} 212 213func (*Ack) ProtoMessage() {} 214 215func (x *Ack) ProtoReflect() protoreflect.Message { 216 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[2] 217 if protoimpl.UnsafeEnabled && x != nil { 218 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 219 if ms.LoadMessageInfo() == nil { 220 ms.StoreMessageInfo(mi) 221 } 222 return ms 223 } 224 return mi.MessageOf(x) 225} 226 227// Deprecated: Use Ack.ProtoReflect.Descriptor instead. 228func (*Ack) Descriptor() ([]byte, []int) { 229 return file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescGZIP(), []int{2} 230} 231 232func (x *Ack) GetMessageId() string { 233 if x != nil { 234 return x.MessageId 235 } 236 return "" 237} 238 239// Message created through the [Send 240// API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource-message). 241type Message struct { 242 state protoimpl.MessageState 243 sizeCache protoimpl.SizeCache 244 unknownFields protoimpl.UnknownFields 245 246 // The identifier of the message. Used to ack the message. 247 MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` 248 // Time the message was received in FCM. 249 CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` 250 // Expiry time of the message. Currently it is always 4 weeks. 251 ExpireTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` 252 // The arbitrary payload set in the [Send 253 // API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource-message). 254 Data map[string]string `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 255} 256 257func (x *Message) Reset() { 258 *x = Message{} 259 if protoimpl.UnsafeEnabled { 260 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[3] 261 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 262 ms.StoreMessageInfo(mi) 263 } 264} 265 266func (x *Message) String() string { 267 return protoimpl.X.MessageStringOf(x) 268} 269 270func (*Message) ProtoMessage() {} 271 272func (x *Message) ProtoReflect() protoreflect.Message { 273 mi := &file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[3] 274 if protoimpl.UnsafeEnabled && x != nil { 275 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 276 if ms.LoadMessageInfo() == nil { 277 ms.StoreMessageInfo(mi) 278 } 279 return ms 280 } 281 return mi.MessageOf(x) 282} 283 284// Deprecated: Use Message.ProtoReflect.Descriptor instead. 285func (*Message) Descriptor() ([]byte, []int) { 286 return file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescGZIP(), []int{3} 287} 288 289func (x *Message) GetMessageId() string { 290 if x != nil { 291 return x.MessageId 292 } 293 return "" 294} 295 296func (x *Message) GetCreateTime() *timestamppb.Timestamp { 297 if x != nil { 298 return x.CreateTime 299 } 300 return nil 301} 302 303func (x *Message) GetExpireTime() *timestamppb.Timestamp { 304 if x != nil { 305 return x.ExpireTime 306 } 307 return nil 308} 309 310func (x *Message) GetData() map[string]string { 311 if x != nil { 312 return x.Data 313 } 314 return nil 315} 316 317var File_google_firebase_fcm_connection_v1alpha1_connection_api_proto protoreflect.FileDescriptor 318 319var file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDesc = []byte{ 320 0x0a, 0x3c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 321 0x65, 0x2f, 0x66, 0x63, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 322 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 323 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 324 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 325 0x66, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 326 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 327 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 328 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 329 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 330 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x0f, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 331 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x03, 0x61, 0x63, 0x6b, 332 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 333 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x66, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 334 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 335 0x2e, 0x41, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x03, 0x61, 0x63, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, 0x72, 336 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x73, 0x0a, 0x12, 0x44, 337 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 338 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 339 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x66, 0x69, 0x72, 0x65, 340 0x62, 0x61, 0x73, 0x65, 0x2e, 0x66, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 341 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 342 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 343 0x0f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 344 0x22, 0x24, 0x0a, 0x03, 0x41, 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 345 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 346 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0xab, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 347 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 348 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 349 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 350 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 351 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 352 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 353 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 354 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 355 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 356 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x04, 0x64, 357 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 358 0x6c, 0x65, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x66, 0x63, 0x6d, 0x2e, 359 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 360 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 361 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 362 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 363 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 364 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 365 0x3a, 0x02, 0x38, 0x01, 0x32, 0x98, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 366 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x69, 0x12, 0x86, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 367 0x63, 0x74, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x66, 0x69, 0x72, 0x65, 368 0x62, 0x61, 0x73, 0x65, 0x2e, 0x66, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 369 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 370 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 371 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x66, 372 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 373 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 374 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 375 0x82, 0x01, 0x0a, 0x2b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x66, 376 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x66, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 377 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x50, 378 0x01, 0x5a, 0x51, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 379 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 380 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 381 0x65, 0x2f, 0x66, 0x63, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 382 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 383 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 384} 385 386var ( 387 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescOnce sync.Once 388 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescData = file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDesc 389) 390 391func file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescGZIP() []byte { 392 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescOnce.Do(func() { 393 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescData) 394 }) 395 return file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDescData 396} 397 398var file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes = make([]protoimpl.MessageInfo, 5) 399var file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_goTypes = []interface{}{ 400 (*UpstreamRequest)(nil), // 0: google.firebase.fcm.connection.v1alpha1.UpstreamRequest 401 (*DownstreamResponse)(nil), // 1: google.firebase.fcm.connection.v1alpha1.DownstreamResponse 402 (*Ack)(nil), // 2: google.firebase.fcm.connection.v1alpha1.Ack 403 (*Message)(nil), // 3: google.firebase.fcm.connection.v1alpha1.Message 404 nil, // 4: google.firebase.fcm.connection.v1alpha1.Message.DataEntry 405 (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp 406} 407var file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_depIdxs = []int32{ 408 2, // 0: google.firebase.fcm.connection.v1alpha1.UpstreamRequest.ack:type_name -> google.firebase.fcm.connection.v1alpha1.Ack 409 3, // 1: google.firebase.fcm.connection.v1alpha1.DownstreamResponse.message:type_name -> google.firebase.fcm.connection.v1alpha1.Message 410 5, // 2: google.firebase.fcm.connection.v1alpha1.Message.create_time:type_name -> google.protobuf.Timestamp 411 5, // 3: google.firebase.fcm.connection.v1alpha1.Message.expire_time:type_name -> google.protobuf.Timestamp 412 4, // 4: google.firebase.fcm.connection.v1alpha1.Message.data:type_name -> google.firebase.fcm.connection.v1alpha1.Message.DataEntry 413 0, // 5: google.firebase.fcm.connection.v1alpha1.ConnectionApi.Connect:input_type -> google.firebase.fcm.connection.v1alpha1.UpstreamRequest 414 1, // 6: google.firebase.fcm.connection.v1alpha1.ConnectionApi.Connect:output_type -> google.firebase.fcm.connection.v1alpha1.DownstreamResponse 415 6, // [6:7] is the sub-list for method output_type 416 5, // [5:6] is the sub-list for method input_type 417 5, // [5:5] is the sub-list for extension type_name 418 5, // [5:5] is the sub-list for extension extendee 419 0, // [0:5] is the sub-list for field type_name 420} 421 422func init() { file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_init() } 423func file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_init() { 424 if File_google_firebase_fcm_connection_v1alpha1_connection_api_proto != nil { 425 return 426 } 427 if !protoimpl.UnsafeEnabled { 428 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 429 switch v := v.(*UpstreamRequest); i { 430 case 0: 431 return &v.state 432 case 1: 433 return &v.sizeCache 434 case 2: 435 return &v.unknownFields 436 default: 437 return nil 438 } 439 } 440 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 441 switch v := v.(*DownstreamResponse); i { 442 case 0: 443 return &v.state 444 case 1: 445 return &v.sizeCache 446 case 2: 447 return &v.unknownFields 448 default: 449 return nil 450 } 451 } 452 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 453 switch v := v.(*Ack); i { 454 case 0: 455 return &v.state 456 case 1: 457 return &v.sizeCache 458 case 2: 459 return &v.unknownFields 460 default: 461 return nil 462 } 463 } 464 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 465 switch v := v.(*Message); i { 466 case 0: 467 return &v.state 468 case 1: 469 return &v.sizeCache 470 case 2: 471 return &v.unknownFields 472 default: 473 return nil 474 } 475 } 476 } 477 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[0].OneofWrappers = []interface{}{ 478 (*UpstreamRequest_Ack)(nil), 479 } 480 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes[1].OneofWrappers = []interface{}{ 481 (*DownstreamResponse_Message)(nil), 482 } 483 type x struct{} 484 out := protoimpl.TypeBuilder{ 485 File: protoimpl.DescBuilder{ 486 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 487 RawDescriptor: file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDesc, 488 NumEnums: 0, 489 NumMessages: 5, 490 NumExtensions: 0, 491 NumServices: 1, 492 }, 493 GoTypes: file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_goTypes, 494 DependencyIndexes: file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_depIdxs, 495 MessageInfos: file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_msgTypes, 496 }.Build() 497 File_google_firebase_fcm_connection_v1alpha1_connection_api_proto = out.File 498 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_rawDesc = nil 499 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_goTypes = nil 500 file_google_firebase_fcm_connection_v1alpha1_connection_api_proto_depIdxs = nil 501} 502 503// Reference imports to suppress errors if they are not otherwise used. 504var _ context.Context 505var _ grpc.ClientConnInterface 506 507// This is a compile-time assertion to ensure that this generated file 508// is compatible with the grpc package it is being compiled against. 509const _ = grpc.SupportPackageIsVersion6 510 511// ConnectionApiClient is the client API for ConnectionApi service. 512// 513// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 514type ConnectionApiClient interface { 515 // Creates a streaming connection with FCM to send messages and their 516 // respective ACKs. 517 // 518 // The client credentials need to be passed in the [gRPC 519 // Metadata](https://grpc.io/docs/guides/concepts.html#metadata). The Format 520 // of the header is: 521 // Key: "authorization" 522 // Value: "Checkin [client_id:secret]" 523 // 524 // 525 // The project's API key also needs to be sent to authorize the project. 526 // That can be set in the X-Goog-Api-Key Metadata header. 527 Connect(ctx context.Context, opts ...grpc.CallOption) (ConnectionApi_ConnectClient, error) 528} 529 530type connectionApiClient struct { 531 cc grpc.ClientConnInterface 532} 533 534func NewConnectionApiClient(cc grpc.ClientConnInterface) ConnectionApiClient { 535 return &connectionApiClient{cc} 536} 537 538func (c *connectionApiClient) Connect(ctx context.Context, opts ...grpc.CallOption) (ConnectionApi_ConnectClient, error) { 539 stream, err := c.cc.NewStream(ctx, &_ConnectionApi_serviceDesc.Streams[0], "/google.firebase.fcm.connection.v1alpha1.ConnectionApi/Connect", opts...) 540 if err != nil { 541 return nil, err 542 } 543 x := &connectionApiConnectClient{stream} 544 return x, nil 545} 546 547type ConnectionApi_ConnectClient interface { 548 Send(*UpstreamRequest) error 549 Recv() (*DownstreamResponse, error) 550 grpc.ClientStream 551} 552 553type connectionApiConnectClient struct { 554 grpc.ClientStream 555} 556 557func (x *connectionApiConnectClient) Send(m *UpstreamRequest) error { 558 return x.ClientStream.SendMsg(m) 559} 560 561func (x *connectionApiConnectClient) Recv() (*DownstreamResponse, error) { 562 m := new(DownstreamResponse) 563 if err := x.ClientStream.RecvMsg(m); err != nil { 564 return nil, err 565 } 566 return m, nil 567} 568 569// ConnectionApiServer is the server API for ConnectionApi service. 570type ConnectionApiServer interface { 571 // Creates a streaming connection with FCM to send messages and their 572 // respective ACKs. 573 // 574 // The client credentials need to be passed in the [gRPC 575 // Metadata](https://grpc.io/docs/guides/concepts.html#metadata). The Format 576 // of the header is: 577 // Key: "authorization" 578 // Value: "Checkin [client_id:secret]" 579 // 580 // 581 // The project's API key also needs to be sent to authorize the project. 582 // That can be set in the X-Goog-Api-Key Metadata header. 583 Connect(ConnectionApi_ConnectServer) error 584} 585 586// UnimplementedConnectionApiServer can be embedded to have forward compatible implementations. 587type UnimplementedConnectionApiServer struct { 588} 589 590func (*UnimplementedConnectionApiServer) Connect(ConnectionApi_ConnectServer) error { 591 return status.Errorf(codes.Unimplemented, "method Connect not implemented") 592} 593 594func RegisterConnectionApiServer(s *grpc.Server, srv ConnectionApiServer) { 595 s.RegisterService(&_ConnectionApi_serviceDesc, srv) 596} 597 598func _ConnectionApi_Connect_Handler(srv interface{}, stream grpc.ServerStream) error { 599 return srv.(ConnectionApiServer).Connect(&connectionApiConnectServer{stream}) 600} 601 602type ConnectionApi_ConnectServer interface { 603 Send(*DownstreamResponse) error 604 Recv() (*UpstreamRequest, error) 605 grpc.ServerStream 606} 607 608type connectionApiConnectServer struct { 609 grpc.ServerStream 610} 611 612func (x *connectionApiConnectServer) Send(m *DownstreamResponse) error { 613 return x.ServerStream.SendMsg(m) 614} 615 616func (x *connectionApiConnectServer) Recv() (*UpstreamRequest, error) { 617 m := new(UpstreamRequest) 618 if err := x.ServerStream.RecvMsg(m); err != nil { 619 return nil, err 620 } 621 return m, nil 622} 623 624var _ConnectionApi_serviceDesc = grpc.ServiceDesc{ 625 ServiceName: "google.firebase.fcm.connection.v1alpha1.ConnectionApi", 626 HandlerType: (*ConnectionApiServer)(nil), 627 Methods: []grpc.MethodDesc{}, 628 Streams: []grpc.StreamDesc{ 629 { 630 StreamName: "Connect", 631 Handler: _ConnectionApi_Connect_Handler, 632 ServerStreams: true, 633 ClientStreams: true, 634 }, 635 }, 636 Metadata: "google/firebase/fcm/connection/v1alpha1/connection_api.proto", 637} 638