/usr/share/gocode/src/google.golang.org/genproto/googleapis/firestore/v1beta1/query.pb.go is in golang-google-genproto-dev 0.0~git20171123.7f0da29-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | // Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/query.proto
package firestore
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf3 "github.com/golang/protobuf/ptypes/wrappers"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// A sort direction.
type StructuredQuery_Direction int32
const (
// Unspecified.
StructuredQuery_DIRECTION_UNSPECIFIED StructuredQuery_Direction = 0
// Ascending.
StructuredQuery_ASCENDING StructuredQuery_Direction = 1
// Descending.
StructuredQuery_DESCENDING StructuredQuery_Direction = 2
)
var StructuredQuery_Direction_name = map[int32]string{
0: "DIRECTION_UNSPECIFIED",
1: "ASCENDING",
2: "DESCENDING",
}
var StructuredQuery_Direction_value = map[string]int32{
"DIRECTION_UNSPECIFIED": 0,
"ASCENDING": 1,
"DESCENDING": 2,
}
func (x StructuredQuery_Direction) String() string {
return proto.EnumName(StructuredQuery_Direction_name, int32(x))
}
func (StructuredQuery_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} }
// A composite filter operator.
type StructuredQuery_CompositeFilter_Operator int32
const (
// Unspecified. This value must not be used.
StructuredQuery_CompositeFilter_OPERATOR_UNSPECIFIED StructuredQuery_CompositeFilter_Operator = 0
// The results are required to satisfy each of the combined filters.
StructuredQuery_CompositeFilter_AND StructuredQuery_CompositeFilter_Operator = 1
)
var StructuredQuery_CompositeFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
1: "AND",
}
var StructuredQuery_CompositeFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"AND": 1,
}
func (x StructuredQuery_CompositeFilter_Operator) String() string {
return proto.EnumName(StructuredQuery_CompositeFilter_Operator_name, int32(x))
}
func (StructuredQuery_CompositeFilter_Operator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 2, 0}
}
// A field filter operator.
type StructuredQuery_FieldFilter_Operator int32
const (
// Unspecified. This value must not be used.
StructuredQuery_FieldFilter_OPERATOR_UNSPECIFIED StructuredQuery_FieldFilter_Operator = 0
// Less than. Requires that the field come first in `order_by`.
StructuredQuery_FieldFilter_LESS_THAN StructuredQuery_FieldFilter_Operator = 1
// Less than or equal. Requires that the field come first in `order_by`.
StructuredQuery_FieldFilter_LESS_THAN_OR_EQUAL StructuredQuery_FieldFilter_Operator = 2
// Greater than. Requires that the field come first in `order_by`.
StructuredQuery_FieldFilter_GREATER_THAN StructuredQuery_FieldFilter_Operator = 3
// Greater than or equal. Requires that the field come first in
// `order_by`.
StructuredQuery_FieldFilter_GREATER_THAN_OR_EQUAL StructuredQuery_FieldFilter_Operator = 4
// Equal.
StructuredQuery_FieldFilter_EQUAL StructuredQuery_FieldFilter_Operator = 5
)
var StructuredQuery_FieldFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
1: "LESS_THAN",
2: "LESS_THAN_OR_EQUAL",
3: "GREATER_THAN",
4: "GREATER_THAN_OR_EQUAL",
5: "EQUAL",
}
var StructuredQuery_FieldFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"LESS_THAN": 1,
"LESS_THAN_OR_EQUAL": 2,
"GREATER_THAN": 3,
"GREATER_THAN_OR_EQUAL": 4,
"EQUAL": 5,
}
func (x StructuredQuery_FieldFilter_Operator) String() string {
return proto.EnumName(StructuredQuery_FieldFilter_Operator_name, int32(x))
}
func (StructuredQuery_FieldFilter_Operator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 3, 0}
}
// A unary operator.
type StructuredQuery_UnaryFilter_Operator int32
const (
// Unspecified. This value must not be used.
StructuredQuery_UnaryFilter_OPERATOR_UNSPECIFIED StructuredQuery_UnaryFilter_Operator = 0
// Test if a field is equal to NaN.
StructuredQuery_UnaryFilter_IS_NAN StructuredQuery_UnaryFilter_Operator = 2
// Test if an exprestion evaluates to Null.
StructuredQuery_UnaryFilter_IS_NULL StructuredQuery_UnaryFilter_Operator = 3
)
var StructuredQuery_UnaryFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
2: "IS_NAN",
3: "IS_NULL",
}
var StructuredQuery_UnaryFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"IS_NAN": 2,
"IS_NULL": 3,
}
func (x StructuredQuery_UnaryFilter_Operator) String() string {
return proto.EnumName(StructuredQuery_UnaryFilter_Operator_name, int32(x))
}
func (StructuredQuery_UnaryFilter_Operator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 4, 0}
}
// A Firestore query.
type StructuredQuery struct {
// The projection to return.
Select *StructuredQuery_Projection `protobuf:"bytes,1,opt,name=select" json:"select,omitempty"`
// The collections to query.
From []*StructuredQuery_CollectionSelector `protobuf:"bytes,2,rep,name=from" json:"from,omitempty"`
// The filter to apply.
Where *StructuredQuery_Filter `protobuf:"bytes,3,opt,name=where" json:"where,omitempty"`
// The order to apply to the query results.
//
// Firestore guarantees a stable ordering through the following rules:
//
// * Any field required to appear in `order_by`, that is not already
// specified in `order_by`, is appended to the order in field name order
// by default.
// * If an order on `__name__` is not specified, it is appended by default.
//
// Fields are appended with the same sort direction as the last order
// specified, or 'ASCENDING' if no order was specified. For example:
//
// * `SELECT * FROM Foo ORDER BY A` becomes
// `SELECT * FROM Foo ORDER BY A, __name__`
// * `SELECT * FROM Foo ORDER BY A DESC` becomes
// `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
// * `SELECT * FROM Foo WHERE A > 1` becomes
// `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
OrderBy []*StructuredQuery_Order `protobuf:"bytes,4,rep,name=order_by,json=orderBy" json:"order_by,omitempty"`
// A starting point for the query results.
StartAt *Cursor `protobuf:"bytes,7,opt,name=start_at,json=startAt" json:"start_at,omitempty"`
// A end point for the query results.
EndAt *Cursor `protobuf:"bytes,8,opt,name=end_at,json=endAt" json:"end_at,omitempty"`
// The number of results to skip.
//
// Applies before limit, but after all other constraints. Must be >= 0 if
// specified.
Offset int32 `protobuf:"varint,6,opt,name=offset" json:"offset,omitempty"`
// The maximum number of results to return.
//
// Applies after all other constraints.
// Must be >= 0 if specified.
Limit *google_protobuf3.Int32Value `protobuf:"bytes,5,opt,name=limit" json:"limit,omitempty"`
}
func (m *StructuredQuery) Reset() { *m = StructuredQuery{} }
func (m *StructuredQuery) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery) ProtoMessage() {}
func (*StructuredQuery) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *StructuredQuery) GetSelect() *StructuredQuery_Projection {
if m != nil {
return m.Select
}
return nil
}
func (m *StructuredQuery) GetFrom() []*StructuredQuery_CollectionSelector {
if m != nil {
return m.From
}
return nil
}
func (m *StructuredQuery) GetWhere() *StructuredQuery_Filter {
if m != nil {
return m.Where
}
return nil
}
func (m *StructuredQuery) GetOrderBy() []*StructuredQuery_Order {
if m != nil {
return m.OrderBy
}
return nil
}
func (m *StructuredQuery) GetStartAt() *Cursor {
if m != nil {
return m.StartAt
}
return nil
}
func (m *StructuredQuery) GetEndAt() *Cursor {
if m != nil {
return m.EndAt
}
return nil
}
func (m *StructuredQuery) GetOffset() int32 {
if m != nil {
return m.Offset
}
return 0
}
func (m *StructuredQuery) GetLimit() *google_protobuf3.Int32Value {
if m != nil {
return m.Limit
}
return nil
}
// A selection of a collection, such as `messages as m1`.
type StructuredQuery_CollectionSelector struct {
// The collection ID.
// When set, selects only collections with this ID.
CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId" json:"collection_id,omitempty"`
// When false, selects only collections that are immediate children of
// the `parent` specified in the containing `RunQueryRequest`.
// When true, selects all descendant collections.
AllDescendants bool `protobuf:"varint,3,opt,name=all_descendants,json=allDescendants" json:"all_descendants,omitempty"`
}
func (m *StructuredQuery_CollectionSelector) Reset() { *m = StructuredQuery_CollectionSelector{} }
func (m *StructuredQuery_CollectionSelector) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_CollectionSelector) ProtoMessage() {}
func (*StructuredQuery_CollectionSelector) Descriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 0}
}
func (m *StructuredQuery_CollectionSelector) GetCollectionId() string {
if m != nil {
return m.CollectionId
}
return ""
}
func (m *StructuredQuery_CollectionSelector) GetAllDescendants() bool {
if m != nil {
return m.AllDescendants
}
return false
}
// A filter.
type StructuredQuery_Filter struct {
// The type of filter.
//
// Types that are valid to be assigned to FilterType:
// *StructuredQuery_Filter_CompositeFilter
// *StructuredQuery_Filter_FieldFilter
// *StructuredQuery_Filter_UnaryFilter
FilterType isStructuredQuery_Filter_FilterType `protobuf_oneof:"filter_type"`
}
func (m *StructuredQuery_Filter) Reset() { *m = StructuredQuery_Filter{} }
func (m *StructuredQuery_Filter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_Filter) ProtoMessage() {}
func (*StructuredQuery_Filter) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 1} }
type isStructuredQuery_Filter_FilterType interface {
isStructuredQuery_Filter_FilterType()
}
type StructuredQuery_Filter_CompositeFilter struct {
CompositeFilter *StructuredQuery_CompositeFilter `protobuf:"bytes,1,opt,name=composite_filter,json=compositeFilter,oneof"`
}
type StructuredQuery_Filter_FieldFilter struct {
FieldFilter *StructuredQuery_FieldFilter `protobuf:"bytes,2,opt,name=field_filter,json=fieldFilter,oneof"`
}
type StructuredQuery_Filter_UnaryFilter struct {
UnaryFilter *StructuredQuery_UnaryFilter `protobuf:"bytes,3,opt,name=unary_filter,json=unaryFilter,oneof"`
}
func (*StructuredQuery_Filter_CompositeFilter) isStructuredQuery_Filter_FilterType() {}
func (*StructuredQuery_Filter_FieldFilter) isStructuredQuery_Filter_FilterType() {}
func (*StructuredQuery_Filter_UnaryFilter) isStructuredQuery_Filter_FilterType() {}
func (m *StructuredQuery_Filter) GetFilterType() isStructuredQuery_Filter_FilterType {
if m != nil {
return m.FilterType
}
return nil
}
func (m *StructuredQuery_Filter) GetCompositeFilter() *StructuredQuery_CompositeFilter {
if x, ok := m.GetFilterType().(*StructuredQuery_Filter_CompositeFilter); ok {
return x.CompositeFilter
}
return nil
}
func (m *StructuredQuery_Filter) GetFieldFilter() *StructuredQuery_FieldFilter {
if x, ok := m.GetFilterType().(*StructuredQuery_Filter_FieldFilter); ok {
return x.FieldFilter
}
return nil
}
func (m *StructuredQuery_Filter) GetUnaryFilter() *StructuredQuery_UnaryFilter {
if x, ok := m.GetFilterType().(*StructuredQuery_Filter_UnaryFilter); ok {
return x.UnaryFilter
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*StructuredQuery_Filter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _StructuredQuery_Filter_OneofMarshaler, _StructuredQuery_Filter_OneofUnmarshaler, _StructuredQuery_Filter_OneofSizer, []interface{}{
(*StructuredQuery_Filter_CompositeFilter)(nil),
(*StructuredQuery_Filter_FieldFilter)(nil),
(*StructuredQuery_Filter_UnaryFilter)(nil),
}
}
func _StructuredQuery_Filter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*StructuredQuery_Filter)
// filter_type
switch x := m.FilterType.(type) {
case *StructuredQuery_Filter_CompositeFilter:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.CompositeFilter); err != nil {
return err
}
case *StructuredQuery_Filter_FieldFilter:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.FieldFilter); err != nil {
return err
}
case *StructuredQuery_Filter_UnaryFilter:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.UnaryFilter); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("StructuredQuery_Filter.FilterType has unexpected type %T", x)
}
return nil
}
func _StructuredQuery_Filter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*StructuredQuery_Filter)
switch tag {
case 1: // filter_type.composite_filter
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_CompositeFilter)
err := b.DecodeMessage(msg)
m.FilterType = &StructuredQuery_Filter_CompositeFilter{msg}
return true, err
case 2: // filter_type.field_filter
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_FieldFilter)
err := b.DecodeMessage(msg)
m.FilterType = &StructuredQuery_Filter_FieldFilter{msg}
return true, err
case 3: // filter_type.unary_filter
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_UnaryFilter)
err := b.DecodeMessage(msg)
m.FilterType = &StructuredQuery_Filter_UnaryFilter{msg}
return true, err
default:
return false, nil
}
}
func _StructuredQuery_Filter_OneofSizer(msg proto.Message) (n int) {
m := msg.(*StructuredQuery_Filter)
// filter_type
switch x := m.FilterType.(type) {
case *StructuredQuery_Filter_CompositeFilter:
s := proto.Size(x.CompositeFilter)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *StructuredQuery_Filter_FieldFilter:
s := proto.Size(x.FieldFilter)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *StructuredQuery_Filter_UnaryFilter:
s := proto.Size(x.UnaryFilter)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A filter that merges multiple other filters using the given operator.
type StructuredQuery_CompositeFilter struct {
// The operator for combining multiple filters.
Op StructuredQuery_CompositeFilter_Operator `protobuf:"varint,1,opt,name=op,enum=google.firestore.v1beta1.StructuredQuery_CompositeFilter_Operator" json:"op,omitempty"`
// The list of filters to combine.
// Must contain at least one filter.
Filters []*StructuredQuery_Filter `protobuf:"bytes,2,rep,name=filters" json:"filters,omitempty"`
}
func (m *StructuredQuery_CompositeFilter) Reset() { *m = StructuredQuery_CompositeFilter{} }
func (m *StructuredQuery_CompositeFilter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_CompositeFilter) ProtoMessage() {}
func (*StructuredQuery_CompositeFilter) Descriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 2}
}
func (m *StructuredQuery_CompositeFilter) GetOp() StructuredQuery_CompositeFilter_Operator {
if m != nil {
return m.Op
}
return StructuredQuery_CompositeFilter_OPERATOR_UNSPECIFIED
}
func (m *StructuredQuery_CompositeFilter) GetFilters() []*StructuredQuery_Filter {
if m != nil {
return m.Filters
}
return nil
}
// A filter on a specific field.
type StructuredQuery_FieldFilter struct {
// The field to filter by.
Field *StructuredQuery_FieldReference `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"`
// The operator to filter by.
Op StructuredQuery_FieldFilter_Operator `protobuf:"varint,2,opt,name=op,enum=google.firestore.v1beta1.StructuredQuery_FieldFilter_Operator" json:"op,omitempty"`
// The value to compare to.
Value *Value `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
}
func (m *StructuredQuery_FieldFilter) Reset() { *m = StructuredQuery_FieldFilter{} }
func (m *StructuredQuery_FieldFilter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_FieldFilter) ProtoMessage() {}
func (*StructuredQuery_FieldFilter) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 3} }
func (m *StructuredQuery_FieldFilter) GetField() *StructuredQuery_FieldReference {
if m != nil {
return m.Field
}
return nil
}
func (m *StructuredQuery_FieldFilter) GetOp() StructuredQuery_FieldFilter_Operator {
if m != nil {
return m.Op
}
return StructuredQuery_FieldFilter_OPERATOR_UNSPECIFIED
}
func (m *StructuredQuery_FieldFilter) GetValue() *Value {
if m != nil {
return m.Value
}
return nil
}
// A filter with a single operand.
type StructuredQuery_UnaryFilter struct {
// The unary operator to apply.
Op StructuredQuery_UnaryFilter_Operator `protobuf:"varint,1,opt,name=op,enum=google.firestore.v1beta1.StructuredQuery_UnaryFilter_Operator" json:"op,omitempty"`
// The argument to the filter.
//
// Types that are valid to be assigned to OperandType:
// *StructuredQuery_UnaryFilter_Field
OperandType isStructuredQuery_UnaryFilter_OperandType `protobuf_oneof:"operand_type"`
}
func (m *StructuredQuery_UnaryFilter) Reset() { *m = StructuredQuery_UnaryFilter{} }
func (m *StructuredQuery_UnaryFilter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_UnaryFilter) ProtoMessage() {}
func (*StructuredQuery_UnaryFilter) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 4} }
type isStructuredQuery_UnaryFilter_OperandType interface {
isStructuredQuery_UnaryFilter_OperandType()
}
type StructuredQuery_UnaryFilter_Field struct {
Field *StructuredQuery_FieldReference `protobuf:"bytes,2,opt,name=field,oneof"`
}
func (*StructuredQuery_UnaryFilter_Field) isStructuredQuery_UnaryFilter_OperandType() {}
func (m *StructuredQuery_UnaryFilter) GetOperandType() isStructuredQuery_UnaryFilter_OperandType {
if m != nil {
return m.OperandType
}
return nil
}
func (m *StructuredQuery_UnaryFilter) GetOp() StructuredQuery_UnaryFilter_Operator {
if m != nil {
return m.Op
}
return StructuredQuery_UnaryFilter_OPERATOR_UNSPECIFIED
}
func (m *StructuredQuery_UnaryFilter) GetField() *StructuredQuery_FieldReference {
if x, ok := m.GetOperandType().(*StructuredQuery_UnaryFilter_Field); ok {
return x.Field
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*StructuredQuery_UnaryFilter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _StructuredQuery_UnaryFilter_OneofMarshaler, _StructuredQuery_UnaryFilter_OneofUnmarshaler, _StructuredQuery_UnaryFilter_OneofSizer, []interface{}{
(*StructuredQuery_UnaryFilter_Field)(nil),
}
}
func _StructuredQuery_UnaryFilter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*StructuredQuery_UnaryFilter)
// operand_type
switch x := m.OperandType.(type) {
case *StructuredQuery_UnaryFilter_Field:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Field); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("StructuredQuery_UnaryFilter.OperandType has unexpected type %T", x)
}
return nil
}
func _StructuredQuery_UnaryFilter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*StructuredQuery_UnaryFilter)
switch tag {
case 2: // operand_type.field
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_FieldReference)
err := b.DecodeMessage(msg)
m.OperandType = &StructuredQuery_UnaryFilter_Field{msg}
return true, err
default:
return false, nil
}
}
func _StructuredQuery_UnaryFilter_OneofSizer(msg proto.Message) (n int) {
m := msg.(*StructuredQuery_UnaryFilter)
// operand_type
switch x := m.OperandType.(type) {
case *StructuredQuery_UnaryFilter_Field:
s := proto.Size(x.Field)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// An order on a field.
type StructuredQuery_Order struct {
// The field to order by.
Field *StructuredQuery_FieldReference `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"`
// The direction to order by. Defaults to `ASCENDING`.
Direction StructuredQuery_Direction `protobuf:"varint,2,opt,name=direction,enum=google.firestore.v1beta1.StructuredQuery_Direction" json:"direction,omitempty"`
}
func (m *StructuredQuery_Order) Reset() { *m = StructuredQuery_Order{} }
func (m *StructuredQuery_Order) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_Order) ProtoMessage() {}
func (*StructuredQuery_Order) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 5} }
func (m *StructuredQuery_Order) GetField() *StructuredQuery_FieldReference {
if m != nil {
return m.Field
}
return nil
}
func (m *StructuredQuery_Order) GetDirection() StructuredQuery_Direction {
if m != nil {
return m.Direction
}
return StructuredQuery_DIRECTION_UNSPECIFIED
}
// A reference to a field, such as `max(messages.time) as max_time`.
type StructuredQuery_FieldReference struct {
FieldPath string `protobuf:"bytes,2,opt,name=field_path,json=fieldPath" json:"field_path,omitempty"`
}
func (m *StructuredQuery_FieldReference) Reset() { *m = StructuredQuery_FieldReference{} }
func (m *StructuredQuery_FieldReference) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_FieldReference) ProtoMessage() {}
func (*StructuredQuery_FieldReference) Descriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 6}
}
func (m *StructuredQuery_FieldReference) GetFieldPath() string {
if m != nil {
return m.FieldPath
}
return ""
}
// The projection of document's fields to return.
type StructuredQuery_Projection struct {
// The fields to return.
//
// If empty, all fields are returned. To only return the name
// of the document, use `['__name__']`.
Fields []*StructuredQuery_FieldReference `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"`
}
func (m *StructuredQuery_Projection) Reset() { *m = StructuredQuery_Projection{} }
func (m *StructuredQuery_Projection) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_Projection) ProtoMessage() {}
func (*StructuredQuery_Projection) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 7} }
func (m *StructuredQuery_Projection) GetFields() []*StructuredQuery_FieldReference {
if m != nil {
return m.Fields
}
return nil
}
// A position in a query result set.
type Cursor struct {
// The values that represent a position, in the order they appear in
// the order by clause of a query.
//
// Can contain fewer values than specified in the order by clause.
Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
// If the position is just before or just after the given values, relative
// to the sort order defined by the query.
Before bool `protobuf:"varint,2,opt,name=before" json:"before,omitempty"`
}
func (m *Cursor) Reset() { *m = Cursor{} }
func (m *Cursor) String() string { return proto.CompactTextString(m) }
func (*Cursor) ProtoMessage() {}
func (*Cursor) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
func (m *Cursor) GetValues() []*Value {
if m != nil {
return m.Values
}
return nil
}
func (m *Cursor) GetBefore() bool {
if m != nil {
return m.Before
}
return false
}
func init() {
proto.RegisterType((*StructuredQuery)(nil), "google.firestore.v1beta1.StructuredQuery")
proto.RegisterType((*StructuredQuery_CollectionSelector)(nil), "google.firestore.v1beta1.StructuredQuery.CollectionSelector")
proto.RegisterType((*StructuredQuery_Filter)(nil), "google.firestore.v1beta1.StructuredQuery.Filter")
proto.RegisterType((*StructuredQuery_CompositeFilter)(nil), "google.firestore.v1beta1.StructuredQuery.CompositeFilter")
proto.RegisterType((*StructuredQuery_FieldFilter)(nil), "google.firestore.v1beta1.StructuredQuery.FieldFilter")
proto.RegisterType((*StructuredQuery_UnaryFilter)(nil), "google.firestore.v1beta1.StructuredQuery.UnaryFilter")
proto.RegisterType((*StructuredQuery_Order)(nil), "google.firestore.v1beta1.StructuredQuery.Order")
proto.RegisterType((*StructuredQuery_FieldReference)(nil), "google.firestore.v1beta1.StructuredQuery.FieldReference")
proto.RegisterType((*StructuredQuery_Projection)(nil), "google.firestore.v1beta1.StructuredQuery.Projection")
proto.RegisterType((*Cursor)(nil), "google.firestore.v1beta1.Cursor")
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_Direction", StructuredQuery_Direction_name, StructuredQuery_Direction_value)
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_CompositeFilter_Operator", StructuredQuery_CompositeFilter_Operator_name, StructuredQuery_CompositeFilter_Operator_value)
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_FieldFilter_Operator", StructuredQuery_FieldFilter_Operator_name, StructuredQuery_FieldFilter_Operator_value)
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_UnaryFilter_Operator", StructuredQuery_UnaryFilter_Operator_name, StructuredQuery_UnaryFilter_Operator_value)
}
func init() { proto.RegisterFile("google/firestore/v1beta1/query.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 970 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0xc7, 0xd7, 0x4e, 0xf3, 0x75, 0xd2, 0x0f, 0x6b, 0x04, 0x2b, 0x13, 0x96, 0xa5, 0x0a, 0x48,
0xdb, 0x1b, 0x1c, 0xda, 0xb2, 0x02, 0xb4, 0x80, 0xe4, 0x24, 0x6e, 0x9b, 0x55, 0xe5, 0xa4, 0x93,
0xb6, 0x12, 0xab, 0x0a, 0xcb, 0xb1, 0xc7, 0xa9, 0x91, 0xeb, 0x31, 0xe3, 0xf1, 0xae, 0x7a, 0xcd,
0x9b, 0x70, 0xb9, 0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