1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/datastore/v1beta3/datastore.proto
5 Package datastore is a generated protocol buffer package.
7 It is generated from these files:
8 google/datastore/v1beta3/datastore.proto
9 google/datastore/v1beta3/entity.proto
10 google/datastore/v1beta3/query.proto
12 It has these top-level messages:
17 BeginTransactionRequest
18 BeginTransactionResponse
49 import proto "github.com/golang/protobuf/proto"
52 import _ "google.golang.org/genproto/googleapis/api/annotations"
55 context "golang.org/x/net/context"
56 grpc "google.golang.org/grpc"
59 // Reference imports to suppress errors if they are not otherwise used.
64 // This is a compile-time assertion to ensure that this generated file
65 // is compatible with the proto package it is being compiled against.
66 // A compilation error at this line likely means your copy of the
67 // proto package needs to be updated.
68 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
70 // The modes available for commits.
71 type CommitRequest_Mode int32
74 // Unspecified. This value must not be used.
75 CommitRequest_MODE_UNSPECIFIED CommitRequest_Mode = 0
76 // Transactional: The mutations are either all applied, or none are applied.
77 // Learn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).
78 CommitRequest_TRANSACTIONAL CommitRequest_Mode = 1
79 // Non-transactional: The mutations may not apply as all or none.
80 CommitRequest_NON_TRANSACTIONAL CommitRequest_Mode = 2
83 var CommitRequest_Mode_name = map[int32]string{
84 0: "MODE_UNSPECIFIED",
86 2: "NON_TRANSACTIONAL",
88 var CommitRequest_Mode_value = map[string]int32{
89 "MODE_UNSPECIFIED": 0,
91 "NON_TRANSACTIONAL": 2,
94 func (x CommitRequest_Mode) String() string {
95 return proto.EnumName(CommitRequest_Mode_name, int32(x))
97 func (CommitRequest_Mode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} }
99 // The possible values for read consistencies.
100 type ReadOptions_ReadConsistency int32
103 // Unspecified. This value must not be used.
104 ReadOptions_READ_CONSISTENCY_UNSPECIFIED ReadOptions_ReadConsistency = 0
105 // Strong consistency.
106 ReadOptions_STRONG ReadOptions_ReadConsistency = 1
107 // Eventual consistency.
108 ReadOptions_EVENTUAL ReadOptions_ReadConsistency = 2
111 var ReadOptions_ReadConsistency_name = map[int32]string{
112 0: "READ_CONSISTENCY_UNSPECIFIED",
116 var ReadOptions_ReadConsistency_value = map[string]int32{
117 "READ_CONSISTENCY_UNSPECIFIED": 0,
122 func (x ReadOptions_ReadConsistency) String() string {
123 return proto.EnumName(ReadOptions_ReadConsistency_name, int32(x))
125 func (ReadOptions_ReadConsistency) EnumDescriptor() ([]byte, []int) {
126 return fileDescriptor0, []int{14, 0}
129 // The request for [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup].
130 type LookupRequest struct {
131 // The ID of the project against which to make the request.
132 ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
133 // The options for this lookup request.
134 ReadOptions *ReadOptions `protobuf:"bytes,1,opt,name=read_options,json=readOptions" json:"read_options,omitempty"`
135 // Keys of entities to look up.
136 Keys []*Key `protobuf:"bytes,3,rep,name=keys" json:"keys,omitempty"`
139 func (m *LookupRequest) Reset() { *m = LookupRequest{} }
140 func (m *LookupRequest) String() string { return proto.CompactTextString(m) }
141 func (*LookupRequest) ProtoMessage() {}
142 func (*LookupRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
144 func (m *LookupRequest) GetProjectId() string {
151 func (m *LookupRequest) GetReadOptions() *ReadOptions {
158 func (m *LookupRequest) GetKeys() []*Key {
165 // The response for [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup].
166 type LookupResponse struct {
167 // Entities found as `ResultType.FULL` entities. The order of results in this
168 // field is undefined and has no relation to the order of the keys in the
170 Found []*EntityResult `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"`
171 // Entities not found as `ResultType.KEY_ONLY` entities. The order of results
172 // in this field is undefined and has no relation to the order of the keys
174 Missing []*EntityResult `protobuf:"bytes,2,rep,name=missing" json:"missing,omitempty"`
175 // A list of keys that were not looked up due to resource constraints. The
176 // order of results in this field is undefined and has no relation to the
177 // order of the keys in the input.
178 Deferred []*Key `protobuf:"bytes,3,rep,name=deferred" json:"deferred,omitempty"`
181 func (m *LookupResponse) Reset() { *m = LookupResponse{} }
182 func (m *LookupResponse) String() string { return proto.CompactTextString(m) }
183 func (*LookupResponse) ProtoMessage() {}
184 func (*LookupResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
186 func (m *LookupResponse) GetFound() []*EntityResult {
193 func (m *LookupResponse) GetMissing() []*EntityResult {
200 func (m *LookupResponse) GetDeferred() []*Key {
207 // The request for [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery].
208 type RunQueryRequest struct {
209 // The ID of the project against which to make the request.
210 ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
211 // Entities are partitioned into subsets, identified by a partition ID.
212 // Queries are scoped to a single partition.
213 // This partition ID is normalized with the standard default context
215 PartitionId *PartitionId `protobuf:"bytes,2,opt,name=partition_id,json=partitionId" json:"partition_id,omitempty"`
216 // The options for this query.
217 ReadOptions *ReadOptions `protobuf:"bytes,1,opt,name=read_options,json=readOptions" json:"read_options,omitempty"`
218 // The type of query.
220 // Types that are valid to be assigned to QueryType:
221 // *RunQueryRequest_Query
222 // *RunQueryRequest_GqlQuery
223 QueryType isRunQueryRequest_QueryType `protobuf_oneof:"query_type"`
226 func (m *RunQueryRequest) Reset() { *m = RunQueryRequest{} }
227 func (m *RunQueryRequest) String() string { return proto.CompactTextString(m) }
228 func (*RunQueryRequest) ProtoMessage() {}
229 func (*RunQueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
231 type isRunQueryRequest_QueryType interface {
232 isRunQueryRequest_QueryType()
235 type RunQueryRequest_Query struct {
236 Query *Query `protobuf:"bytes,3,opt,name=query,oneof"`
238 type RunQueryRequest_GqlQuery struct {
239 GqlQuery *GqlQuery `protobuf:"bytes,7,opt,name=gql_query,json=gqlQuery,oneof"`
242 func (*RunQueryRequest_Query) isRunQueryRequest_QueryType() {}
243 func (*RunQueryRequest_GqlQuery) isRunQueryRequest_QueryType() {}
245 func (m *RunQueryRequest) GetQueryType() isRunQueryRequest_QueryType {
252 func (m *RunQueryRequest) GetProjectId() string {
259 func (m *RunQueryRequest) GetPartitionId() *PartitionId {
266 func (m *RunQueryRequest) GetReadOptions() *ReadOptions {
273 func (m *RunQueryRequest) GetQuery() *Query {
274 if x, ok := m.GetQueryType().(*RunQueryRequest_Query); ok {
280 func (m *RunQueryRequest) GetGqlQuery() *GqlQuery {
281 if x, ok := m.GetQueryType().(*RunQueryRequest_GqlQuery); ok {
287 // XXX_OneofFuncs is for the internal use of the proto package.
288 func (*RunQueryRequest) 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{}) {
289 return _RunQueryRequest_OneofMarshaler, _RunQueryRequest_OneofUnmarshaler, _RunQueryRequest_OneofSizer, []interface{}{
290 (*RunQueryRequest_Query)(nil),
291 (*RunQueryRequest_GqlQuery)(nil),
295 func _RunQueryRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
296 m := msg.(*RunQueryRequest)
298 switch x := m.QueryType.(type) {
299 case *RunQueryRequest_Query:
300 b.EncodeVarint(3<<3 | proto.WireBytes)
301 if err := b.EncodeMessage(x.Query); err != nil {
304 case *RunQueryRequest_GqlQuery:
305 b.EncodeVarint(7<<3 | proto.WireBytes)
306 if err := b.EncodeMessage(x.GqlQuery); err != nil {
311 return fmt.Errorf("RunQueryRequest.QueryType has unexpected type %T", x)
316 func _RunQueryRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
317 m := msg.(*RunQueryRequest)
319 case 3: // query_type.query
320 if wire != proto.WireBytes {
321 return true, proto.ErrInternalBadWireType
324 err := b.DecodeMessage(msg)
325 m.QueryType = &RunQueryRequest_Query{msg}
327 case 7: // query_type.gql_query
328 if wire != proto.WireBytes {
329 return true, proto.ErrInternalBadWireType
332 err := b.DecodeMessage(msg)
333 m.QueryType = &RunQueryRequest_GqlQuery{msg}
340 func _RunQueryRequest_OneofSizer(msg proto.Message) (n int) {
341 m := msg.(*RunQueryRequest)
343 switch x := m.QueryType.(type) {
344 case *RunQueryRequest_Query:
345 s := proto.Size(x.Query)
346 n += proto.SizeVarint(3<<3 | proto.WireBytes)
347 n += proto.SizeVarint(uint64(s))
349 case *RunQueryRequest_GqlQuery:
350 s := proto.Size(x.GqlQuery)
351 n += proto.SizeVarint(7<<3 | proto.WireBytes)
352 n += proto.SizeVarint(uint64(s))
356 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
361 // The response for [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery].
362 type RunQueryResponse struct {
363 // A batch of query results (always present).
364 Batch *QueryResultBatch `protobuf:"bytes,1,opt,name=batch" json:"batch,omitempty"`
365 // The parsed form of the `GqlQuery` from the request, if it was set.
366 Query *Query `protobuf:"bytes,2,opt,name=query" json:"query,omitempty"`
369 func (m *RunQueryResponse) Reset() { *m = RunQueryResponse{} }
370 func (m *RunQueryResponse) String() string { return proto.CompactTextString(m) }
371 func (*RunQueryResponse) ProtoMessage() {}
372 func (*RunQueryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
374 func (m *RunQueryResponse) GetBatch() *QueryResultBatch {
381 func (m *RunQueryResponse) GetQuery() *Query {
388 // The request for [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
389 type BeginTransactionRequest struct {
390 // The ID of the project against which to make the request.
391 ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
392 // Options for a new transaction.
393 TransactionOptions *TransactionOptions `protobuf:"bytes,10,opt,name=transaction_options,json=transactionOptions" json:"transaction_options,omitempty"`
396 func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} }
397 func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) }
398 func (*BeginTransactionRequest) ProtoMessage() {}
399 func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
401 func (m *BeginTransactionRequest) GetProjectId() string {
408 func (m *BeginTransactionRequest) GetTransactionOptions() *TransactionOptions {
410 return m.TransactionOptions
415 // The response for [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
416 type BeginTransactionResponse struct {
417 // The transaction identifier (always present).
418 Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
421 func (m *BeginTransactionResponse) Reset() { *m = BeginTransactionResponse{} }
422 func (m *BeginTransactionResponse) String() string { return proto.CompactTextString(m) }
423 func (*BeginTransactionResponse) ProtoMessage() {}
424 func (*BeginTransactionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
426 func (m *BeginTransactionResponse) GetTransaction() []byte {
433 // The request for [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback].
434 type RollbackRequest struct {
435 // The ID of the project against which to make the request.
436 ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
437 // The transaction identifier, returned by a call to
438 // [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
439 Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
442 func (m *RollbackRequest) Reset() { *m = RollbackRequest{} }
443 func (m *RollbackRequest) String() string { return proto.CompactTextString(m) }
444 func (*RollbackRequest) ProtoMessage() {}
445 func (*RollbackRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
447 func (m *RollbackRequest) GetProjectId() string {
454 func (m *RollbackRequest) GetTransaction() []byte {
461 // The response for [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback].
462 // (an empty message).
463 type RollbackResponse struct {
466 func (m *RollbackResponse) Reset() { *m = RollbackResponse{} }
467 func (m *RollbackResponse) String() string { return proto.CompactTextString(m) }
468 func (*RollbackResponse) ProtoMessage() {}
469 func (*RollbackResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
471 // The request for [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit].
472 type CommitRequest struct {
473 // The ID of the project against which to make the request.
474 ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
475 // The type of commit to perform. Defaults to `TRANSACTIONAL`.
476 Mode CommitRequest_Mode `protobuf:"varint,5,opt,name=mode,enum=google.datastore.v1beta3.CommitRequest_Mode" json:"mode,omitempty"`
477 // Must be set when mode is `TRANSACTIONAL`.
479 // Types that are valid to be assigned to TransactionSelector:
480 // *CommitRequest_Transaction
481 TransactionSelector isCommitRequest_TransactionSelector `protobuf_oneof:"transaction_selector"`
482 // The mutations to perform.
484 // When mode is `TRANSACTIONAL`, mutations affecting a single entity are
485 // applied in order. The following sequences of mutations affecting a single
486 // entity are not permitted in a single `Commit` request:
488 // - `insert` followed by `insert`
489 // - `update` followed by `insert`
490 // - `upsert` followed by `insert`
491 // - `delete` followed by `update`
493 // When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
495 Mutations []*Mutation `protobuf:"bytes,6,rep,name=mutations" json:"mutations,omitempty"`
498 func (m *CommitRequest) Reset() { *m = CommitRequest{} }
499 func (m *CommitRequest) String() string { return proto.CompactTextString(m) }
500 func (*CommitRequest) ProtoMessage() {}
501 func (*CommitRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
503 type isCommitRequest_TransactionSelector interface {
504 isCommitRequest_TransactionSelector()
507 type CommitRequest_Transaction struct {
508 Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3,oneof"`
511 func (*CommitRequest_Transaction) isCommitRequest_TransactionSelector() {}
513 func (m *CommitRequest) GetTransactionSelector() isCommitRequest_TransactionSelector {
515 return m.TransactionSelector
520 func (m *CommitRequest) GetProjectId() string {
527 func (m *CommitRequest) GetMode() CommitRequest_Mode {
531 return CommitRequest_MODE_UNSPECIFIED
534 func (m *CommitRequest) GetTransaction() []byte {
535 if x, ok := m.GetTransactionSelector().(*CommitRequest_Transaction); ok {
541 func (m *CommitRequest) GetMutations() []*Mutation {
548 // XXX_OneofFuncs is for the internal use of the proto package.
549 func (*CommitRequest) 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{}) {
550 return _CommitRequest_OneofMarshaler, _CommitRequest_OneofUnmarshaler, _CommitRequest_OneofSizer, []interface{}{
551 (*CommitRequest_Transaction)(nil),
555 func _CommitRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
556 m := msg.(*CommitRequest)
557 // transaction_selector
558 switch x := m.TransactionSelector.(type) {
559 case *CommitRequest_Transaction:
560 b.EncodeVarint(1<<3 | proto.WireBytes)
561 b.EncodeRawBytes(x.Transaction)
564 return fmt.Errorf("CommitRequest.TransactionSelector has unexpected type %T", x)
569 func _CommitRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
570 m := msg.(*CommitRequest)
572 case 1: // transaction_selector.transaction
573 if wire != proto.WireBytes {
574 return true, proto.ErrInternalBadWireType
576 x, err := b.DecodeRawBytes(true)
577 m.TransactionSelector = &CommitRequest_Transaction{x}
584 func _CommitRequest_OneofSizer(msg proto.Message) (n int) {
585 m := msg.(*CommitRequest)
586 // transaction_selector
587 switch x := m.TransactionSelector.(type) {
588 case *CommitRequest_Transaction:
589 n += proto.SizeVarint(1<<3 | proto.WireBytes)
590 n += proto.SizeVarint(uint64(len(x.Transaction)))
591 n += len(x.Transaction)
594 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
599 // The response for [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit].
600 type CommitResponse struct {
601 // The result of performing the mutations.
602 // The i-th mutation result corresponds to the i-th mutation in the request.
603 MutationResults []*MutationResult `protobuf:"bytes,3,rep,name=mutation_results,json=mutationResults" json:"mutation_results,omitempty"`
604 // The number of index entries updated during the commit, or zero if none were
606 IndexUpdates int32 `protobuf:"varint,4,opt,name=index_updates,json=indexUpdates" json:"index_updates,omitempty"`
609 func (m *CommitResponse) Reset() { *m = CommitResponse{} }
610 func (m *CommitResponse) String() string { return proto.CompactTextString(m) }
611 func (*CommitResponse) ProtoMessage() {}
612 func (*CommitResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
614 func (m *CommitResponse) GetMutationResults() []*MutationResult {
616 return m.MutationResults
621 func (m *CommitResponse) GetIndexUpdates() int32 {
623 return m.IndexUpdates
628 // The request for [Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds].
629 type AllocateIdsRequest struct {
630 // The ID of the project against which to make the request.
631 ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
632 // A list of keys with incomplete key paths for which to allocate IDs.
633 // No key may be reserved/read-only.
634 Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
637 func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} }
638 func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) }
639 func (*AllocateIdsRequest) ProtoMessage() {}
640 func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
642 func (m *AllocateIdsRequest) GetProjectId() string {
649 func (m *AllocateIdsRequest) GetKeys() []*Key {
656 // The response for [Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds].
657 type AllocateIdsResponse struct {
658 // The keys specified in the request (in the same order), each with
659 // its key path completed with a newly allocated ID.
660 Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
663 func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} }
664 func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) }
665 func (*AllocateIdsResponse) ProtoMessage() {}
666 func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
668 func (m *AllocateIdsResponse) GetKeys() []*Key {
675 // A mutation to apply to an entity.
676 type Mutation struct {
677 // The mutation operation.
679 // For `insert`, `update`, and `upsert`:
680 // - The entity's key must not be reserved/read-only.
681 // - No property in the entity may have a reserved name,
682 // not even a property in an entity in a value.
683 // - No value in the entity may have meaning 18,
684 // not even a value in an entity in another value.
686 // Types that are valid to be assigned to Operation:
691 Operation isMutation_Operation `protobuf_oneof:"operation"`
692 // When set, the server will detect whether or not this mutation conflicts
693 // with the current version of the entity on the server. Conflicting mutations
694 // are not applied, and are marked as such in MutationResult.
696 // Types that are valid to be assigned to ConflictDetectionStrategy:
697 // *Mutation_BaseVersion
698 ConflictDetectionStrategy isMutation_ConflictDetectionStrategy `protobuf_oneof:"conflict_detection_strategy"`
701 func (m *Mutation) Reset() { *m = Mutation{} }
702 func (m *Mutation) String() string { return proto.CompactTextString(m) }
703 func (*Mutation) ProtoMessage() {}
704 func (*Mutation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
706 type isMutation_Operation interface {
707 isMutation_Operation()
709 type isMutation_ConflictDetectionStrategy interface {
710 isMutation_ConflictDetectionStrategy()
713 type Mutation_Insert struct {
714 Insert *Entity `protobuf:"bytes,4,opt,name=insert,oneof"`
716 type Mutation_Update struct {
717 Update *Entity `protobuf:"bytes,5,opt,name=update,oneof"`
719 type Mutation_Upsert struct {
720 Upsert *Entity `protobuf:"bytes,6,opt,name=upsert,oneof"`
722 type Mutation_Delete struct {
723 Delete *Key `protobuf:"bytes,7,opt,name=delete,oneof"`
725 type Mutation_BaseVersion struct {
726 BaseVersion int64 `protobuf:"varint,8,opt,name=base_version,json=baseVersion,oneof"`
729 func (*Mutation_Insert) isMutation_Operation() {}
730 func (*Mutation_Update) isMutation_Operation() {}
731 func (*Mutation_Upsert) isMutation_Operation() {}
732 func (*Mutation_Delete) isMutation_Operation() {}
733 func (*Mutation_BaseVersion) isMutation_ConflictDetectionStrategy() {}
735 func (m *Mutation) GetOperation() isMutation_Operation {
741 func (m *Mutation) GetConflictDetectionStrategy() isMutation_ConflictDetectionStrategy {
743 return m.ConflictDetectionStrategy
748 func (m *Mutation) GetInsert() *Entity {
749 if x, ok := m.GetOperation().(*Mutation_Insert); ok {
755 func (m *Mutation) GetUpdate() *Entity {
756 if x, ok := m.GetOperation().(*Mutation_Update); ok {
762 func (m *Mutation) GetUpsert() *Entity {
763 if x, ok := m.GetOperation().(*Mutation_Upsert); ok {
769 func (m *Mutation) GetDelete() *Key {
770 if x, ok := m.GetOperation().(*Mutation_Delete); ok {
776 func (m *Mutation) GetBaseVersion() int64 {
777 if x, ok := m.GetConflictDetectionStrategy().(*Mutation_BaseVersion); ok {
783 // XXX_OneofFuncs is for the internal use of the proto package.
784 func (*Mutation) 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{}) {
785 return _Mutation_OneofMarshaler, _Mutation_OneofUnmarshaler, _Mutation_OneofSizer, []interface{}{
786 (*Mutation_Insert)(nil),
787 (*Mutation_Update)(nil),
788 (*Mutation_Upsert)(nil),
789 (*Mutation_Delete)(nil),
790 (*Mutation_BaseVersion)(nil),
794 func _Mutation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
797 switch x := m.Operation.(type) {
798 case *Mutation_Insert:
799 b.EncodeVarint(4<<3 | proto.WireBytes)
800 if err := b.EncodeMessage(x.Insert); err != nil {
803 case *Mutation_Update:
804 b.EncodeVarint(5<<3 | proto.WireBytes)
805 if err := b.EncodeMessage(x.Update); err != nil {
808 case *Mutation_Upsert:
809 b.EncodeVarint(6<<3 | proto.WireBytes)
810 if err := b.EncodeMessage(x.Upsert); err != nil {
813 case *Mutation_Delete:
814 b.EncodeVarint(7<<3 | proto.WireBytes)
815 if err := b.EncodeMessage(x.Delete); err != nil {
820 return fmt.Errorf("Mutation.Operation has unexpected type %T", x)
822 // conflict_detection_strategy
823 switch x := m.ConflictDetectionStrategy.(type) {
824 case *Mutation_BaseVersion:
825 b.EncodeVarint(8<<3 | proto.WireVarint)
826 b.EncodeVarint(uint64(x.BaseVersion))
829 return fmt.Errorf("Mutation.ConflictDetectionStrategy has unexpected type %T", x)
834 func _Mutation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
837 case 4: // operation.insert
838 if wire != proto.WireBytes {
839 return true, proto.ErrInternalBadWireType
842 err := b.DecodeMessage(msg)
843 m.Operation = &Mutation_Insert{msg}
845 case 5: // operation.update
846 if wire != proto.WireBytes {
847 return true, proto.ErrInternalBadWireType
850 err := b.DecodeMessage(msg)
851 m.Operation = &Mutation_Update{msg}
853 case 6: // operation.upsert
854 if wire != proto.WireBytes {
855 return true, proto.ErrInternalBadWireType
858 err := b.DecodeMessage(msg)
859 m.Operation = &Mutation_Upsert{msg}
861 case 7: // operation.delete
862 if wire != proto.WireBytes {
863 return true, proto.ErrInternalBadWireType
866 err := b.DecodeMessage(msg)
867 m.Operation = &Mutation_Delete{msg}
869 case 8: // conflict_detection_strategy.base_version
870 if wire != proto.WireVarint {
871 return true, proto.ErrInternalBadWireType
873 x, err := b.DecodeVarint()
874 m.ConflictDetectionStrategy = &Mutation_BaseVersion{int64(x)}
881 func _Mutation_OneofSizer(msg proto.Message) (n int) {
884 switch x := m.Operation.(type) {
885 case *Mutation_Insert:
886 s := proto.Size(x.Insert)
887 n += proto.SizeVarint(4<<3 | proto.WireBytes)
888 n += proto.SizeVarint(uint64(s))
890 case *Mutation_Update:
891 s := proto.Size(x.Update)
892 n += proto.SizeVarint(5<<3 | proto.WireBytes)
893 n += proto.SizeVarint(uint64(s))
895 case *Mutation_Upsert:
896 s := proto.Size(x.Upsert)
897 n += proto.SizeVarint(6<<3 | proto.WireBytes)
898 n += proto.SizeVarint(uint64(s))
900 case *Mutation_Delete:
901 s := proto.Size(x.Delete)
902 n += proto.SizeVarint(7<<3 | proto.WireBytes)
903 n += proto.SizeVarint(uint64(s))
907 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
909 // conflict_detection_strategy
910 switch x := m.ConflictDetectionStrategy.(type) {
911 case *Mutation_BaseVersion:
912 n += proto.SizeVarint(8<<3 | proto.WireVarint)
913 n += proto.SizeVarint(uint64(x.BaseVersion))
916 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
921 // The result of applying a mutation.
922 type MutationResult struct {
923 // The automatically allocated key.
924 // Set only when the mutation allocated a key.
925 Key *Key `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
926 // The version of the entity on the server after processing the mutation. If
927 // the mutation doesn't change anything on the server, then the version will
928 // be the version of the current entity or, if no entity is present, a version
929 // that is strictly greater than the version of any previous entity and less
930 // than the version of any possible future entity.
931 Version int64 `protobuf:"varint,4,opt,name=version" json:"version,omitempty"`
932 // Whether a conflict was detected for this mutation. Always false when a
933 // conflict detection strategy field is not set in the mutation.
934 ConflictDetected bool `protobuf:"varint,5,opt,name=conflict_detected,json=conflictDetected" json:"conflict_detected,omitempty"`
937 func (m *MutationResult) Reset() { *m = MutationResult{} }
938 func (m *MutationResult) String() string { return proto.CompactTextString(m) }
939 func (*MutationResult) ProtoMessage() {}
940 func (*MutationResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
942 func (m *MutationResult) GetKey() *Key {
949 func (m *MutationResult) GetVersion() int64 {
956 func (m *MutationResult) GetConflictDetected() bool {
958 return m.ConflictDetected
963 // The options shared by read requests.
964 type ReadOptions struct {
965 // If not specified, lookups and ancestor queries default to
966 // `read_consistency`=`STRONG`, global queries default to
967 // `read_consistency`=`EVENTUAL`.
969 // Types that are valid to be assigned to ConsistencyType:
970 // *ReadOptions_ReadConsistency_
971 // *ReadOptions_Transaction
972 ConsistencyType isReadOptions_ConsistencyType `protobuf_oneof:"consistency_type"`
975 func (m *ReadOptions) Reset() { *m = ReadOptions{} }
976 func (m *ReadOptions) String() string { return proto.CompactTextString(m) }
977 func (*ReadOptions) ProtoMessage() {}
978 func (*ReadOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
980 type isReadOptions_ConsistencyType interface {
981 isReadOptions_ConsistencyType()
984 type ReadOptions_ReadConsistency_ struct {
985 ReadConsistency ReadOptions_ReadConsistency `protobuf:"varint,1,opt,name=read_consistency,json=readConsistency,enum=google.datastore.v1beta3.ReadOptions_ReadConsistency,oneof"`
987 type ReadOptions_Transaction struct {
988 Transaction []byte `protobuf:"bytes,2,opt,name=transaction,proto3,oneof"`
991 func (*ReadOptions_ReadConsistency_) isReadOptions_ConsistencyType() {}
992 func (*ReadOptions_Transaction) isReadOptions_ConsistencyType() {}
994 func (m *ReadOptions) GetConsistencyType() isReadOptions_ConsistencyType {
996 return m.ConsistencyType
1001 func (m *ReadOptions) GetReadConsistency() ReadOptions_ReadConsistency {
1002 if x, ok := m.GetConsistencyType().(*ReadOptions_ReadConsistency_); ok {
1003 return x.ReadConsistency
1005 return ReadOptions_READ_CONSISTENCY_UNSPECIFIED
1008 func (m *ReadOptions) GetTransaction() []byte {
1009 if x, ok := m.GetConsistencyType().(*ReadOptions_Transaction); ok {
1010 return x.Transaction
1015 // XXX_OneofFuncs is for the internal use of the proto package.
1016 func (*ReadOptions) 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{}) {
1017 return _ReadOptions_OneofMarshaler, _ReadOptions_OneofUnmarshaler, _ReadOptions_OneofSizer, []interface{}{
1018 (*ReadOptions_ReadConsistency_)(nil),
1019 (*ReadOptions_Transaction)(nil),
1023 func _ReadOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
1024 m := msg.(*ReadOptions)
1026 switch x := m.ConsistencyType.(type) {
1027 case *ReadOptions_ReadConsistency_:
1028 b.EncodeVarint(1<<3 | proto.WireVarint)
1029 b.EncodeVarint(uint64(x.ReadConsistency))
1030 case *ReadOptions_Transaction:
1031 b.EncodeVarint(2<<3 | proto.WireBytes)
1032 b.EncodeRawBytes(x.Transaction)
1035 return fmt.Errorf("ReadOptions.ConsistencyType has unexpected type %T", x)
1040 func _ReadOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
1041 m := msg.(*ReadOptions)
1043 case 1: // consistency_type.read_consistency
1044 if wire != proto.WireVarint {
1045 return true, proto.ErrInternalBadWireType
1047 x, err := b.DecodeVarint()
1048 m.ConsistencyType = &ReadOptions_ReadConsistency_{ReadOptions_ReadConsistency(x)}
1050 case 2: // consistency_type.transaction
1051 if wire != proto.WireBytes {
1052 return true, proto.ErrInternalBadWireType
1054 x, err := b.DecodeRawBytes(true)
1055 m.ConsistencyType = &ReadOptions_Transaction{x}
1062 func _ReadOptions_OneofSizer(msg proto.Message) (n int) {
1063 m := msg.(*ReadOptions)
1065 switch x := m.ConsistencyType.(type) {
1066 case *ReadOptions_ReadConsistency_:
1067 n += proto.SizeVarint(1<<3 | proto.WireVarint)
1068 n += proto.SizeVarint(uint64(x.ReadConsistency))
1069 case *ReadOptions_Transaction:
1070 n += proto.SizeVarint(2<<3 | proto.WireBytes)
1071 n += proto.SizeVarint(uint64(len(x.Transaction)))
1072 n += len(x.Transaction)
1075 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
1080 // Options for beginning a new transaction.
1081 type TransactionOptions struct {
1082 // The `mode` of the transaction, indicating whether write operations are
1085 // Types that are valid to be assigned to Mode:
1086 // *TransactionOptions_ReadWrite_
1087 // *TransactionOptions_ReadOnly_
1088 Mode isTransactionOptions_Mode `protobuf_oneof:"mode"`
1091 func (m *TransactionOptions) Reset() { *m = TransactionOptions{} }
1092 func (m *TransactionOptions) String() string { return proto.CompactTextString(m) }
1093 func (*TransactionOptions) ProtoMessage() {}
1094 func (*TransactionOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
1096 type isTransactionOptions_Mode interface {
1097 isTransactionOptions_Mode()
1100 type TransactionOptions_ReadWrite_ struct {
1101 ReadWrite *TransactionOptions_ReadWrite `protobuf:"bytes,1,opt,name=read_write,json=readWrite,oneof"`
1103 type TransactionOptions_ReadOnly_ struct {
1104 ReadOnly *TransactionOptions_ReadOnly `protobuf:"bytes,2,opt,name=read_only,json=readOnly,oneof"`
1107 func (*TransactionOptions_ReadWrite_) isTransactionOptions_Mode() {}
1108 func (*TransactionOptions_ReadOnly_) isTransactionOptions_Mode() {}
1110 func (m *TransactionOptions) GetMode() isTransactionOptions_Mode {
1117 func (m *TransactionOptions) GetReadWrite() *TransactionOptions_ReadWrite {
1118 if x, ok := m.GetMode().(*TransactionOptions_ReadWrite_); ok {
1124 func (m *TransactionOptions) GetReadOnly() *TransactionOptions_ReadOnly {
1125 if x, ok := m.GetMode().(*TransactionOptions_ReadOnly_); ok {
1131 // XXX_OneofFuncs is for the internal use of the proto package.
1132 func (*TransactionOptions) 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{}) {
1133 return _TransactionOptions_OneofMarshaler, _TransactionOptions_OneofUnmarshaler, _TransactionOptions_OneofSizer, []interface{}{
1134 (*TransactionOptions_ReadWrite_)(nil),
1135 (*TransactionOptions_ReadOnly_)(nil),
1139 func _TransactionOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
1140 m := msg.(*TransactionOptions)
1142 switch x := m.Mode.(type) {
1143 case *TransactionOptions_ReadWrite_:
1144 b.EncodeVarint(1<<3 | proto.WireBytes)
1145 if err := b.EncodeMessage(x.ReadWrite); err != nil {
1148 case *TransactionOptions_ReadOnly_:
1149 b.EncodeVarint(2<<3 | proto.WireBytes)
1150 if err := b.EncodeMessage(x.ReadOnly); err != nil {
1155 return fmt.Errorf("TransactionOptions.Mode has unexpected type %T", x)
1160 func _TransactionOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
1161 m := msg.(*TransactionOptions)
1163 case 1: // mode.read_write
1164 if wire != proto.WireBytes {
1165 return true, proto.ErrInternalBadWireType
1167 msg := new(TransactionOptions_ReadWrite)
1168 err := b.DecodeMessage(msg)
1169 m.Mode = &TransactionOptions_ReadWrite_{msg}
1171 case 2: // mode.read_only
1172 if wire != proto.WireBytes {
1173 return true, proto.ErrInternalBadWireType
1175 msg := new(TransactionOptions_ReadOnly)
1176 err := b.DecodeMessage(msg)
1177 m.Mode = &TransactionOptions_ReadOnly_{msg}
1184 func _TransactionOptions_OneofSizer(msg proto.Message) (n int) {
1185 m := msg.(*TransactionOptions)
1187 switch x := m.Mode.(type) {
1188 case *TransactionOptions_ReadWrite_:
1189 s := proto.Size(x.ReadWrite)
1190 n += proto.SizeVarint(1<<3 | proto.WireBytes)
1191 n += proto.SizeVarint(uint64(s))
1193 case *TransactionOptions_ReadOnly_:
1194 s := proto.Size(x.ReadOnly)
1195 n += proto.SizeVarint(2<<3 | proto.WireBytes)
1196 n += proto.SizeVarint(uint64(s))
1200 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
1205 // Options specific to read / write transactions.
1206 type TransactionOptions_ReadWrite struct {
1207 // The transaction identifier of the transaction being retried.
1208 PreviousTransaction []byte `protobuf:"bytes,1,opt,name=previous_transaction,json=previousTransaction,proto3" json:"previous_transaction,omitempty"`
1211 func (m *TransactionOptions_ReadWrite) Reset() { *m = TransactionOptions_ReadWrite{} }
1212 func (m *TransactionOptions_ReadWrite) String() string { return proto.CompactTextString(m) }
1213 func (*TransactionOptions_ReadWrite) ProtoMessage() {}
1214 func (*TransactionOptions_ReadWrite) Descriptor() ([]byte, []int) {
1215 return fileDescriptor0, []int{15, 0}
1218 func (m *TransactionOptions_ReadWrite) GetPreviousTransaction() []byte {
1220 return m.PreviousTransaction
1225 // Options specific to read-only transactions.
1226 type TransactionOptions_ReadOnly struct {
1229 func (m *TransactionOptions_ReadOnly) Reset() { *m = TransactionOptions_ReadOnly{} }
1230 func (m *TransactionOptions_ReadOnly) String() string { return proto.CompactTextString(m) }
1231 func (*TransactionOptions_ReadOnly) ProtoMessage() {}
1232 func (*TransactionOptions_ReadOnly) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 1} }
1235 proto.RegisterType((*LookupRequest)(nil), "google.datastore.v1beta3.LookupRequest")
1236 proto.RegisterType((*LookupResponse)(nil), "google.datastore.v1beta3.LookupResponse")
1237 proto.RegisterType((*RunQueryRequest)(nil), "google.datastore.v1beta3.RunQueryRequest")
1238 proto.RegisterType((*RunQueryResponse)(nil), "google.datastore.v1beta3.RunQueryResponse")
1239 proto.RegisterType((*BeginTransactionRequest)(nil), "google.datastore.v1beta3.BeginTransactionRequest")
1240 proto.RegisterType((*BeginTransactionResponse)(nil), "google.datastore.v1beta3.BeginTransactionResponse")
1241 proto.RegisterType((*RollbackRequest)(nil), "google.datastore.v1beta3.RollbackRequest")
1242 proto.RegisterType((*RollbackResponse)(nil), "google.datastore.v1beta3.RollbackResponse")
1243 proto.RegisterType((*CommitRequest)(nil), "google.datastore.v1beta3.CommitRequest")
1244 proto.RegisterType((*CommitResponse)(nil), "google.datastore.v1beta3.CommitResponse")
1245 proto.RegisterType((*AllocateIdsRequest)(nil), "google.datastore.v1beta3.AllocateIdsRequest")
1246 proto.RegisterType((*AllocateIdsResponse)(nil), "google.datastore.v1beta3.AllocateIdsResponse")
1247 proto.RegisterType((*Mutation)(nil), "google.datastore.v1beta3.Mutation")
1248 proto.RegisterType((*MutationResult)(nil), "google.datastore.v1beta3.MutationResult")
1249 proto.RegisterType((*ReadOptions)(nil), "google.datastore.v1beta3.ReadOptions")
1250 proto.RegisterType((*TransactionOptions)(nil), "google.datastore.v1beta3.TransactionOptions")
1251 proto.RegisterType((*TransactionOptions_ReadWrite)(nil), "google.datastore.v1beta3.TransactionOptions.ReadWrite")
1252 proto.RegisterType((*TransactionOptions_ReadOnly)(nil), "google.datastore.v1beta3.TransactionOptions.ReadOnly")
1253 proto.RegisterEnum("google.datastore.v1beta3.CommitRequest_Mode", CommitRequest_Mode_name, CommitRequest_Mode_value)
1254 proto.RegisterEnum("google.datastore.v1beta3.ReadOptions_ReadConsistency", ReadOptions_ReadConsistency_name, ReadOptions_ReadConsistency_value)
1257 // Reference imports to suppress errors if they are not otherwise used.
1258 var _ context.Context
1259 var _ grpc.ClientConn
1261 // This is a compile-time assertion to ensure that this generated file
1262 // is compatible with the grpc package it is being compiled against.
1263 const _ = grpc.SupportPackageIsVersion4
1265 // Client API for Datastore service
1267 type DatastoreClient interface {
1268 // Looks up entities by key.
1269 Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
1270 // Queries for entities.
1271 RunQuery(ctx context.Context, in *RunQueryRequest, opts ...grpc.CallOption) (*RunQueryResponse, error)
1272 // Begins a new transaction.
1273 BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*BeginTransactionResponse, error)
1274 // Commits a transaction, optionally creating, deleting or modifying some
1276 Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error)
1277 // Rolls back a transaction.
1278 Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*RollbackResponse, error)
1279 // Allocates IDs for the given keys, which is useful for referencing an entity
1280 // before it is inserted.
1281 AllocateIds(ctx context.Context, in *AllocateIdsRequest, opts ...grpc.CallOption) (*AllocateIdsResponse, error)
1284 type datastoreClient struct {
1288 func NewDatastoreClient(cc *grpc.ClientConn) DatastoreClient {
1289 return &datastoreClient{cc}
1292 func (c *datastoreClient) Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error) {
1293 out := new(LookupResponse)
1294 err := grpc.Invoke(ctx, "/google.datastore.v1beta3.Datastore/Lookup", in, out, c.cc, opts...)
1301 func (c *datastoreClient) RunQuery(ctx context.Context, in *RunQueryRequest, opts ...grpc.CallOption) (*RunQueryResponse, error) {
1302 out := new(RunQueryResponse)
1303 err := grpc.Invoke(ctx, "/google.datastore.v1beta3.Datastore/RunQuery", in, out, c.cc, opts...)
1310 func (c *datastoreClient) BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*BeginTransactionResponse, error) {
1311 out := new(BeginTransactionResponse)
1312 err := grpc.Invoke(ctx, "/google.datastore.v1beta3.Datastore/BeginTransaction", in, out, c.cc, opts...)
1319 func (c *datastoreClient) Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error) {
1320 out := new(CommitResponse)
1321 err := grpc.Invoke(ctx, "/google.datastore.v1beta3.Datastore/Commit", in, out, c.cc, opts...)
1328 func (c *datastoreClient) Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*RollbackResponse, error) {
1329 out := new(RollbackResponse)
1330 err := grpc.Invoke(ctx, "/google.datastore.v1beta3.Datastore/Rollback", in, out, c.cc, opts...)
1337 func (c *datastoreClient) AllocateIds(ctx context.Context, in *AllocateIdsRequest, opts ...grpc.CallOption) (*AllocateIdsResponse, error) {
1338 out := new(AllocateIdsResponse)
1339 err := grpc.Invoke(ctx, "/google.datastore.v1beta3.Datastore/AllocateIds", in, out, c.cc, opts...)
1346 // Server API for Datastore service
1348 type DatastoreServer interface {
1349 // Looks up entities by key.
1350 Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
1351 // Queries for entities.
1352 RunQuery(context.Context, *RunQueryRequest) (*RunQueryResponse, error)
1353 // Begins a new transaction.
1354 BeginTransaction(context.Context, *BeginTransactionRequest) (*BeginTransactionResponse, error)
1355 // Commits a transaction, optionally creating, deleting or modifying some
1357 Commit(context.Context, *CommitRequest) (*CommitResponse, error)
1358 // Rolls back a transaction.
1359 Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)
1360 // Allocates IDs for the given keys, which is useful for referencing an entity
1361 // before it is inserted.
1362 AllocateIds(context.Context, *AllocateIdsRequest) (*AllocateIdsResponse, error)
1365 func RegisterDatastoreServer(s *grpc.Server, srv DatastoreServer) {
1366 s.RegisterService(&_Datastore_serviceDesc, srv)
1369 func _Datastore_Lookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1370 in := new(LookupRequest)
1371 if err := dec(in); err != nil {
1374 if interceptor == nil {
1375 return srv.(DatastoreServer).Lookup(ctx, in)
1377 info := &grpc.UnaryServerInfo{
1379 FullMethod: "/google.datastore.v1beta3.Datastore/Lookup",
1381 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1382 return srv.(DatastoreServer).Lookup(ctx, req.(*LookupRequest))
1384 return interceptor(ctx, in, info, handler)
1387 func _Datastore_RunQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1388 in := new(RunQueryRequest)
1389 if err := dec(in); err != nil {
1392 if interceptor == nil {
1393 return srv.(DatastoreServer).RunQuery(ctx, in)
1395 info := &grpc.UnaryServerInfo{
1397 FullMethod: "/google.datastore.v1beta3.Datastore/RunQuery",
1399 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1400 return srv.(DatastoreServer).RunQuery(ctx, req.(*RunQueryRequest))
1402 return interceptor(ctx, in, info, handler)
1405 func _Datastore_BeginTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1406 in := new(BeginTransactionRequest)
1407 if err := dec(in); err != nil {
1410 if interceptor == nil {
1411 return srv.(DatastoreServer).BeginTransaction(ctx, in)
1413 info := &grpc.UnaryServerInfo{
1415 FullMethod: "/google.datastore.v1beta3.Datastore/BeginTransaction",
1417 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1418 return srv.(DatastoreServer).BeginTransaction(ctx, req.(*BeginTransactionRequest))
1420 return interceptor(ctx, in, info, handler)
1423 func _Datastore_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1424 in := new(CommitRequest)
1425 if err := dec(in); err != nil {
1428 if interceptor == nil {
1429 return srv.(DatastoreServer).Commit(ctx, in)
1431 info := &grpc.UnaryServerInfo{
1433 FullMethod: "/google.datastore.v1beta3.Datastore/Commit",
1435 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1436 return srv.(DatastoreServer).Commit(ctx, req.(*CommitRequest))
1438 return interceptor(ctx, in, info, handler)
1441 func _Datastore_Rollback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1442 in := new(RollbackRequest)
1443 if err := dec(in); err != nil {
1446 if interceptor == nil {
1447 return srv.(DatastoreServer).Rollback(ctx, in)
1449 info := &grpc.UnaryServerInfo{
1451 FullMethod: "/google.datastore.v1beta3.Datastore/Rollback",
1453 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1454 return srv.(DatastoreServer).Rollback(ctx, req.(*RollbackRequest))
1456 return interceptor(ctx, in, info, handler)
1459 func _Datastore_AllocateIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1460 in := new(AllocateIdsRequest)
1461 if err := dec(in); err != nil {
1464 if interceptor == nil {
1465 return srv.(DatastoreServer).AllocateIds(ctx, in)
1467 info := &grpc.UnaryServerInfo{
1469 FullMethod: "/google.datastore.v1beta3.Datastore/AllocateIds",
1471 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1472 return srv.(DatastoreServer).AllocateIds(ctx, req.(*AllocateIdsRequest))
1474 return interceptor(ctx, in, info, handler)
1477 var _Datastore_serviceDesc = grpc.ServiceDesc{
1478 ServiceName: "google.datastore.v1beta3.Datastore",
1479 HandlerType: (*DatastoreServer)(nil),
1480 Methods: []grpc.MethodDesc{
1482 MethodName: "Lookup",
1483 Handler: _Datastore_Lookup_Handler,
1486 MethodName: "RunQuery",
1487 Handler: _Datastore_RunQuery_Handler,
1490 MethodName: "BeginTransaction",
1491 Handler: _Datastore_BeginTransaction_Handler,
1494 MethodName: "Commit",
1495 Handler: _Datastore_Commit_Handler,
1498 MethodName: "Rollback",
1499 Handler: _Datastore_Rollback_Handler,
1502 MethodName: "AllocateIds",
1503 Handler: _Datastore_AllocateIds_Handler,
1506 Streams: []grpc.StreamDesc{},
1507 Metadata: "google/datastore/v1beta3/datastore.proto",
1510 func init() { proto.RegisterFile("google/datastore/v1beta3/datastore.proto", fileDescriptor0) }
1512 var fileDescriptor0 = []byte{
1513 // 1323 bytes of a gzipped FileDescriptorProto
1514 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdf, 0x6f, 0x1b, 0xc5,
1515 0x13, 0xcf, 0x3a, 0x89, 0x63, 0x8f, 0xf3, 0xc3, 0xdd, 0xf6, 0xfb, 0xc5, 0x32, 0x2d, 0x58, 0x57,
1516 0x4a, 0x4d, 0x28, 0x36, 0x71, 0x09, 0x15, 0xa1, 0x42, 0xb1, 0x1d, 0xb7, 0xb6, 0x68, 0xec, 0xb0,
1517 0x71, 0x5b, 0x81, 0x84, 0xac, 0xb3, 0x6f, 0x63, 0x8e, 0x9c, 0x6f, 0x2f, 0x77, 0xeb, 0x42, 0x84,
1518 0x78, 0xe1, 0x09, 0x81, 0x78, 0x02, 0xd4, 0x67, 0x5e, 0xe1, 0x19, 0xf8, 0x17, 0x90, 0x90, 0x78,
1519 0xe1, 0x5f, 0xe0, 0x8f, 0xe0, 0x11, 0xdd, 0xde, 0x9e, 0xed, 0xb3, 0x7b, 0xf6, 0x05, 0xf1, 0x76,
1520 0x3b, 0x37, 0x9f, 0x99, 0xcf, 0xcc, 0xec, 0xcd, 0xcc, 0x41, 0xbe, 0xcf, 0x58, 0xdf, 0xa0, 0x45,
1521 0x4d, 0xe5, 0xaa, 0xc3, 0x99, 0x4d, 0x8b, 0x4f, 0x76, 0xba, 0x94, 0xab, 0xb7, 0xc7, 0x92, 0x82,
1522 0x65, 0x33, 0xce, 0x70, 0xc6, 0xd3, 0x2c, 0x8c, 0xe5, 0x52, 0x33, 0x7b, 0x55, 0xda, 0x50, 0x2d,
1523 0xbd, 0xa8, 0x9a, 0x26, 0xe3, 0x2a,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0x6c, 0x13, 0x43, 0x7a, 0x6c, 0xd3,
1546 0x63, 0xa2, 0xfc, 0x12, 0x83, 0x8d, 0x2a, 0x1b, 0x0c, 0x74, 0x1e, 0xd1, 0xcd, 0x3e, 0xac, 0x0c,
1547 0x98, 0x46, 0x33, 0xab, 0x39, 0x94, 0xdf, 0x9c, 0x97, 0xa6, 0x80, 0xd5, 0xc2, 0x21, 0xd3, 0x28,
1548 0x11, 0x48, 0xac, 0x3c, 0x83, 0x68, 0x7d, 0x29, 0x40, 0x15, 0xef, 0x43, 0x72, 0x30, 0x94, 0x1d,
1549 0x39, 0x13, 0x17, 0x5f, 0xfc, 0x9c, 0x5b, 0x7b, 0x28, 0x55, 0xc9, 0x18, 0xa4, 0xdc, 0x83, 0x15,
1550 0xd7, 0x27, 0xbe, 0x02, 0xe9, 0xc3, 0xd6, 0x41, 0xad, 0xf3, 0xb0, 0x79, 0x7c, 0x54, 0xab, 0x36,
1551 0xee, 0x35, 0x6a, 0x07, 0xe9, 0x25, 0x7c, 0x09, 0x36, 0xda, 0xa4, 0xdc, 0x3c, 0x2e, 0x57, 0xdb,
1552 0x8d, 0x56, 0xb3, 0xfc, 0x20, 0x8d, 0xf0, 0xff, 0xe0, 0x52, 0xb3, 0xd5, 0xec, 0x04, 0xc5, 0xb1,
1553 0xca, 0xff, 0xe1, 0xca, 0xe4, 0x2d, 0x71, 0xa8, 0x41, 0x7b, 0x9c, 0xd9, 0xca, 0x57, 0x08, 0x36,
1554 0xfd, 0x10, 0x65, 0x55, 0x8f, 0x21, 0xed, 0xfb, 0xef, 0xd8, 0xe2, 0x86, 0xfb, 0x7d, 0x37, 0x1f,
1555 0x81, 0xbb, 0xd7, 0xf2, 0xb6, 0x06, 0x81, 0xb3, 0x83, 0xaf, 0xc3, 0x86, 0x6e, 0x6a, 0xf4, 0xd3,
1556 0xce, 0xd0, 0xd2, 0x54, 0x4e, 0x9d, 0xcc, 0x4a, 0x0e, 0xe5, 0x57, 0xc9, 0xba, 0x10, 0x3e, 0xf4,
1557 0x64, 0xca, 0x09, 0xe0, 0xb2, 0x61, 0xb0, 0x9e, 0xca, 0x69, 0x43, 0x73, 0x22, 0x56, 0xd2, 0x1f,
1558 0x0d, 0x28, 0xfa, 0x68, 0xa8, 0xc3, 0xe5, 0x80, 0x1f, 0x19, 0xf8, 0xbf, 0xb0, 0xf4, 0x5b, 0x0c,
1559 0x12, 0x7e, 0xe8, 0x78, 0x0f, 0xe2, 0xba, 0xe9, 0x50, 0x9b, 0x8b, 0xe0, 0x52, 0xa5, 0xdc, 0xa2,
1560 0xf9, 0x50, 0x5f, 0x22, 0x12, 0xe1, 0x62, 0xbd, 0xcc, 0x88, 0x1b, 0x19, 0x11, 0xeb, 0x21, 0x3c,
1561 0xac, 0xf0, 0x1b, 0xbf, 0x08, 0x56, 0xf8, 0xbd, 0x03, 0x71, 0x8d, 0x1a, 0x94, 0x53, 0xd9, 0x54,
1562 0xe7, 0x47, 0xed, 0x02, 0x3d, 0x75, 0x7c, 0x1d, 0xd6, 0xbb, 0xaa, 0x43, 0x3b, 0x4f, 0xa8, 0xed,
1563 0xb8, 0xf7, 0xdf, 0xad, 0xcb, 0x72, 0x1d, 0x91, 0x94, 0x2b, 0x7d, 0xe4, 0x09, 0x2b, 0x29, 0x48,
1564 0x32, 0x8b, 0xda, 0x22, 0x3d, 0x95, 0x6b, 0xf0, 0x7c, 0x8f, 0x99, 0x27, 0x86, 0xde, 0xe3, 0x1d,
1565 0x8d, 0x72, 0x2a, 0x6f, 0x22, 0xb7, 0x55, 0x4e, 0xfb, 0xe7, 0xca, 0x97, 0x08, 0x36, 0x83, 0xb7,
1566 0x08, 0x17, 0x61, 0xf9, 0x94, 0xfa, 0xb3, 0x62, 0x41, 0x3d, 0x5c, 0x4d, 0x9c, 0x81, 0x35, 0x9f,
1567 0x8f, 0x5b, 0x82, 0x65, 0xe2, 0x1f, 0xf1, 0xab, 0x70, 0x69, 0xca, 0x39, 0xd5, 0x44, 0xaa, 0x13,
1568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