1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/cloud/bigquery/storage/v1alpha2/storage.proto 3 4package storage 5 6import ( 7 context "context" 8 fmt "fmt" 9 math "math" 10 11 proto "github.com/golang/protobuf/proto" 12 _ "github.com/golang/protobuf/ptypes/empty" 13 timestamp "github.com/golang/protobuf/ptypes/timestamp" 14 wrappers "github.com/golang/protobuf/ptypes/wrappers" 15 _ "google.golang.org/genproto/googleapis/api/annotations" 16 status "google.golang.org/genproto/googleapis/rpc/status" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status1 "google.golang.org/grpc/status" 20) 21 22// Reference imports to suppress errors if they are not otherwise used. 23var _ = proto.Marshal 24var _ = fmt.Errorf 25var _ = math.Inf 26 27// This is a compile-time assertion to ensure that this generated file 28// is compatible with the proto package it is being compiled against. 29// A compilation error at this line likely means your copy of the 30// proto package needs to be updated. 31const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 32 33// Request message for `CreateWriteStream`. 34type CreateWriteStreamRequest struct { 35 // Required. Reference to the table to which the stream belongs, in the format 36 // of `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}`. 37 Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` 38 // Required. Stream to be created. 39 WriteStream *WriteStream `protobuf:"bytes,2,opt,name=write_stream,json=writeStream,proto3" json:"write_stream,omitempty"` 40 XXX_NoUnkeyedLiteral struct{} `json:"-"` 41 XXX_unrecognized []byte `json:"-"` 42 XXX_sizecache int32 `json:"-"` 43} 44 45func (m *CreateWriteStreamRequest) Reset() { *m = CreateWriteStreamRequest{} } 46func (m *CreateWriteStreamRequest) String() string { return proto.CompactTextString(m) } 47func (*CreateWriteStreamRequest) ProtoMessage() {} 48func (*CreateWriteStreamRequest) Descriptor() ([]byte, []int) { 49 return fileDescriptor_f4f9d0517c05d712, []int{0} 50} 51 52func (m *CreateWriteStreamRequest) XXX_Unmarshal(b []byte) error { 53 return xxx_messageInfo_CreateWriteStreamRequest.Unmarshal(m, b) 54} 55func (m *CreateWriteStreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 56 return xxx_messageInfo_CreateWriteStreamRequest.Marshal(b, m, deterministic) 57} 58func (m *CreateWriteStreamRequest) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_CreateWriteStreamRequest.Merge(m, src) 60} 61func (m *CreateWriteStreamRequest) XXX_Size() int { 62 return xxx_messageInfo_CreateWriteStreamRequest.Size(m) 63} 64func (m *CreateWriteStreamRequest) XXX_DiscardUnknown() { 65 xxx_messageInfo_CreateWriteStreamRequest.DiscardUnknown(m) 66} 67 68var xxx_messageInfo_CreateWriteStreamRequest proto.InternalMessageInfo 69 70func (m *CreateWriteStreamRequest) GetParent() string { 71 if m != nil { 72 return m.Parent 73 } 74 return "" 75} 76 77func (m *CreateWriteStreamRequest) GetWriteStream() *WriteStream { 78 if m != nil { 79 return m.WriteStream 80 } 81 return nil 82} 83 84// Request message for `AppendRows`. 85type AppendRowsRequest struct { 86 // Required. The stream that is the target of the append operation. This value must be 87 // specified for the initial request. If subsequent requests specify the 88 // stream name, it must equal to the value provided in the first request. 89 WriteStream string `protobuf:"bytes,1,opt,name=write_stream,json=writeStream,proto3" json:"write_stream,omitempty"` 90 // Optional. If present, the write is only performed if the next append offset is same 91 // as the provided value. If not present, the write is performed at the 92 // current end of stream. 93 Offset *wrappers.Int64Value `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"` 94 // Input rows. The `writer_schema` field must be specified at the initial 95 // request and currently, it will be ignored if specified in following 96 // requests. Following requests must have data in the same format as the 97 // initial request. 98 // 99 // Types that are valid to be assigned to Rows: 100 // *AppendRowsRequest_ProtoRows 101 Rows isAppendRowsRequest_Rows `protobuf_oneof:"rows"` 102 XXX_NoUnkeyedLiteral struct{} `json:"-"` 103 XXX_unrecognized []byte `json:"-"` 104 XXX_sizecache int32 `json:"-"` 105} 106 107func (m *AppendRowsRequest) Reset() { *m = AppendRowsRequest{} } 108func (m *AppendRowsRequest) String() string { return proto.CompactTextString(m) } 109func (*AppendRowsRequest) ProtoMessage() {} 110func (*AppendRowsRequest) Descriptor() ([]byte, []int) { 111 return fileDescriptor_f4f9d0517c05d712, []int{1} 112} 113 114func (m *AppendRowsRequest) XXX_Unmarshal(b []byte) error { 115 return xxx_messageInfo_AppendRowsRequest.Unmarshal(m, b) 116} 117func (m *AppendRowsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 118 return xxx_messageInfo_AppendRowsRequest.Marshal(b, m, deterministic) 119} 120func (m *AppendRowsRequest) XXX_Merge(src proto.Message) { 121 xxx_messageInfo_AppendRowsRequest.Merge(m, src) 122} 123func (m *AppendRowsRequest) XXX_Size() int { 124 return xxx_messageInfo_AppendRowsRequest.Size(m) 125} 126func (m *AppendRowsRequest) XXX_DiscardUnknown() { 127 xxx_messageInfo_AppendRowsRequest.DiscardUnknown(m) 128} 129 130var xxx_messageInfo_AppendRowsRequest proto.InternalMessageInfo 131 132func (m *AppendRowsRequest) GetWriteStream() string { 133 if m != nil { 134 return m.WriteStream 135 } 136 return "" 137} 138 139func (m *AppendRowsRequest) GetOffset() *wrappers.Int64Value { 140 if m != nil { 141 return m.Offset 142 } 143 return nil 144} 145 146type isAppendRowsRequest_Rows interface { 147 isAppendRowsRequest_Rows() 148} 149 150type AppendRowsRequest_ProtoRows struct { 151 ProtoRows *AppendRowsRequest_ProtoData `protobuf:"bytes,4,opt,name=proto_rows,json=protoRows,proto3,oneof"` 152} 153 154func (*AppendRowsRequest_ProtoRows) isAppendRowsRequest_Rows() {} 155 156func (m *AppendRowsRequest) GetRows() isAppendRowsRequest_Rows { 157 if m != nil { 158 return m.Rows 159 } 160 return nil 161} 162 163func (m *AppendRowsRequest) GetProtoRows() *AppendRowsRequest_ProtoData { 164 if x, ok := m.GetRows().(*AppendRowsRequest_ProtoRows); ok { 165 return x.ProtoRows 166 } 167 return nil 168} 169 170// XXX_OneofWrappers is for the internal use of the proto package. 171func (*AppendRowsRequest) XXX_OneofWrappers() []interface{} { 172 return []interface{}{ 173 (*AppendRowsRequest_ProtoRows)(nil), 174 } 175} 176 177type AppendRowsRequest_ProtoData struct { 178 // Proto schema used to serialize the data. 179 WriterSchema *ProtoSchema `protobuf:"bytes,1,opt,name=writer_schema,json=writerSchema,proto3" json:"writer_schema,omitempty"` 180 // Serialized row data in protobuf message format. 181 Rows *ProtoRows `protobuf:"bytes,2,opt,name=rows,proto3" json:"rows,omitempty"` 182 XXX_NoUnkeyedLiteral struct{} `json:"-"` 183 XXX_unrecognized []byte `json:"-"` 184 XXX_sizecache int32 `json:"-"` 185} 186 187func (m *AppendRowsRequest_ProtoData) Reset() { *m = AppendRowsRequest_ProtoData{} } 188func (m *AppendRowsRequest_ProtoData) String() string { return proto.CompactTextString(m) } 189func (*AppendRowsRequest_ProtoData) ProtoMessage() {} 190func (*AppendRowsRequest_ProtoData) Descriptor() ([]byte, []int) { 191 return fileDescriptor_f4f9d0517c05d712, []int{1, 0} 192} 193 194func (m *AppendRowsRequest_ProtoData) XXX_Unmarshal(b []byte) error { 195 return xxx_messageInfo_AppendRowsRequest_ProtoData.Unmarshal(m, b) 196} 197func (m *AppendRowsRequest_ProtoData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 198 return xxx_messageInfo_AppendRowsRequest_ProtoData.Marshal(b, m, deterministic) 199} 200func (m *AppendRowsRequest_ProtoData) XXX_Merge(src proto.Message) { 201 xxx_messageInfo_AppendRowsRequest_ProtoData.Merge(m, src) 202} 203func (m *AppendRowsRequest_ProtoData) XXX_Size() int { 204 return xxx_messageInfo_AppendRowsRequest_ProtoData.Size(m) 205} 206func (m *AppendRowsRequest_ProtoData) XXX_DiscardUnknown() { 207 xxx_messageInfo_AppendRowsRequest_ProtoData.DiscardUnknown(m) 208} 209 210var xxx_messageInfo_AppendRowsRequest_ProtoData proto.InternalMessageInfo 211 212func (m *AppendRowsRequest_ProtoData) GetWriterSchema() *ProtoSchema { 213 if m != nil { 214 return m.WriterSchema 215 } 216 return nil 217} 218 219func (m *AppendRowsRequest_ProtoData) GetRows() *ProtoRows { 220 if m != nil { 221 return m.Rows 222 } 223 return nil 224} 225 226// Response message for `AppendRows`. 227type AppendRowsResponse struct { 228 // Types that are valid to be assigned to Response: 229 // *AppendRowsResponse_Offset 230 // *AppendRowsResponse_Error 231 Response isAppendRowsResponse_Response `protobuf_oneof:"response"` 232 XXX_NoUnkeyedLiteral struct{} `json:"-"` 233 XXX_unrecognized []byte `json:"-"` 234 XXX_sizecache int32 `json:"-"` 235} 236 237func (m *AppendRowsResponse) Reset() { *m = AppendRowsResponse{} } 238func (m *AppendRowsResponse) String() string { return proto.CompactTextString(m) } 239func (*AppendRowsResponse) ProtoMessage() {} 240func (*AppendRowsResponse) Descriptor() ([]byte, []int) { 241 return fileDescriptor_f4f9d0517c05d712, []int{2} 242} 243 244func (m *AppendRowsResponse) XXX_Unmarshal(b []byte) error { 245 return xxx_messageInfo_AppendRowsResponse.Unmarshal(m, b) 246} 247func (m *AppendRowsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 248 return xxx_messageInfo_AppendRowsResponse.Marshal(b, m, deterministic) 249} 250func (m *AppendRowsResponse) XXX_Merge(src proto.Message) { 251 xxx_messageInfo_AppendRowsResponse.Merge(m, src) 252} 253func (m *AppendRowsResponse) XXX_Size() int { 254 return xxx_messageInfo_AppendRowsResponse.Size(m) 255} 256func (m *AppendRowsResponse) XXX_DiscardUnknown() { 257 xxx_messageInfo_AppendRowsResponse.DiscardUnknown(m) 258} 259 260var xxx_messageInfo_AppendRowsResponse proto.InternalMessageInfo 261 262type isAppendRowsResponse_Response interface { 263 isAppendRowsResponse_Response() 264} 265 266type AppendRowsResponse_Offset struct { 267 Offset int64 `protobuf:"varint,1,opt,name=offset,proto3,oneof"` 268} 269 270type AppendRowsResponse_Error struct { 271 Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3,oneof"` 272} 273 274func (*AppendRowsResponse_Offset) isAppendRowsResponse_Response() {} 275 276func (*AppendRowsResponse_Error) isAppendRowsResponse_Response() {} 277 278func (m *AppendRowsResponse) GetResponse() isAppendRowsResponse_Response { 279 if m != nil { 280 return m.Response 281 } 282 return nil 283} 284 285func (m *AppendRowsResponse) GetOffset() int64 { 286 if x, ok := m.GetResponse().(*AppendRowsResponse_Offset); ok { 287 return x.Offset 288 } 289 return 0 290} 291 292func (m *AppendRowsResponse) GetError() *status.Status { 293 if x, ok := m.GetResponse().(*AppendRowsResponse_Error); ok { 294 return x.Error 295 } 296 return nil 297} 298 299// XXX_OneofWrappers is for the internal use of the proto package. 300func (*AppendRowsResponse) XXX_OneofWrappers() []interface{} { 301 return []interface{}{ 302 (*AppendRowsResponse_Offset)(nil), 303 (*AppendRowsResponse_Error)(nil), 304 } 305} 306 307// Request message for `GetWriteStreamRequest`. 308type GetWriteStreamRequest struct { 309 // Required. Name of the stream to get, in the form of 310 // `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}/streams/{stream_id}`. 311 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 312 XXX_NoUnkeyedLiteral struct{} `json:"-"` 313 XXX_unrecognized []byte `json:"-"` 314 XXX_sizecache int32 `json:"-"` 315} 316 317func (m *GetWriteStreamRequest) Reset() { *m = GetWriteStreamRequest{} } 318func (m *GetWriteStreamRequest) String() string { return proto.CompactTextString(m) } 319func (*GetWriteStreamRequest) ProtoMessage() {} 320func (*GetWriteStreamRequest) Descriptor() ([]byte, []int) { 321 return fileDescriptor_f4f9d0517c05d712, []int{3} 322} 323 324func (m *GetWriteStreamRequest) XXX_Unmarshal(b []byte) error { 325 return xxx_messageInfo_GetWriteStreamRequest.Unmarshal(m, b) 326} 327func (m *GetWriteStreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 328 return xxx_messageInfo_GetWriteStreamRequest.Marshal(b, m, deterministic) 329} 330func (m *GetWriteStreamRequest) XXX_Merge(src proto.Message) { 331 xxx_messageInfo_GetWriteStreamRequest.Merge(m, src) 332} 333func (m *GetWriteStreamRequest) XXX_Size() int { 334 return xxx_messageInfo_GetWriteStreamRequest.Size(m) 335} 336func (m *GetWriteStreamRequest) XXX_DiscardUnknown() { 337 xxx_messageInfo_GetWriteStreamRequest.DiscardUnknown(m) 338} 339 340var xxx_messageInfo_GetWriteStreamRequest proto.InternalMessageInfo 341 342func (m *GetWriteStreamRequest) GetName() string { 343 if m != nil { 344 return m.Name 345 } 346 return "" 347} 348 349// Request message for `BatchCommitWriteStreams`. 350type BatchCommitWriteStreamsRequest struct { 351 // Required. Parent table that all the streams should belong to, in the form of 352 // `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}`. 353 Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` 354 // Required. The group of streams that will be committed atomically. 355 WriteStreams []string `protobuf:"bytes,2,rep,name=write_streams,json=writeStreams,proto3" json:"write_streams,omitempty"` 356 XXX_NoUnkeyedLiteral struct{} `json:"-"` 357 XXX_unrecognized []byte `json:"-"` 358 XXX_sizecache int32 `json:"-"` 359} 360 361func (m *BatchCommitWriteStreamsRequest) Reset() { *m = BatchCommitWriteStreamsRequest{} } 362func (m *BatchCommitWriteStreamsRequest) String() string { return proto.CompactTextString(m) } 363func (*BatchCommitWriteStreamsRequest) ProtoMessage() {} 364func (*BatchCommitWriteStreamsRequest) Descriptor() ([]byte, []int) { 365 return fileDescriptor_f4f9d0517c05d712, []int{4} 366} 367 368func (m *BatchCommitWriteStreamsRequest) XXX_Unmarshal(b []byte) error { 369 return xxx_messageInfo_BatchCommitWriteStreamsRequest.Unmarshal(m, b) 370} 371func (m *BatchCommitWriteStreamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 372 return xxx_messageInfo_BatchCommitWriteStreamsRequest.Marshal(b, m, deterministic) 373} 374func (m *BatchCommitWriteStreamsRequest) XXX_Merge(src proto.Message) { 375 xxx_messageInfo_BatchCommitWriteStreamsRequest.Merge(m, src) 376} 377func (m *BatchCommitWriteStreamsRequest) XXX_Size() int { 378 return xxx_messageInfo_BatchCommitWriteStreamsRequest.Size(m) 379} 380func (m *BatchCommitWriteStreamsRequest) XXX_DiscardUnknown() { 381 xxx_messageInfo_BatchCommitWriteStreamsRequest.DiscardUnknown(m) 382} 383 384var xxx_messageInfo_BatchCommitWriteStreamsRequest proto.InternalMessageInfo 385 386func (m *BatchCommitWriteStreamsRequest) GetParent() string { 387 if m != nil { 388 return m.Parent 389 } 390 return "" 391} 392 393func (m *BatchCommitWriteStreamsRequest) GetWriteStreams() []string { 394 if m != nil { 395 return m.WriteStreams 396 } 397 return nil 398} 399 400// Response message for `BatchCommitWriteStreams`. 401type BatchCommitWriteStreamsResponse struct { 402 // The time at which streams were committed in microseconds granularity. 403 CommitTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=commit_time,json=commitTime,proto3" json:"commit_time,omitempty"` 404 XXX_NoUnkeyedLiteral struct{} `json:"-"` 405 XXX_unrecognized []byte `json:"-"` 406 XXX_sizecache int32 `json:"-"` 407} 408 409func (m *BatchCommitWriteStreamsResponse) Reset() { *m = BatchCommitWriteStreamsResponse{} } 410func (m *BatchCommitWriteStreamsResponse) String() string { return proto.CompactTextString(m) } 411func (*BatchCommitWriteStreamsResponse) ProtoMessage() {} 412func (*BatchCommitWriteStreamsResponse) Descriptor() ([]byte, []int) { 413 return fileDescriptor_f4f9d0517c05d712, []int{5} 414} 415 416func (m *BatchCommitWriteStreamsResponse) XXX_Unmarshal(b []byte) error { 417 return xxx_messageInfo_BatchCommitWriteStreamsResponse.Unmarshal(m, b) 418} 419func (m *BatchCommitWriteStreamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 420 return xxx_messageInfo_BatchCommitWriteStreamsResponse.Marshal(b, m, deterministic) 421} 422func (m *BatchCommitWriteStreamsResponse) XXX_Merge(src proto.Message) { 423 xxx_messageInfo_BatchCommitWriteStreamsResponse.Merge(m, src) 424} 425func (m *BatchCommitWriteStreamsResponse) XXX_Size() int { 426 return xxx_messageInfo_BatchCommitWriteStreamsResponse.Size(m) 427} 428func (m *BatchCommitWriteStreamsResponse) XXX_DiscardUnknown() { 429 xxx_messageInfo_BatchCommitWriteStreamsResponse.DiscardUnknown(m) 430} 431 432var xxx_messageInfo_BatchCommitWriteStreamsResponse proto.InternalMessageInfo 433 434func (m *BatchCommitWriteStreamsResponse) GetCommitTime() *timestamp.Timestamp { 435 if m != nil { 436 return m.CommitTime 437 } 438 return nil 439} 440 441// Request message for invoking `FinalizeWriteStream`. 442type FinalizeWriteStreamRequest struct { 443 // Required. Name of the stream to finalize, in the form of 444 // `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}/streams/{stream_id}`. 445 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 446 XXX_NoUnkeyedLiteral struct{} `json:"-"` 447 XXX_unrecognized []byte `json:"-"` 448 XXX_sizecache int32 `json:"-"` 449} 450 451func (m *FinalizeWriteStreamRequest) Reset() { *m = FinalizeWriteStreamRequest{} } 452func (m *FinalizeWriteStreamRequest) String() string { return proto.CompactTextString(m) } 453func (*FinalizeWriteStreamRequest) ProtoMessage() {} 454func (*FinalizeWriteStreamRequest) Descriptor() ([]byte, []int) { 455 return fileDescriptor_f4f9d0517c05d712, []int{6} 456} 457 458func (m *FinalizeWriteStreamRequest) XXX_Unmarshal(b []byte) error { 459 return xxx_messageInfo_FinalizeWriteStreamRequest.Unmarshal(m, b) 460} 461func (m *FinalizeWriteStreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 462 return xxx_messageInfo_FinalizeWriteStreamRequest.Marshal(b, m, deterministic) 463} 464func (m *FinalizeWriteStreamRequest) XXX_Merge(src proto.Message) { 465 xxx_messageInfo_FinalizeWriteStreamRequest.Merge(m, src) 466} 467func (m *FinalizeWriteStreamRequest) XXX_Size() int { 468 return xxx_messageInfo_FinalizeWriteStreamRequest.Size(m) 469} 470func (m *FinalizeWriteStreamRequest) XXX_DiscardUnknown() { 471 xxx_messageInfo_FinalizeWriteStreamRequest.DiscardUnknown(m) 472} 473 474var xxx_messageInfo_FinalizeWriteStreamRequest proto.InternalMessageInfo 475 476func (m *FinalizeWriteStreamRequest) GetName() string { 477 if m != nil { 478 return m.Name 479 } 480 return "" 481} 482 483// Response message for `FinalizeWriteStream`. 484type FinalizeWriteStreamResponse struct { 485 // Number of rows in the finalized stream. 486 RowCount int64 `protobuf:"varint,1,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"` 487 XXX_NoUnkeyedLiteral struct{} `json:"-"` 488 XXX_unrecognized []byte `json:"-"` 489 XXX_sizecache int32 `json:"-"` 490} 491 492func (m *FinalizeWriteStreamResponse) Reset() { *m = FinalizeWriteStreamResponse{} } 493func (m *FinalizeWriteStreamResponse) String() string { return proto.CompactTextString(m) } 494func (*FinalizeWriteStreamResponse) ProtoMessage() {} 495func (*FinalizeWriteStreamResponse) Descriptor() ([]byte, []int) { 496 return fileDescriptor_f4f9d0517c05d712, []int{7} 497} 498 499func (m *FinalizeWriteStreamResponse) XXX_Unmarshal(b []byte) error { 500 return xxx_messageInfo_FinalizeWriteStreamResponse.Unmarshal(m, b) 501} 502func (m *FinalizeWriteStreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 503 return xxx_messageInfo_FinalizeWriteStreamResponse.Marshal(b, m, deterministic) 504} 505func (m *FinalizeWriteStreamResponse) XXX_Merge(src proto.Message) { 506 xxx_messageInfo_FinalizeWriteStreamResponse.Merge(m, src) 507} 508func (m *FinalizeWriteStreamResponse) XXX_Size() int { 509 return xxx_messageInfo_FinalizeWriteStreamResponse.Size(m) 510} 511func (m *FinalizeWriteStreamResponse) XXX_DiscardUnknown() { 512 xxx_messageInfo_FinalizeWriteStreamResponse.DiscardUnknown(m) 513} 514 515var xxx_messageInfo_FinalizeWriteStreamResponse proto.InternalMessageInfo 516 517func (m *FinalizeWriteStreamResponse) GetRowCount() int64 { 518 if m != nil { 519 return m.RowCount 520 } 521 return 0 522} 523 524func init() { 525 proto.RegisterType((*CreateWriteStreamRequest)(nil), "google.cloud.bigquery.storage.v1alpha2.CreateWriteStreamRequest") 526 proto.RegisterType((*AppendRowsRequest)(nil), "google.cloud.bigquery.storage.v1alpha2.AppendRowsRequest") 527 proto.RegisterType((*AppendRowsRequest_ProtoData)(nil), "google.cloud.bigquery.storage.v1alpha2.AppendRowsRequest.ProtoData") 528 proto.RegisterType((*AppendRowsResponse)(nil), "google.cloud.bigquery.storage.v1alpha2.AppendRowsResponse") 529 proto.RegisterType((*GetWriteStreamRequest)(nil), "google.cloud.bigquery.storage.v1alpha2.GetWriteStreamRequest") 530 proto.RegisterType((*BatchCommitWriteStreamsRequest)(nil), "google.cloud.bigquery.storage.v1alpha2.BatchCommitWriteStreamsRequest") 531 proto.RegisterType((*BatchCommitWriteStreamsResponse)(nil), "google.cloud.bigquery.storage.v1alpha2.BatchCommitWriteStreamsResponse") 532 proto.RegisterType((*FinalizeWriteStreamRequest)(nil), "google.cloud.bigquery.storage.v1alpha2.FinalizeWriteStreamRequest") 533 proto.RegisterType((*FinalizeWriteStreamResponse)(nil), "google.cloud.bigquery.storage.v1alpha2.FinalizeWriteStreamResponse") 534} 535 536func init() { 537 proto.RegisterFile("google/cloud/bigquery/storage/v1alpha2/storage.proto", fileDescriptor_f4f9d0517c05d712) 538} 539 540var fileDescriptor_f4f9d0517c05d712 = []byte{ 541 // 886 bytes of a gzipped FileDescriptorProto 542 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, 543 0x14, 0xcf, 0xc4, 0x21, 0x6a, 0x5e, 0x5a, 0xa4, 0x0e, 0x42, 0xb1, 0xd6, 0x28, 0xad, 0xf6, 0x50, 544 0x45, 0x16, 0xec, 0x36, 0x49, 0x5b, 0x91, 0x94, 0x22, 0x6c, 0x97, 0x34, 0x48, 0x20, 0xc1, 0x06, 545 0x01, 0x02, 0x09, 0x6b, 0xbc, 0x1e, 0xaf, 0x17, 0xed, 0xee, 0x4c, 0x67, 0x66, 0xbb, 0x2a, 0x15, 546 0x07, 0xb8, 0x72, 0x03, 0x3e, 0x06, 0x07, 0x3e, 0x06, 0xea, 0x11, 0xc4, 0x9d, 0x43, 0xf9, 0x1e, 547 0x68, 0x67, 0x67, 0xed, 0xc5, 0xb1, 0xc9, 0xda, 0xe9, 0x2d, 0x9e, 0xf7, 0x7e, 0xef, 0xfd, 0x7e, 548 0xef, 0x5f, 0x16, 0xee, 0x04, 0x8c, 0x05, 0x11, 0x75, 0xfd, 0x88, 0xa5, 0x43, 0x77, 0x10, 0x06, 549 0x8f, 0x53, 0x2a, 0x9e, 0xba, 0x52, 0x31, 0x41, 0x02, 0xea, 0x3e, 0xd9, 0x27, 0x11, 0x1f, 0x93, 550 0x83, 0xf2, 0xc1, 0xe1, 0x82, 0x29, 0x86, 0x6f, 0x15, 0x28, 0x47, 0xa3, 0x9c, 0x12, 0xe5, 0x94, 551 0x4e, 0x25, 0xca, 0x7a, 0xc3, 0x44, 0x27, 0x3c, 0x74, 0x49, 0x92, 0x30, 0x45, 0x54, 0xc8, 0x12, 552 0x59, 0x44, 0xb1, 0x76, 0x2a, 0x56, 0x3f, 0x0a, 0x69, 0xa2, 0x8c, 0xe1, 0x46, 0xc5, 0x30, 0x0a, 553 0x69, 0x34, 0xec, 0x0f, 0xe8, 0x98, 0x3c, 0x09, 0x99, 0x30, 0x0e, 0x77, 0x6b, 0xb2, 0xd6, 0xde, 554 0x83, 0x74, 0x64, 0x60, 0x87, 0xb5, 0xc5, 0x0a, 0x4a, 0x62, 0x03, 0x6a, 0x19, 0x50, 0x19, 0xcb, 555 0xa5, 0x31, 0x57, 0x4f, 0x67, 0x98, 0x4e, 0x8c, 0x2a, 0x8c, 0xa9, 0x54, 0x24, 0xe6, 0xc6, 0x61, 556 0x77, 0xd6, 0x21, 0x13, 0x84, 0x73, 0x2a, 0x66, 0x6b, 0x20, 0xb8, 0xef, 0x4a, 0x45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, 0xbf, 0x76, 0xd6, 0x6f, 0xe8, 0x79, 0x67, 0xb7, 0xcc, 0x5c, 591 0x26, 0x2e, 0x68, 0x11, 0x1e, 0x4a, 0xc7, 0x67, 0xf1, 0x1f, 0x9d, 0x1f, 0xd1, 0x58, 0x29, 0x2e, 592 0x8f, 0x5d, 0x37, 0xcb, 0xb2, 0x19, 0xab, 0x4b, 0x52, 0x35, 0x9e, 0x7c, 0x37, 0xbd, 0x59, 0xd7, 593 0xd1, 0x09, 0x13, 0x49, 0x85, 0xca, 0x39, 0x5d, 0x88, 0xd1, 0xe5, 0x79, 0x8b, 0x47, 0x44, 0x8d, 594 0x98, 0x88, 0xbb, 0xcf, 0xa0, 0xed, 0xb3, 0xb8, 0x66, 0xed, 0xbe, 0xfc, 0xc8, 0xf8, 0x05, 0x2c, 595 0x22, 0x49, 0xe0, 0x30, 0x11, 0xb8, 0x01, 0x4d, 0xf4, 0x65, 0x77, 0xa7, 0xc9, 0x2e, 0xfa, 0xfc, 596 0xbb, 0x6f, 0x1e, 0x06, 0x9b, 0x1a, 0x79, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xc7, 597 0x14, 0x8b, 0x24, 0x0b, 0x00, 0x00, 598} 599 600// Reference imports to suppress errors if they are not otherwise used. 601var _ context.Context 602var _ grpc.ClientConnInterface 603 604// This is a compile-time assertion to ensure that this generated file 605// is compatible with the grpc package it is being compiled against. 606const _ = grpc.SupportPackageIsVersion6 607 608// BigQueryWriteClient is the client API for BigQueryWrite service. 609// 610// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 611type BigQueryWriteClient interface { 612 // Creates a write stream to the given table. 613 CreateWriteStream(ctx context.Context, in *CreateWriteStreamRequest, opts ...grpc.CallOption) (*WriteStream, error) 614 // Appends data to the given stream. 615 // 616 // If `offset` is specified, the `offset` is checked against the end of 617 // stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an 618 // attempt is made to append to an offset beyond the current end of the stream 619 // or `ALREADY_EXISTS` if user provids an `offset` that has already been 620 // written to. User can retry with adjusted offset within the same RPC 621 // stream. If `offset` is not specified, append happens at the end of the 622 // stream. 623 // 624 // The response contains the offset at which the append happened. Responses 625 // are received in the same order in which requests are sent. There will be 626 // one response for each successful request. If the `offset` is not set in 627 // response, it means append didn't happen due to some errors. If one request 628 // fails, all the subsequent requests will also fail until a success request 629 // is made again. 630 // 631 // If the stream is of `PENDING` type, data will only be available for read 632 // operations after the stream is committed. 633 AppendRows(ctx context.Context, opts ...grpc.CallOption) (BigQueryWrite_AppendRowsClient, error) 634 // Gets a write stream. 635 GetWriteStream(ctx context.Context, in *GetWriteStreamRequest, opts ...grpc.CallOption) (*WriteStream, error) 636 // Finalize a write stream so that no new data can be appended to the 637 // stream. 638 FinalizeWriteStream(ctx context.Context, in *FinalizeWriteStreamRequest, opts ...grpc.CallOption) (*FinalizeWriteStreamResponse, error) 639 // Atomically commits a group of `PENDING` streams that belong to the same 640 // `parent` table. 641 // Streams must be finalized before commit and cannot be committed multiple 642 // times. Once a stream is committed, data in the stream becomes available 643 // for read operations. 644 BatchCommitWriteStreams(ctx context.Context, in *BatchCommitWriteStreamsRequest, opts ...grpc.CallOption) (*BatchCommitWriteStreamsResponse, error) 645} 646 647type bigQueryWriteClient struct { 648 cc grpc.ClientConnInterface 649} 650 651func NewBigQueryWriteClient(cc grpc.ClientConnInterface) BigQueryWriteClient { 652 return &bigQueryWriteClient{cc} 653} 654 655func (c *bigQueryWriteClient) CreateWriteStream(ctx context.Context, in *CreateWriteStreamRequest, opts ...grpc.CallOption) (*WriteStream, error) { 656 out := new(WriteStream) 657 err := c.cc.Invoke(ctx, "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/CreateWriteStream", in, out, opts...) 658 if err != nil { 659 return nil, err 660 } 661 return out, nil 662} 663 664func (c *bigQueryWriteClient) AppendRows(ctx context.Context, opts ...grpc.CallOption) (BigQueryWrite_AppendRowsClient, error) { 665 stream, err := c.cc.NewStream(ctx, &_BigQueryWrite_serviceDesc.Streams[0], "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/AppendRows", opts...) 666 if err != nil { 667 return nil, err 668 } 669 x := &bigQueryWriteAppendRowsClient{stream} 670 return x, nil 671} 672 673type BigQueryWrite_AppendRowsClient interface { 674 Send(*AppendRowsRequest) error 675 Recv() (*AppendRowsResponse, error) 676 grpc.ClientStream 677} 678 679type bigQueryWriteAppendRowsClient struct { 680 grpc.ClientStream 681} 682 683func (x *bigQueryWriteAppendRowsClient) Send(m *AppendRowsRequest) error { 684 return x.ClientStream.SendMsg(m) 685} 686 687func (x *bigQueryWriteAppendRowsClient) Recv() (*AppendRowsResponse, error) { 688 m := new(AppendRowsResponse) 689 if err := x.ClientStream.RecvMsg(m); err != nil { 690 return nil, err 691 } 692 return m, nil 693} 694 695func (c *bigQueryWriteClient) GetWriteStream(ctx context.Context, in *GetWriteStreamRequest, opts ...grpc.CallOption) (*WriteStream, error) { 696 out := new(WriteStream) 697 err := c.cc.Invoke(ctx, "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/GetWriteStream", in, out, opts...) 698 if err != nil { 699 return nil, err 700 } 701 return out, nil 702} 703 704func (c *bigQueryWriteClient) FinalizeWriteStream(ctx context.Context, in *FinalizeWriteStreamRequest, opts ...grpc.CallOption) (*FinalizeWriteStreamResponse, error) { 705 out := new(FinalizeWriteStreamResponse) 706 err := c.cc.Invoke(ctx, "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/FinalizeWriteStream", in, out, opts...) 707 if err != nil { 708 return nil, err 709 } 710 return out, nil 711} 712 713func (c *bigQueryWriteClient) BatchCommitWriteStreams(ctx context.Context, in *BatchCommitWriteStreamsRequest, opts ...grpc.CallOption) (*BatchCommitWriteStreamsResponse, error) { 714 out := new(BatchCommitWriteStreamsResponse) 715 err := c.cc.Invoke(ctx, "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/BatchCommitWriteStreams", in, out, opts...) 716 if err != nil { 717 return nil, err 718 } 719 return out, nil 720} 721 722// BigQueryWriteServer is the server API for BigQueryWrite service. 723type BigQueryWriteServer interface { 724 // Creates a write stream to the given table. 725 CreateWriteStream(context.Context, *CreateWriteStreamRequest) (*WriteStream, error) 726 // Appends data to the given stream. 727 // 728 // If `offset` is specified, the `offset` is checked against the end of 729 // stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an 730 // attempt is made to append to an offset beyond the current end of the stream 731 // or `ALREADY_EXISTS` if user provids an `offset` that has already been 732 // written to. User can retry with adjusted offset within the same RPC 733 // stream. If `offset` is not specified, append happens at the end of the 734 // stream. 735 // 736 // The response contains the offset at which the append happened. Responses 737 // are received in the same order in which requests are sent. There will be 738 // one response for each successful request. If the `offset` is not set in 739 // response, it means append didn't happen due to some errors. If one request 740 // fails, all the subsequent requests will also fail until a success request 741 // is made again. 742 // 743 // If the stream is of `PENDING` type, data will only be available for read 744 // operations after the stream is committed. 745 AppendRows(BigQueryWrite_AppendRowsServer) error 746 // Gets a write stream. 747 GetWriteStream(context.Context, *GetWriteStreamRequest) (*WriteStream, error) 748 // Finalize a write stream so that no new data can be appended to the 749 // stream. 750 FinalizeWriteStream(context.Context, *FinalizeWriteStreamRequest) (*FinalizeWriteStreamResponse, error) 751 // Atomically commits a group of `PENDING` streams that belong to the same 752 // `parent` table. 753 // Streams must be finalized before commit and cannot be committed multiple 754 // times. Once a stream is committed, data in the stream becomes available 755 // for read operations. 756 BatchCommitWriteStreams(context.Context, *BatchCommitWriteStreamsRequest) (*BatchCommitWriteStreamsResponse, error) 757} 758 759// UnimplementedBigQueryWriteServer can be embedded to have forward compatible implementations. 760type UnimplementedBigQueryWriteServer struct { 761} 762 763func (*UnimplementedBigQueryWriteServer) CreateWriteStream(ctx context.Context, req *CreateWriteStreamRequest) (*WriteStream, error) { 764 return nil, status1.Errorf(codes.Unimplemented, "method CreateWriteStream not implemented") 765} 766func (*UnimplementedBigQueryWriteServer) AppendRows(srv BigQueryWrite_AppendRowsServer) error { 767 return status1.Errorf(codes.Unimplemented, "method AppendRows not implemented") 768} 769func (*UnimplementedBigQueryWriteServer) GetWriteStream(ctx context.Context, req *GetWriteStreamRequest) (*WriteStream, error) { 770 return nil, status1.Errorf(codes.Unimplemented, "method GetWriteStream not implemented") 771} 772func (*UnimplementedBigQueryWriteServer) FinalizeWriteStream(ctx context.Context, req *FinalizeWriteStreamRequest) (*FinalizeWriteStreamResponse, error) { 773 return nil, status1.Errorf(codes.Unimplemented, "method FinalizeWriteStream not implemented") 774} 775func (*UnimplementedBigQueryWriteServer) BatchCommitWriteStreams(ctx context.Context, req *BatchCommitWriteStreamsRequest) (*BatchCommitWriteStreamsResponse, error) { 776 return nil, status1.Errorf(codes.Unimplemented, "method BatchCommitWriteStreams not implemented") 777} 778 779func RegisterBigQueryWriteServer(s *grpc.Server, srv BigQueryWriteServer) { 780 s.RegisterService(&_BigQueryWrite_serviceDesc, srv) 781} 782 783func _BigQueryWrite_CreateWriteStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 784 in := new(CreateWriteStreamRequest) 785 if err := dec(in); err != nil { 786 return nil, err 787 } 788 if interceptor == nil { 789 return srv.(BigQueryWriteServer).CreateWriteStream(ctx, in) 790 } 791 info := &grpc.UnaryServerInfo{ 792 Server: srv, 793 FullMethod: "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/CreateWriteStream", 794 } 795 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 796 return srv.(BigQueryWriteServer).CreateWriteStream(ctx, req.(*CreateWriteStreamRequest)) 797 } 798 return interceptor(ctx, in, info, handler) 799} 800 801func _BigQueryWrite_AppendRows_Handler(srv interface{}, stream grpc.ServerStream) error { 802 return srv.(BigQueryWriteServer).AppendRows(&bigQueryWriteAppendRowsServer{stream}) 803} 804 805type BigQueryWrite_AppendRowsServer interface { 806 Send(*AppendRowsResponse) error 807 Recv() (*AppendRowsRequest, error) 808 grpc.ServerStream 809} 810 811type bigQueryWriteAppendRowsServer struct { 812 grpc.ServerStream 813} 814 815func (x *bigQueryWriteAppendRowsServer) Send(m *AppendRowsResponse) error { 816 return x.ServerStream.SendMsg(m) 817} 818 819func (x *bigQueryWriteAppendRowsServer) Recv() (*AppendRowsRequest, error) { 820 m := new(AppendRowsRequest) 821 if err := x.ServerStream.RecvMsg(m); err != nil { 822 return nil, err 823 } 824 return m, nil 825} 826 827func _BigQueryWrite_GetWriteStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 828 in := new(GetWriteStreamRequest) 829 if err := dec(in); err != nil { 830 return nil, err 831 } 832 if interceptor == nil { 833 return srv.(BigQueryWriteServer).GetWriteStream(ctx, in) 834 } 835 info := &grpc.UnaryServerInfo{ 836 Server: srv, 837 FullMethod: "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/GetWriteStream", 838 } 839 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 840 return srv.(BigQueryWriteServer).GetWriteStream(ctx, req.(*GetWriteStreamRequest)) 841 } 842 return interceptor(ctx, in, info, handler) 843} 844 845func _BigQueryWrite_FinalizeWriteStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 846 in := new(FinalizeWriteStreamRequest) 847 if err := dec(in); err != nil { 848 return nil, err 849 } 850 if interceptor == nil { 851 return srv.(BigQueryWriteServer).FinalizeWriteStream(ctx, in) 852 } 853 info := &grpc.UnaryServerInfo{ 854 Server: srv, 855 FullMethod: "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/FinalizeWriteStream", 856 } 857 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 858 return srv.(BigQueryWriteServer).FinalizeWriteStream(ctx, req.(*FinalizeWriteStreamRequest)) 859 } 860 return interceptor(ctx, in, info, handler) 861} 862 863func _BigQueryWrite_BatchCommitWriteStreams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 864 in := new(BatchCommitWriteStreamsRequest) 865 if err := dec(in); err != nil { 866 return nil, err 867 } 868 if interceptor == nil { 869 return srv.(BigQueryWriteServer).BatchCommitWriteStreams(ctx, in) 870 } 871 info := &grpc.UnaryServerInfo{ 872 Server: srv, 873 FullMethod: "/google.cloud.bigquery.storage.v1alpha2.BigQueryWrite/BatchCommitWriteStreams", 874 } 875 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 876 return srv.(BigQueryWriteServer).BatchCommitWriteStreams(ctx, req.(*BatchCommitWriteStreamsRequest)) 877 } 878 return interceptor(ctx, in, info, handler) 879} 880 881var _BigQueryWrite_serviceDesc = grpc.ServiceDesc{ 882 ServiceName: "google.cloud.bigquery.storage.v1alpha2.BigQueryWrite", 883 HandlerType: (*BigQueryWriteServer)(nil), 884 Methods: []grpc.MethodDesc{ 885 { 886 MethodName: "CreateWriteStream", 887 Handler: _BigQueryWrite_CreateWriteStream_Handler, 888 }, 889 { 890 MethodName: "GetWriteStream", 891 Handler: _BigQueryWrite_GetWriteStream_Handler, 892 }, 893 { 894 MethodName: "FinalizeWriteStream", 895 Handler: _BigQueryWrite_FinalizeWriteStream_Handler, 896 }, 897 { 898 MethodName: "BatchCommitWriteStreams", 899 Handler: _BigQueryWrite_BatchCommitWriteStreams_Handler, 900 }, 901 }, 902 Streams: []grpc.StreamDesc{ 903 { 904 StreamName: "AppendRows", 905 Handler: _BigQueryWrite_AppendRows_Handler, 906 ServerStreams: true, 907 ClientStreams: true, 908 }, 909 }, 910 Metadata: "google/cloud/bigquery/storage/v1alpha2/storage.proto", 911} 912