...

Source file src/google.golang.org/genproto/googleapis/firebase/fcm/connection/v1alpha1/connection_api.pb.go

Documentation: google.golang.org/genproto/googleapis/firebase/fcm/connection/v1alpha1

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

View as plain text