This repository has been archived by the owner on Jul 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
datastore_v1.pb.go
1633 lines (1431 loc) · 50.4 KB
/
datastore_v1.pb.go
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
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go.
// source: datastore_v1.proto
// DO NOT EDIT!
/*
Package pb is a generated protocol buffer package.
It is generated from these files:
datastore_v1.proto
It has these top-level messages:
PartitionId
Key
Value
Property
Entity
EntityResult
Query
KindExpression
PropertyReference
PropertyExpression
PropertyOrder
Filter
CompositeFilter
PropertyFilter
GqlQuery
GqlQueryArg
QueryResultBatch
Mutation
MutationResult
ReadOptions
LookupRequest
LookupResponse
RunQueryRequest
RunQueryResponse
BeginTransactionRequest
BeginTransactionResponse
RollbackRequest
RollbackResponse
CommitRequest
CommitResponse
AllocateIdsRequest
AllocateIdsResponse
*/
package pb
import proto "github.com/golang/protobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
// Specifies what data the 'entity' field contains.
// A ResultType is either implied (for example, in LookupResponse.found it
// is always FULL) or specified by context (for example, in message
// QueryResultBatch, field 'entity_result_type' specifies a ResultType
// for all the values in field 'entity_result').
type EntityResult_ResultType int32
const (
EntityResult_FULL EntityResult_ResultType = 1
EntityResult_PROJECTION EntityResult_ResultType = 2
// The entity may have no key.
// A property value may have meaning 18.
EntityResult_KEY_ONLY EntityResult_ResultType = 3
)
var EntityResult_ResultType_name = map[int32]string{
1: "FULL",
2: "PROJECTION",
3: "KEY_ONLY",
}
var EntityResult_ResultType_value = map[string]int32{
"FULL": 1,
"PROJECTION": 2,
"KEY_ONLY": 3,
}
func (x EntityResult_ResultType) Enum() *EntityResult_ResultType {
p := new(EntityResult_ResultType)
*p = x
return p
}
func (x EntityResult_ResultType) String() string {
return proto.EnumName(EntityResult_ResultType_name, int32(x))
}
func (x *EntityResult_ResultType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(EntityResult_ResultType_value, data, "EntityResult_ResultType")
if err != nil {
return err
}
*x = EntityResult_ResultType(value)
return nil
}
type PropertyExpression_AggregationFunction int32
const (
PropertyExpression_FIRST PropertyExpression_AggregationFunction = 1
)
var PropertyExpression_AggregationFunction_name = map[int32]string{
1: "FIRST",
}
var PropertyExpression_AggregationFunction_value = map[string]int32{
"FIRST": 1,
}
func (x PropertyExpression_AggregationFunction) Enum() *PropertyExpression_AggregationFunction {
p := new(PropertyExpression_AggregationFunction)
*p = x
return p
}
func (x PropertyExpression_AggregationFunction) String() string {
return proto.EnumName(PropertyExpression_AggregationFunction_name, int32(x))
}
func (x *PropertyExpression_AggregationFunction) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PropertyExpression_AggregationFunction_value, data, "PropertyExpression_AggregationFunction")
if err != nil {
return err
}
*x = PropertyExpression_AggregationFunction(value)
return nil
}
type PropertyOrder_Direction int32
const (
PropertyOrder_ASCENDING PropertyOrder_Direction = 1
PropertyOrder_DESCENDING PropertyOrder_Direction = 2
)
var PropertyOrder_Direction_name = map[int32]string{
1: "ASCENDING",
2: "DESCENDING",
}
var PropertyOrder_Direction_value = map[string]int32{
"ASCENDING": 1,
"DESCENDING": 2,
}
func (x PropertyOrder_Direction) Enum() *PropertyOrder_Direction {
p := new(PropertyOrder_Direction)
*p = x
return p
}
func (x PropertyOrder_Direction) String() string {
return proto.EnumName(PropertyOrder_Direction_name, int32(x))
}
func (x *PropertyOrder_Direction) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PropertyOrder_Direction_value, data, "PropertyOrder_Direction")
if err != nil {
return err
}
*x = PropertyOrder_Direction(value)
return nil
}
type CompositeFilter_Operator int32
const (
CompositeFilter_AND CompositeFilter_Operator = 1
)
var CompositeFilter_Operator_name = map[int32]string{
1: "AND",
}
var CompositeFilter_Operator_value = map[string]int32{
"AND": 1,
}
func (x CompositeFilter_Operator) Enum() *CompositeFilter_Operator {
p := new(CompositeFilter_Operator)
*p = x
return p
}
func (x CompositeFilter_Operator) String() string {
return proto.EnumName(CompositeFilter_Operator_name, int32(x))
}
func (x *CompositeFilter_Operator) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CompositeFilter_Operator_value, data, "CompositeFilter_Operator")
if err != nil {
return err
}
*x = CompositeFilter_Operator(value)
return nil
}
type PropertyFilter_Operator int32
const (
PropertyFilter_LESS_THAN PropertyFilter_Operator = 1
PropertyFilter_LESS_THAN_OR_EQUAL PropertyFilter_Operator = 2
PropertyFilter_GREATER_THAN PropertyFilter_Operator = 3
PropertyFilter_GREATER_THAN_OR_EQUAL PropertyFilter_Operator = 4
PropertyFilter_EQUAL PropertyFilter_Operator = 5
PropertyFilter_HAS_ANCESTOR PropertyFilter_Operator = 11
)
var PropertyFilter_Operator_name = map[int32]string{
1: "LESS_THAN",
2: "LESS_THAN_OR_EQUAL",
3: "GREATER_THAN",
4: "GREATER_THAN_OR_EQUAL",
5: "EQUAL",
11: "HAS_ANCESTOR",
}
var PropertyFilter_Operator_value = map[string]int32{
"LESS_THAN": 1,
"LESS_THAN_OR_EQUAL": 2,
"GREATER_THAN": 3,
"GREATER_THAN_OR_EQUAL": 4,
"EQUAL": 5,
"HAS_ANCESTOR": 11,
}
func (x PropertyFilter_Operator) Enum() *PropertyFilter_Operator {
p := new(PropertyFilter_Operator)
*p = x
return p
}
func (x PropertyFilter_Operator) String() string {
return proto.EnumName(PropertyFilter_Operator_name, int32(x))
}
func (x *PropertyFilter_Operator) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PropertyFilter_Operator_value, data, "PropertyFilter_Operator")
if err != nil {
return err
}
*x = PropertyFilter_Operator(value)
return nil
}
// The possible values for the 'more_results' field.
type QueryResultBatch_MoreResultsType int32
const (
QueryResultBatch_NOT_FINISHED QueryResultBatch_MoreResultsType = 1
QueryResultBatch_MORE_RESULTS_AFTER_LIMIT QueryResultBatch_MoreResultsType = 2
// results after the limit.
QueryResultBatch_NO_MORE_RESULTS QueryResultBatch_MoreResultsType = 3
)
var QueryResultBatch_MoreResultsType_name = map[int32]string{
1: "NOT_FINISHED",
2: "MORE_RESULTS_AFTER_LIMIT",
3: "NO_MORE_RESULTS",
}
var QueryResultBatch_MoreResultsType_value = map[string]int32{
"NOT_FINISHED": 1,
"MORE_RESULTS_AFTER_LIMIT": 2,
"NO_MORE_RESULTS": 3,
}
func (x QueryResultBatch_MoreResultsType) Enum() *QueryResultBatch_MoreResultsType {
p := new(QueryResultBatch_MoreResultsType)
*p = x
return p
}
func (x QueryResultBatch_MoreResultsType) String() string {
return proto.EnumName(QueryResultBatch_MoreResultsType_name, int32(x))
}
func (x *QueryResultBatch_MoreResultsType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(QueryResultBatch_MoreResultsType_value, data, "QueryResultBatch_MoreResultsType")
if err != nil {
return err
}
*x = QueryResultBatch_MoreResultsType(value)
return nil
}
type ReadOptions_ReadConsistency int32
const (
ReadOptions_DEFAULT ReadOptions_ReadConsistency = 0
ReadOptions_STRONG ReadOptions_ReadConsistency = 1
ReadOptions_EVENTUAL ReadOptions_ReadConsistency = 2
)
var ReadOptions_ReadConsistency_name = map[int32]string{
0: "DEFAULT",
1: "STRONG",
2: "EVENTUAL",
}
var ReadOptions_ReadConsistency_value = map[string]int32{
"DEFAULT": 0,
"STRONG": 1,
"EVENTUAL": 2,
}
func (x ReadOptions_ReadConsistency) Enum() *ReadOptions_ReadConsistency {
p := new(ReadOptions_ReadConsistency)
*p = x
return p
}
func (x ReadOptions_ReadConsistency) String() string {
return proto.EnumName(ReadOptions_ReadConsistency_name, int32(x))
}
func (x *ReadOptions_ReadConsistency) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ReadOptions_ReadConsistency_value, data, "ReadOptions_ReadConsistency")
if err != nil {
return err
}
*x = ReadOptions_ReadConsistency(value)
return nil
}
type BeginTransactionRequest_IsolationLevel int32
const (
BeginTransactionRequest_SNAPSHOT BeginTransactionRequest_IsolationLevel = 0
// conflict if their mutations conflict. For example:
// Read(A),Write(B) may not conflict with Read(B),Write(A),
// but Read(B),Write(B) does conflict with Read(B),Write(B).
BeginTransactionRequest_SERIALIZABLE BeginTransactionRequest_IsolationLevel = 1
)
var BeginTransactionRequest_IsolationLevel_name = map[int32]string{
0: "SNAPSHOT",
1: "SERIALIZABLE",
}
var BeginTransactionRequest_IsolationLevel_value = map[string]int32{
"SNAPSHOT": 0,
"SERIALIZABLE": 1,
}
func (x BeginTransactionRequest_IsolationLevel) Enum() *BeginTransactionRequest_IsolationLevel {
p := new(BeginTransactionRequest_IsolationLevel)
*p = x
return p
}
func (x BeginTransactionRequest_IsolationLevel) String() string {
return proto.EnumName(BeginTransactionRequest_IsolationLevel_name, int32(x))
}
func (x *BeginTransactionRequest_IsolationLevel) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_IsolationLevel_value, data, "BeginTransactionRequest_IsolationLevel")
if err != nil {
return err
}
*x = BeginTransactionRequest_IsolationLevel(value)
return nil
}
type CommitRequest_Mode int32
const (
CommitRequest_TRANSACTIONAL CommitRequest_Mode = 1
CommitRequest_NON_TRANSACTIONAL CommitRequest_Mode = 2
)
var CommitRequest_Mode_name = map[int32]string{
1: "TRANSACTIONAL",
2: "NON_TRANSACTIONAL",
}
var CommitRequest_Mode_value = map[string]int32{
"TRANSACTIONAL": 1,
"NON_TRANSACTIONAL": 2,
}
func (x CommitRequest_Mode) Enum() *CommitRequest_Mode {
p := new(CommitRequest_Mode)
*p = x
return p
}
func (x CommitRequest_Mode) String() string {
return proto.EnumName(CommitRequest_Mode_name, int32(x))
}
func (x *CommitRequest_Mode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CommitRequest_Mode_value, data, "CommitRequest_Mode")
if err != nil {
return err
}
*x = CommitRequest_Mode(value)
return nil
}
// An identifier for a particular subset of entities.
//
// Entities are partitioned into various subsets, each used by different
// datasets and different namespaces within a dataset and so forth.
//
// All input partition IDs are normalized before use.
// A partition ID is normalized as follows:
// If the partition ID is unset or is set to an empty partition ID, replace it
// with the context partition ID.
// Otherwise, if the partition ID has no dataset ID, assign it the context
// partition ID's dataset ID.
// Unless otherwise documented, the context partition ID has the dataset ID set
// to the context dataset ID and no other partition dimension set.
//
// A partition ID is empty if all of its fields are unset.
//
// Partition dimension:
// A dimension may be unset.
// A dimension's value must never be "".
// A dimension's value must match [A-Za-z\d\.\-_]{1,100}
// If the value of any dimension matches regex "__.*__",
// the partition is reserved/read-only.
// A reserved/read-only partition ID is forbidden in certain documented contexts.
//
// Dataset ID:
// A dataset id's value must never be "".
// A dataset id's value must match
// ([a-z\d\-]{1,100}~)?([a-z\d][a-z\d\-\.]{0,99}:)?([a-z\d][a-z\d\-]{0,99}
type PartitionId struct {
// The dataset ID.
DatasetId *string `protobuf:"bytes,3,opt,name=dataset_id" json:"dataset_id,omitempty"`
// The namespace.
Namespace *string `protobuf:"bytes,4,opt,name=namespace" json:"namespace,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PartitionId) Reset() { *m = PartitionId{} }
func (m *PartitionId) String() string { return proto.CompactTextString(m) }
func (*PartitionId) ProtoMessage() {}
func (m *PartitionId) GetDatasetId() string {
if m != nil && m.DatasetId != nil {
return *m.DatasetId
}
return ""
}
func (m *PartitionId) GetNamespace() string {
if m != nil && m.Namespace != nil {
return *m.Namespace
}
return ""
}
// A unique identifier for an entity.
// If a key's partition id or any of its path kinds or names are
// reserved/read-only, the key is reserved/read-only.
// A reserved/read-only key is forbidden in certain documented contexts.
type Key struct {
// Entities are partitioned into subsets, currently identified by a dataset
// (usually implicitly specified by the project) and namespace ID.
// Queries are scoped to a single partition.
PartitionId *PartitionId `protobuf:"bytes,1,opt,name=partition_id" json:"partition_id,omitempty"`
// The entity path.
// An entity path consists of one or more elements composed of a kind and a
// string or numerical identifier, which identify entities. The first
// element identifies a <em>root entity</em>, the second element identifies
// a <em>child</em> of the root entity, the third element a child of the
// second entity, and so forth. The entities identified by all prefixes of
// the path are called the element's <em>ancestors</em>.
// An entity path is always fully complete: ALL of the entity's ancestors
// are required to be in the path along with the entity identifier itself.
// The only exception is that in some documented cases, the identifier in the
// last path element (for the entity) itself may be omitted. A path can never
// be empty.
PathElement []*Key_PathElement `protobuf:"bytes,2,rep,name=path_element" json:"path_element,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Key) Reset() { *m = Key{} }
func (m *Key) String() string { return proto.CompactTextString(m) }
func (*Key) ProtoMessage() {}
func (m *Key) GetPartitionId() *PartitionId {
if m != nil {
return m.PartitionId
}
return nil
}
func (m *Key) GetPathElement() []*Key_PathElement {
if m != nil {
return m.PathElement
}
return nil
}
// A (kind, ID/name) pair used to construct a key path.
//
// At most one of name or ID may be set.
// If either is set, the element is complete.
// If neither is set, the element is incomplete.
type Key_PathElement struct {
// The kind of the entity.
// A kind matching regex "__.*__" is reserved/read-only.
// A kind must not contain more than 500 characters.
// Cannot be "".
Kind *string `protobuf:"bytes,1,req,name=kind" json:"kind,omitempty"`
// The ID of the entity.
// Never equal to zero. Values less than zero are discouraged and will not
// be supported in the future.
Id *int64 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"`
// The name of the entity.
// A name matching regex "__.*__" is reserved/read-only.
// A name must not be more than 500 characters.
// Cannot be "".
Name *string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Key_PathElement) Reset() { *m = Key_PathElement{} }
func (m *Key_PathElement) String() string { return proto.CompactTextString(m) }
func (*Key_PathElement) ProtoMessage() {}
func (m *Key_PathElement) GetKind() string {
if m != nil && m.Kind != nil {
return *m.Kind
}
return ""
}
func (m *Key_PathElement) GetId() int64 {
if m != nil && m.Id != nil {
return *m.Id
}
return 0
}
func (m *Key_PathElement) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
// A message that can hold any of the supported value types and associated
// metadata.
//
// At most one of the <type>Value fields may be set.
// If none are set the value is "null".
//
type Value struct {
// A boolean value.
BooleanValue *bool `protobuf:"varint,1,opt,name=boolean_value" json:"boolean_value,omitempty"`
// An integer value.
IntegerValue *int64 `protobuf:"varint,2,opt,name=integer_value" json:"integer_value,omitempty"`
// A double value.
DoubleValue *float64 `protobuf:"fixed64,3,opt,name=double_value" json:"double_value,omitempty"`
// A timestamp value.
TimestampMicrosecondsValue *int64 `protobuf:"varint,4,opt,name=timestamp_microseconds_value" json:"timestamp_microseconds_value,omitempty"`
// A key value.
KeyValue *Key `protobuf:"bytes,5,opt,name=key_value" json:"key_value,omitempty"`
// A blob key value.
BlobKeyValue *string `protobuf:"bytes,16,opt,name=blob_key_value" json:"blob_key_value,omitempty"`
// A UTF-8 encoded string value.
StringValue *string `protobuf:"bytes,17,opt,name=string_value" json:"string_value,omitempty"`
// A blob value.
BlobValue []byte `protobuf:"bytes,18,opt,name=blob_value" json:"blob_value,omitempty"`
// An entity value.
// May have no key.
// May have a key with an incomplete key path.
// May have a reserved/read-only key.
EntityValue *Entity `protobuf:"bytes,6,opt,name=entity_value" json:"entity_value,omitempty"`
// A list value.
// Cannot contain another list value.
// Cannot also have a meaning and indexing set.
ListValue []*Value `protobuf:"bytes,7,rep,name=list_value" json:"list_value,omitempty"`
// The <code>meaning</code> field is reserved and should not be used.
Meaning *int32 `protobuf:"varint,14,opt,name=meaning" json:"meaning,omitempty"`
// If the value should be indexed.
//
// The <code>indexed</code> property may be set for a
// <code>null</code> value.
// When <code>indexed</code> is <code>true</code>, <code>stringValue</code>
// is limited to 500 characters and the blob value is limited to 500 bytes.
// Exception: If meaning is set to 2, string_value is limited to 2038
// characters regardless of indexed.
// When indexed is true, meaning 15 and 22 are not allowed, and meaning 16
// will be ignored on input (and will never be set on output).
// Input values by default have <code>indexed</code> set to
// <code>true</code>; however, you can explicitly set <code>indexed</code> to
// <code>true</code> if you want. (An output value never has
// <code>indexed</code> explicitly set to <code>true</code>.) If a value is
// itself an entity, it cannot have <code>indexed</code> set to
// <code>true</code>.
// Exception: An entity value with meaning 9, 20 or 21 may be indexed.
Indexed *bool `protobuf:"varint,15,opt,name=indexed,def=1" json:"indexed,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Value) Reset() { *m = Value{} }
func (m *Value) String() string { return proto.CompactTextString(m) }
func (*Value) ProtoMessage() {}
const Default_Value_Indexed bool = true
func (m *Value) GetBooleanValue() bool {
if m != nil && m.BooleanValue != nil {
return *m.BooleanValue
}
return false
}
func (m *Value) GetIntegerValue() int64 {
if m != nil && m.IntegerValue != nil {
return *m.IntegerValue
}
return 0
}
func (m *Value) GetDoubleValue() float64 {
if m != nil && m.DoubleValue != nil {
return *m.DoubleValue
}
return 0
}
func (m *Value) GetTimestampMicrosecondsValue() int64 {
if m != nil && m.TimestampMicrosecondsValue != nil {
return *m.TimestampMicrosecondsValue
}
return 0
}
func (m *Value) GetKeyValue() *Key {
if m != nil {
return m.KeyValue
}
return nil
}
func (m *Value) GetBlobKeyValue() string {
if m != nil && m.BlobKeyValue != nil {
return *m.BlobKeyValue
}
return ""
}
func (m *Value) GetStringValue() string {
if m != nil && m.StringValue != nil {
return *m.StringValue
}
return ""
}
func (m *Value) GetBlobValue() []byte {
if m != nil {
return m.BlobValue
}
return nil
}
func (m *Value) GetEntityValue() *Entity {
if m != nil {
return m.EntityValue
}
return nil
}
func (m *Value) GetListValue() []*Value {
if m != nil {
return m.ListValue
}
return nil
}
func (m *Value) GetMeaning() int32 {
if m != nil && m.Meaning != nil {
return *m.Meaning
}
return 0
}
func (m *Value) GetIndexed() bool {
if m != nil && m.Indexed != nil {
return *m.Indexed
}
return Default_Value_Indexed
}
// An entity property.
type Property struct {
// The name of the property.
// A property name matching regex "__.*__" is reserved.
// A reserved property name is forbidden in certain documented contexts.
// The name must not contain more than 500 characters.
// Cannot be "".
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
// The value(s) of the property.
// Each value can have only one value property populated. For example,
// you cannot have a values list of <code>{ value: { integerValue: 22,
// stringValue: "a" } }</code>, but you can have <code>{ value: { listValue:
// [ { integerValue: 22 }, { stringValue: "a" } ] }</code>.
Value *Value `protobuf:"bytes,4,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Property) Reset() { *m = Property{} }
func (m *Property) String() string { return proto.CompactTextString(m) }
func (*Property) ProtoMessage() {}
func (m *Property) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *Property) GetValue() *Value {
if m != nil {
return m.Value
}
return nil
}
// An entity.
//
// An entity is limited to 1 megabyte when stored. That <em>roughly</em>
// corresponds to a limit of 1 megabyte for the serialized form of this
// message.
type Entity struct {
// The entity's key.
//
// An entity must have a key, unless otherwise documented (for example,
// an entity in <code>Value.entityValue</code> may have no key).
// An entity's kind is its key's path's last element's kind,
// or null if it has no key.
Key *Key `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
// The entity's properties.
// Each property's name must be unique for its entity.
Property []*Property `protobuf:"bytes,2,rep,name=property" json:"property,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Entity) Reset() { *m = Entity{} }
func (m *Entity) String() string { return proto.CompactTextString(m) }
func (*Entity) ProtoMessage() {}
func (m *Entity) GetKey() *Key {
if m != nil {
return m.Key
}
return nil
}
func (m *Entity) GetProperty() []*Property {
if m != nil {
return m.Property
}
return nil
}
// The result of fetching an entity from the datastore.
type EntityResult struct {
// The resulting entity.
Entity *Entity `protobuf:"bytes,1,req,name=entity" json:"entity,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *EntityResult) Reset() { *m = EntityResult{} }
func (m *EntityResult) String() string { return proto.CompactTextString(m) }
func (*EntityResult) ProtoMessage() {}
func (m *EntityResult) GetEntity() *Entity {
if m != nil {
return m.Entity
}
return nil
}
// A query.
type Query struct {
// The projection to return. If not set the entire entity is returned.
Projection []*PropertyExpression `protobuf:"bytes,2,rep,name=projection" json:"projection,omitempty"`
// The kinds to query (if empty, returns entities from all kinds).
Kind []*KindExpression `protobuf:"bytes,3,rep,name=kind" json:"kind,omitempty"`
// The filter to apply (optional).
Filter *Filter `protobuf:"bytes,4,opt,name=filter" json:"filter,omitempty"`
// The order to apply to the query results (if empty, order is unspecified).
Order []*PropertyOrder `protobuf:"bytes,5,rep,name=order" json:"order,omitempty"`
// The properties to group by (if empty, no grouping is applied to the
// result set).
GroupBy []*PropertyReference `protobuf:"bytes,6,rep,name=group_by" json:"group_by,omitempty"`
// A starting point for the query results. Optional. Query cursors are
// returned in query result batches.
StartCursor []byte `protobuf:"bytes,7,opt,name=start_cursor" json:"start_cursor,omitempty"`
// An ending point for the query results. Optional. Query cursors are
// returned in query result batches.
EndCursor []byte `protobuf:"bytes,8,opt,name=end_cursor" json:"end_cursor,omitempty"`
// The number of results to skip. Applies before limit, but after all other
// constraints (optional, defaults to 0).
Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"`
// The maximum number of results to return. Applies after all other
// constraints. Optional.
Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Query) Reset() { *m = Query{} }
func (m *Query) String() string { return proto.CompactTextString(m) }
func (*Query) ProtoMessage() {}
const Default_Query_Offset int32 = 0
func (m *Query) GetProjection() []*PropertyExpression {
if m != nil {
return m.Projection
}
return nil
}
func (m *Query) GetKind() []*KindExpression {
if m != nil {
return m.Kind
}
return nil
}
func (m *Query) GetFilter() *Filter {
if m != nil {
return m.Filter
}
return nil
}
func (m *Query) GetOrder() []*PropertyOrder {
if m != nil {
return m.Order
}
return nil
}
func (m *Query) GetGroupBy() []*PropertyReference {
if m != nil {
return m.GroupBy
}
return nil
}
func (m *Query) GetStartCursor() []byte {
if m != nil {
return m.StartCursor
}
return nil
}
func (m *Query) GetEndCursor() []byte {
if m != nil {
return m.EndCursor
}
return nil
}
func (m *Query) GetOffset() int32 {
if m != nil && m.Offset != nil {
return *m.Offset
}
return Default_Query_Offset
}
func (m *Query) GetLimit() int32 {
if m != nil && m.Limit != nil {
return *m.Limit
}
return 0
}
// A representation of a kind.
type KindExpression struct {
// The name of the kind.
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *KindExpression) Reset() { *m = KindExpression{} }
func (m *KindExpression) String() string { return proto.CompactTextString(m) }
func (*KindExpression) ProtoMessage() {}
func (m *KindExpression) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
// A reference to a property relative to the kind expressions.
// exactly.
type PropertyReference struct {
// The name of the property.
Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PropertyReference) Reset() { *m = PropertyReference{} }
func (m *PropertyReference) String() string { return proto.CompactTextString(m) }
func (*PropertyReference) ProtoMessage() {}
func (m *PropertyReference) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
// A representation of a property in a projection.
type PropertyExpression struct {
// The property to project.
Property *PropertyReference `protobuf:"bytes,1,req,name=property" json:"property,omitempty"`
// The aggregation function to apply to the property. Optional.
// Can only be used when grouping by at least one property. Must
// then be set on all properties in the projection that are not
// being grouped by.
AggregationFunction *PropertyExpression_AggregationFunction `protobuf:"varint,2,opt,name=aggregation_function,enum=pb.PropertyExpression_AggregationFunction" json:"aggregation_function,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PropertyExpression) Reset() { *m = PropertyExpression{} }
func (m *PropertyExpression) String() string { return proto.CompactTextString(m) }
func (*PropertyExpression) ProtoMessage() {}
func (m *PropertyExpression) GetProperty() *PropertyReference {
if m != nil {
return m.Property
}
return nil
}
func (m *PropertyExpression) GetAggregationFunction() PropertyExpression_AggregationFunction {
if m != nil && m.AggregationFunction != nil {
return *m.AggregationFunction
}
return PropertyExpression_FIRST
}
// The desired order for a specific property.
type PropertyOrder struct {
// The property to order by.
Property *PropertyReference `protobuf:"bytes,1,req,name=property" json:"property,omitempty"`
// The direction to order by.
Direction *PropertyOrder_Direction `protobuf:"varint,2,opt,name=direction,enum=pb.PropertyOrder_Direction,def=1" json:"direction,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PropertyOrder) Reset() { *m = PropertyOrder{} }
func (m *PropertyOrder) String() string { return proto.CompactTextString(m) }
func (*PropertyOrder) ProtoMessage() {}
const Default_PropertyOrder_Direction PropertyOrder_Direction = PropertyOrder_ASCENDING
func (m *PropertyOrder) GetProperty() *PropertyReference {
if m != nil {
return m.Property
}
return nil
}
func (m *PropertyOrder) GetDirection() PropertyOrder_Direction {
if m != nil && m.Direction != nil {
return *m.Direction
}
return Default_PropertyOrder_Direction
}
// A holder for any type of filter. Exactly one field should be specified.
type Filter struct {
// A composite filter.
CompositeFilter *CompositeFilter `protobuf:"bytes,1,opt,name=composite_filter" json:"composite_filter,omitempty"`
// A filter on a property.
PropertyFilter *PropertyFilter `protobuf:"bytes,2,opt,name=property_filter" json:"property_filter,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Filter) Reset() { *m = Filter{} }
func (m *Filter) String() string { return proto.CompactTextString(m) }
func (*Filter) ProtoMessage() {}
func (m *Filter) GetCompositeFilter() *CompositeFilter {
if m != nil {
return m.CompositeFilter
}
return nil
}
func (m *Filter) GetPropertyFilter() *PropertyFilter {
if m != nil {
return m.PropertyFilter
}
return nil
}
// A filter that merges the multiple other filters using the given operation.
type CompositeFilter struct {
// The operator for combining multiple filters.
Operator *CompositeFilter_Operator `protobuf:"varint,1,req,name=operator,enum=pb.CompositeFilter_Operator" json:"operator,omitempty"`
// The list of filters to combine.
// Must contain at least one filter.
Filter []*Filter `protobuf:"bytes,2,rep,name=filter" json:"filter,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CompositeFilter) Reset() { *m = CompositeFilter{} }
func (m *CompositeFilter) String() string { return proto.CompactTextString(m) }
func (*CompositeFilter) ProtoMessage() {}
func (m *CompositeFilter) GetOperator() CompositeFilter_Operator {
if m != nil && m.Operator != nil {
return *m.Operator
}
return CompositeFilter_AND
}
func (m *CompositeFilter) GetFilter() []*Filter {
if m != nil {