google-cloud-datastore-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-datastore-v1.rb +21 -0
- data/lib/google/cloud/datastore/v1.rb +35 -0
- data/lib/google/cloud/datastore/v1/datastore.rb +53 -0
- data/lib/google/cloud/datastore/v1/datastore/client.rb +893 -0
- data/lib/google/cloud/datastore/v1/datastore/credentials.rb +52 -0
- data/lib/google/cloud/datastore/v1/version.rb +28 -0
- data/lib/google/datastore/v1/datastore_pb.rb +150 -0
- data/lib/google/datastore/v1/datastore_services_pb.rb +66 -0
- data/lib/google/datastore/v1/entity_pb.rb +67 -0
- data/lib/google/datastore/v1/query_pb.rb +135 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/datastore/v1/datastore.rb +349 -0
- data/proto_docs/google/datastore/v1/entity.rb +222 -0
- data/proto_docs/google/datastore/v1/query.rb +348 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +207 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Datastore
|
24
|
+
module V1
|
25
|
+
module Datastore
|
26
|
+
# Credentials for the Datastore API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
30
|
+
"https://www.googleapis.com/auth/datastore"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"DATASTORE_CREDENTIALS",
|
34
|
+
"DATASTORE_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"DATASTORE_CREDENTIALS_JSON",
|
39
|
+
"DATASTORE_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Datastore
|
23
|
+
module V1
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/datastore/v1/datastore.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/datastore/v1/entity_pb'
|
10
|
+
require 'google/datastore/v1/query_pb'
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("google/datastore/v1/datastore.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.datastore.v1.LookupRequest" do
|
14
|
+
optional :project_id, :string, 8
|
15
|
+
optional :read_options, :message, 1, "google.datastore.v1.ReadOptions"
|
16
|
+
repeated :keys, :message, 3, "google.datastore.v1.Key"
|
17
|
+
end
|
18
|
+
add_message "google.datastore.v1.LookupResponse" do
|
19
|
+
repeated :found, :message, 1, "google.datastore.v1.EntityResult"
|
20
|
+
repeated :missing, :message, 2, "google.datastore.v1.EntityResult"
|
21
|
+
repeated :deferred, :message, 3, "google.datastore.v1.Key"
|
22
|
+
end
|
23
|
+
add_message "google.datastore.v1.RunQueryRequest" do
|
24
|
+
optional :project_id, :string, 8
|
25
|
+
optional :partition_id, :message, 2, "google.datastore.v1.PartitionId"
|
26
|
+
optional :read_options, :message, 1, "google.datastore.v1.ReadOptions"
|
27
|
+
oneof :query_type do
|
28
|
+
optional :query, :message, 3, "google.datastore.v1.Query"
|
29
|
+
optional :gql_query, :message, 7, "google.datastore.v1.GqlQuery"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
add_message "google.datastore.v1.RunQueryResponse" do
|
33
|
+
optional :batch, :message, 1, "google.datastore.v1.QueryResultBatch"
|
34
|
+
optional :query, :message, 2, "google.datastore.v1.Query"
|
35
|
+
end
|
36
|
+
add_message "google.datastore.v1.BeginTransactionRequest" do
|
37
|
+
optional :project_id, :string, 8
|
38
|
+
optional :transaction_options, :message, 10, "google.datastore.v1.TransactionOptions"
|
39
|
+
end
|
40
|
+
add_message "google.datastore.v1.BeginTransactionResponse" do
|
41
|
+
optional :transaction, :bytes, 1
|
42
|
+
end
|
43
|
+
add_message "google.datastore.v1.RollbackRequest" do
|
44
|
+
optional :project_id, :string, 8
|
45
|
+
optional :transaction, :bytes, 1
|
46
|
+
end
|
47
|
+
add_message "google.datastore.v1.RollbackResponse" do
|
48
|
+
end
|
49
|
+
add_message "google.datastore.v1.CommitRequest" do
|
50
|
+
optional :project_id, :string, 8
|
51
|
+
optional :mode, :enum, 5, "google.datastore.v1.CommitRequest.Mode"
|
52
|
+
repeated :mutations, :message, 6, "google.datastore.v1.Mutation"
|
53
|
+
oneof :transaction_selector do
|
54
|
+
optional :transaction, :bytes, 1
|
55
|
+
end
|
56
|
+
end
|
57
|
+
add_enum "google.datastore.v1.CommitRequest.Mode" do
|
58
|
+
value :MODE_UNSPECIFIED, 0
|
59
|
+
value :TRANSACTIONAL, 1
|
60
|
+
value :NON_TRANSACTIONAL, 2
|
61
|
+
end
|
62
|
+
add_message "google.datastore.v1.CommitResponse" do
|
63
|
+
repeated :mutation_results, :message, 3, "google.datastore.v1.MutationResult"
|
64
|
+
optional :index_updates, :int32, 4
|
65
|
+
end
|
66
|
+
add_message "google.datastore.v1.AllocateIdsRequest" do
|
67
|
+
optional :project_id, :string, 8
|
68
|
+
repeated :keys, :message, 1, "google.datastore.v1.Key"
|
69
|
+
end
|
70
|
+
add_message "google.datastore.v1.AllocateIdsResponse" do
|
71
|
+
repeated :keys, :message, 1, "google.datastore.v1.Key"
|
72
|
+
end
|
73
|
+
add_message "google.datastore.v1.ReserveIdsRequest" do
|
74
|
+
optional :project_id, :string, 8
|
75
|
+
optional :database_id, :string, 9
|
76
|
+
repeated :keys, :message, 1, "google.datastore.v1.Key"
|
77
|
+
end
|
78
|
+
add_message "google.datastore.v1.ReserveIdsResponse" do
|
79
|
+
end
|
80
|
+
add_message "google.datastore.v1.Mutation" do
|
81
|
+
oneof :operation do
|
82
|
+
optional :insert, :message, 4, "google.datastore.v1.Entity"
|
83
|
+
optional :update, :message, 5, "google.datastore.v1.Entity"
|
84
|
+
optional :upsert, :message, 6, "google.datastore.v1.Entity"
|
85
|
+
optional :delete, :message, 7, "google.datastore.v1.Key"
|
86
|
+
end
|
87
|
+
oneof :conflict_detection_strategy do
|
88
|
+
optional :base_version, :int64, 8
|
89
|
+
end
|
90
|
+
end
|
91
|
+
add_message "google.datastore.v1.MutationResult" do
|
92
|
+
optional :key, :message, 3, "google.datastore.v1.Key"
|
93
|
+
optional :version, :int64, 4
|
94
|
+
optional :conflict_detected, :bool, 5
|
95
|
+
end
|
96
|
+
add_message "google.datastore.v1.ReadOptions" do
|
97
|
+
oneof :consistency_type do
|
98
|
+
optional :read_consistency, :enum, 1, "google.datastore.v1.ReadOptions.ReadConsistency"
|
99
|
+
optional :transaction, :bytes, 2
|
100
|
+
end
|
101
|
+
end
|
102
|
+
add_enum "google.datastore.v1.ReadOptions.ReadConsistency" do
|
103
|
+
value :READ_CONSISTENCY_UNSPECIFIED, 0
|
104
|
+
value :STRONG, 1
|
105
|
+
value :EVENTUAL, 2
|
106
|
+
end
|
107
|
+
add_message "google.datastore.v1.TransactionOptions" do
|
108
|
+
oneof :mode do
|
109
|
+
optional :read_write, :message, 1, "google.datastore.v1.TransactionOptions.ReadWrite"
|
110
|
+
optional :read_only, :message, 2, "google.datastore.v1.TransactionOptions.ReadOnly"
|
111
|
+
end
|
112
|
+
end
|
113
|
+
add_message "google.datastore.v1.TransactionOptions.ReadWrite" do
|
114
|
+
optional :previous_transaction, :bytes, 1
|
115
|
+
end
|
116
|
+
add_message "google.datastore.v1.TransactionOptions.ReadOnly" do
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
module Google
|
122
|
+
module Cloud
|
123
|
+
module Datastore
|
124
|
+
module V1
|
125
|
+
LookupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.LookupRequest").msgclass
|
126
|
+
LookupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.LookupResponse").msgclass
|
127
|
+
RunQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.RunQueryRequest").msgclass
|
128
|
+
RunQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.RunQueryResponse").msgclass
|
129
|
+
BeginTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.BeginTransactionRequest").msgclass
|
130
|
+
BeginTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.BeginTransactionResponse").msgclass
|
131
|
+
RollbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.RollbackRequest").msgclass
|
132
|
+
RollbackResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.RollbackResponse").msgclass
|
133
|
+
CommitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.CommitRequest").msgclass
|
134
|
+
CommitRequest::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.CommitRequest.Mode").enummodule
|
135
|
+
CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.CommitResponse").msgclass
|
136
|
+
AllocateIdsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.AllocateIdsRequest").msgclass
|
137
|
+
AllocateIdsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.AllocateIdsResponse").msgclass
|
138
|
+
ReserveIdsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.ReserveIdsRequest").msgclass
|
139
|
+
ReserveIdsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.ReserveIdsResponse").msgclass
|
140
|
+
Mutation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Mutation").msgclass
|
141
|
+
MutationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.MutationResult").msgclass
|
142
|
+
ReadOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.ReadOptions").msgclass
|
143
|
+
ReadOptions::ReadConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.ReadOptions.ReadConsistency").enummodule
|
144
|
+
TransactionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.TransactionOptions").msgclass
|
145
|
+
TransactionOptions::ReadWrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.TransactionOptions.ReadWrite").msgclass
|
146
|
+
TransactionOptions::ReadOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.TransactionOptions.ReadOnly").msgclass
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/datastore/v1/datastore.proto for package 'Google.Cloud.Datastore.V1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2019 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/datastore/v1/datastore_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Datastore
|
25
|
+
module V1
|
26
|
+
module Datastore
|
27
|
+
# Each RPC normalizes the partition IDs of the keys in its input entities,
|
28
|
+
# and always returns entities with keys with normalized partition IDs.
|
29
|
+
# This applies to all keys and entities, including those in values, except keys
|
30
|
+
# with both an empty path and an empty or unset partition ID. Normalization of
|
31
|
+
# input keys sets the project ID (if not already set) to the project ID from
|
32
|
+
# the request.
|
33
|
+
#
|
34
|
+
class Service
|
35
|
+
|
36
|
+
include GRPC::GenericService
|
37
|
+
|
38
|
+
self.marshal_class_method = :encode
|
39
|
+
self.unmarshal_class_method = :decode
|
40
|
+
self.service_name = 'google.datastore.v1.Datastore'
|
41
|
+
|
42
|
+
# Looks up entities by key.
|
43
|
+
rpc :Lookup, Google::Cloud::Datastore::V1::LookupRequest, Google::Cloud::Datastore::V1::LookupResponse
|
44
|
+
# Queries for entities.
|
45
|
+
rpc :RunQuery, Google::Cloud::Datastore::V1::RunQueryRequest, Google::Cloud::Datastore::V1::RunQueryResponse
|
46
|
+
# Begins a new transaction.
|
47
|
+
rpc :BeginTransaction, Google::Cloud::Datastore::V1::BeginTransactionRequest, Google::Cloud::Datastore::V1::BeginTransactionResponse
|
48
|
+
# Commits a transaction, optionally creating, deleting or modifying some
|
49
|
+
# entities.
|
50
|
+
rpc :Commit, Google::Cloud::Datastore::V1::CommitRequest, Google::Cloud::Datastore::V1::CommitResponse
|
51
|
+
# Rolls back a transaction.
|
52
|
+
rpc :Rollback, Google::Cloud::Datastore::V1::RollbackRequest, Google::Cloud::Datastore::V1::RollbackResponse
|
53
|
+
# Allocates IDs for the given keys, which is useful for referencing an entity
|
54
|
+
# before it is inserted.
|
55
|
+
rpc :AllocateIds, Google::Cloud::Datastore::V1::AllocateIdsRequest, Google::Cloud::Datastore::V1::AllocateIdsResponse
|
56
|
+
# Prevents the supplied keys' IDs from being auto-allocated by Cloud
|
57
|
+
# Datastore.
|
58
|
+
rpc :ReserveIds, Google::Cloud::Datastore::V1::ReserveIdsRequest, Google::Cloud::Datastore::V1::ReserveIdsResponse
|
59
|
+
end
|
60
|
+
|
61
|
+
Stub = Service.rpc_stub_class
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/datastore/v1/entity.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/protobuf/struct_pb'
|
8
|
+
require 'google/protobuf/timestamp_pb'
|
9
|
+
require 'google/type/latlng_pb'
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_file("google/datastore/v1/entity.proto", :syntax => :proto3) do
|
12
|
+
add_message "google.datastore.v1.PartitionId" do
|
13
|
+
optional :project_id, :string, 2
|
14
|
+
optional :namespace_id, :string, 4
|
15
|
+
end
|
16
|
+
add_message "google.datastore.v1.Key" do
|
17
|
+
optional :partition_id, :message, 1, "google.datastore.v1.PartitionId"
|
18
|
+
repeated :path, :message, 2, "google.datastore.v1.Key.PathElement"
|
19
|
+
end
|
20
|
+
add_message "google.datastore.v1.Key.PathElement" do
|
21
|
+
optional :kind, :string, 1
|
22
|
+
oneof :id_type do
|
23
|
+
optional :id, :int64, 2
|
24
|
+
optional :name, :string, 3
|
25
|
+
end
|
26
|
+
end
|
27
|
+
add_message "google.datastore.v1.ArrayValue" do
|
28
|
+
repeated :values, :message, 1, "google.datastore.v1.Value"
|
29
|
+
end
|
30
|
+
add_message "google.datastore.v1.Value" do
|
31
|
+
optional :meaning, :int32, 14
|
32
|
+
optional :exclude_from_indexes, :bool, 19
|
33
|
+
oneof :value_type do
|
34
|
+
optional :null_value, :enum, 11, "google.protobuf.NullValue"
|
35
|
+
optional :boolean_value, :bool, 1
|
36
|
+
optional :integer_value, :int64, 2
|
37
|
+
optional :double_value, :double, 3
|
38
|
+
optional :timestamp_value, :message, 10, "google.protobuf.Timestamp"
|
39
|
+
optional :key_value, :message, 5, "google.datastore.v1.Key"
|
40
|
+
optional :string_value, :string, 17
|
41
|
+
optional :blob_value, :bytes, 18
|
42
|
+
optional :geo_point_value, :message, 8, "google.type.LatLng"
|
43
|
+
optional :entity_value, :message, 6, "google.datastore.v1.Entity"
|
44
|
+
optional :array_value, :message, 9, "google.datastore.v1.ArrayValue"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
add_message "google.datastore.v1.Entity" do
|
48
|
+
optional :key, :message, 1, "google.datastore.v1.Key"
|
49
|
+
map :properties, :string, :message, 3, "google.datastore.v1.Value"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
module Google
|
55
|
+
module Cloud
|
56
|
+
module Datastore
|
57
|
+
module V1
|
58
|
+
PartitionId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.PartitionId").msgclass
|
59
|
+
Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Key").msgclass
|
60
|
+
Key::PathElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Key.PathElement").msgclass
|
61
|
+
ArrayValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.ArrayValue").msgclass
|
62
|
+
Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Value").msgclass
|
63
|
+
Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Entity").msgclass
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/datastore/v1/query.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/datastore/v1/entity_pb'
|
8
|
+
require 'google/protobuf/wrappers_pb'
|
9
|
+
require 'google/type/latlng_pb'
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_file("google/datastore/v1/query.proto", :syntax => :proto3) do
|
12
|
+
add_message "google.datastore.v1.EntityResult" do
|
13
|
+
optional :entity, :message, 1, "google.datastore.v1.Entity"
|
14
|
+
optional :version, :int64, 4
|
15
|
+
optional :cursor, :bytes, 3
|
16
|
+
end
|
17
|
+
add_enum "google.datastore.v1.EntityResult.ResultType" do
|
18
|
+
value :RESULT_TYPE_UNSPECIFIED, 0
|
19
|
+
value :FULL, 1
|
20
|
+
value :PROJECTION, 2
|
21
|
+
value :KEY_ONLY, 3
|
22
|
+
end
|
23
|
+
add_message "google.datastore.v1.Query" do
|
24
|
+
repeated :projection, :message, 2, "google.datastore.v1.Projection"
|
25
|
+
repeated :kind, :message, 3, "google.datastore.v1.KindExpression"
|
26
|
+
optional :filter, :message, 4, "google.datastore.v1.Filter"
|
27
|
+
repeated :order, :message, 5, "google.datastore.v1.PropertyOrder"
|
28
|
+
repeated :distinct_on, :message, 6, "google.datastore.v1.PropertyReference"
|
29
|
+
optional :start_cursor, :bytes, 7
|
30
|
+
optional :end_cursor, :bytes, 8
|
31
|
+
optional :offset, :int32, 10
|
32
|
+
optional :limit, :message, 12, "google.protobuf.Int32Value"
|
33
|
+
end
|
34
|
+
add_message "google.datastore.v1.KindExpression" do
|
35
|
+
optional :name, :string, 1
|
36
|
+
end
|
37
|
+
add_message "google.datastore.v1.PropertyReference" do
|
38
|
+
optional :name, :string, 2
|
39
|
+
end
|
40
|
+
add_message "google.datastore.v1.Projection" do
|
41
|
+
optional :property, :message, 1, "google.datastore.v1.PropertyReference"
|
42
|
+
end
|
43
|
+
add_message "google.datastore.v1.PropertyOrder" do
|
44
|
+
optional :property, :message, 1, "google.datastore.v1.PropertyReference"
|
45
|
+
optional :direction, :enum, 2, "google.datastore.v1.PropertyOrder.Direction"
|
46
|
+
end
|
47
|
+
add_enum "google.datastore.v1.PropertyOrder.Direction" do
|
48
|
+
value :DIRECTION_UNSPECIFIED, 0
|
49
|
+
value :ASCENDING, 1
|
50
|
+
value :DESCENDING, 2
|
51
|
+
end
|
52
|
+
add_message "google.datastore.v1.Filter" do
|
53
|
+
oneof :filter_type do
|
54
|
+
optional :composite_filter, :message, 1, "google.datastore.v1.CompositeFilter"
|
55
|
+
optional :property_filter, :message, 2, "google.datastore.v1.PropertyFilter"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
add_message "google.datastore.v1.CompositeFilter" do
|
59
|
+
optional :op, :enum, 1, "google.datastore.v1.CompositeFilter.Operator"
|
60
|
+
repeated :filters, :message, 2, "google.datastore.v1.Filter"
|
61
|
+
end
|
62
|
+
add_enum "google.datastore.v1.CompositeFilter.Operator" do
|
63
|
+
value :OPERATOR_UNSPECIFIED, 0
|
64
|
+
value :AND, 1
|
65
|
+
end
|
66
|
+
add_message "google.datastore.v1.PropertyFilter" do
|
67
|
+
optional :property, :message, 1, "google.datastore.v1.PropertyReference"
|
68
|
+
optional :op, :enum, 2, "google.datastore.v1.PropertyFilter.Operator"
|
69
|
+
optional :value, :message, 3, "google.datastore.v1.Value"
|
70
|
+
end
|
71
|
+
add_enum "google.datastore.v1.PropertyFilter.Operator" do
|
72
|
+
value :OPERATOR_UNSPECIFIED, 0
|
73
|
+
value :LESS_THAN, 1
|
74
|
+
value :LESS_THAN_OR_EQUAL, 2
|
75
|
+
value :GREATER_THAN, 3
|
76
|
+
value :GREATER_THAN_OR_EQUAL, 4
|
77
|
+
value :EQUAL, 5
|
78
|
+
value :HAS_ANCESTOR, 11
|
79
|
+
end
|
80
|
+
add_message "google.datastore.v1.GqlQuery" do
|
81
|
+
optional :query_string, :string, 1
|
82
|
+
optional :allow_literals, :bool, 2
|
83
|
+
map :named_bindings, :string, :message, 5, "google.datastore.v1.GqlQueryParameter"
|
84
|
+
repeated :positional_bindings, :message, 4, "google.datastore.v1.GqlQueryParameter"
|
85
|
+
end
|
86
|
+
add_message "google.datastore.v1.GqlQueryParameter" do
|
87
|
+
oneof :parameter_type do
|
88
|
+
optional :value, :message, 2, "google.datastore.v1.Value"
|
89
|
+
optional :cursor, :bytes, 3
|
90
|
+
end
|
91
|
+
end
|
92
|
+
add_message "google.datastore.v1.QueryResultBatch" do
|
93
|
+
optional :skipped_results, :int32, 6
|
94
|
+
optional :skipped_cursor, :bytes, 3
|
95
|
+
optional :entity_result_type, :enum, 1, "google.datastore.v1.EntityResult.ResultType"
|
96
|
+
repeated :entity_results, :message, 2, "google.datastore.v1.EntityResult"
|
97
|
+
optional :end_cursor, :bytes, 4
|
98
|
+
optional :more_results, :enum, 5, "google.datastore.v1.QueryResultBatch.MoreResultsType"
|
99
|
+
optional :snapshot_version, :int64, 7
|
100
|
+
end
|
101
|
+
add_enum "google.datastore.v1.QueryResultBatch.MoreResultsType" do
|
102
|
+
value :MORE_RESULTS_TYPE_UNSPECIFIED, 0
|
103
|
+
value :NOT_FINISHED, 1
|
104
|
+
value :MORE_RESULTS_AFTER_LIMIT, 2
|
105
|
+
value :MORE_RESULTS_AFTER_CURSOR, 4
|
106
|
+
value :NO_MORE_RESULTS, 3
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
module Google
|
112
|
+
module Cloud
|
113
|
+
module Datastore
|
114
|
+
module V1
|
115
|
+
EntityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.EntityResult").msgclass
|
116
|
+
EntityResult::ResultType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.EntityResult.ResultType").enummodule
|
117
|
+
Query = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Query").msgclass
|
118
|
+
KindExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.KindExpression").msgclass
|
119
|
+
PropertyReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.PropertyReference").msgclass
|
120
|
+
Projection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Projection").msgclass
|
121
|
+
PropertyOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.PropertyOrder").msgclass
|
122
|
+
PropertyOrder::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.PropertyOrder.Direction").enummodule
|
123
|
+
Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.Filter").msgclass
|
124
|
+
CompositeFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.CompositeFilter").msgclass
|
125
|
+
CompositeFilter::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.CompositeFilter.Operator").enummodule
|
126
|
+
PropertyFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.PropertyFilter").msgclass
|
127
|
+
PropertyFilter::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.PropertyFilter.Operator").enummodule
|
128
|
+
GqlQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.GqlQuery").msgclass
|
129
|
+
GqlQueryParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.GqlQueryParameter").msgclass
|
130
|
+
QueryResultBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.QueryResultBatch").msgclass
|
131
|
+
QueryResultBatch::MoreResultsType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.v1.QueryResultBatch.MoreResultsType").enummodule
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|