google-cloud-datastore 1.8.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +2 -1
- data/CHANGELOG.md +23 -0
- data/lib/google-cloud-datastore.rb +12 -18
- data/lib/google/cloud/datastore.rb +12 -11
- data/lib/google/cloud/datastore/commit.rb +4 -4
- data/lib/google/cloud/datastore/convert.rb +4 -4
- data/lib/google/cloud/datastore/credentials.rb +2 -2
- data/lib/google/cloud/datastore/entity.rb +3 -3
- data/lib/google/cloud/datastore/gql_query.rb +5 -5
- data/lib/google/cloud/datastore/key.rb +5 -5
- data/lib/google/cloud/datastore/properties.rb +1 -1
- data/lib/google/cloud/datastore/query.rb +12 -12
- data/lib/google/cloud/datastore/service.rb +31 -86
- data/lib/google/cloud/datastore/version.rb +1 -1
- metadata +8 -63
- data/lib/google/cloud/datastore/v1.rb +0 -16
- data/lib/google/cloud/datastore/v1/credentials.rb +0 -39
- data/lib/google/cloud/datastore/v1/datastore_client.rb +0 -577
- data/lib/google/cloud/datastore/v1/datastore_client_config.json +0 -61
- data/lib/google/cloud/datastore/v1/doc/google/datastore/v1/datastore.rb +0 -283
- data/lib/google/cloud/datastore/v1/doc/google/datastore/v1/entity.rb +0 -189
- data/lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb +0 -297
- data/lib/google/cloud/datastore/v1/doc/google/protobuf/struct.rb +0 -74
- data/lib/google/cloud/datastore/v1/doc/google/protobuf/timestamp.rb +0 -109
- data/lib/google/cloud/datastore/v1/doc/google/protobuf/wrappers.rb +0 -26
- data/lib/google/cloud/datastore/v1/doc/google/type/latlng.rb +0 -65
- data/lib/google/datastore/v1/datastore_pb.rb +0 -147
- data/lib/google/datastore/v1/datastore_services_pb.rb +0 -65
- data/lib/google/datastore/v1/entity_pb.rb +0 -64
- data/lib/google/datastore/v1/query_pb.rb +0 -132
@@ -1,61 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"interfaces": {
|
3
|
-
"google.datastore.v1.Datastore": {
|
4
|
-
"retry_codes": {
|
5
|
-
"idempotent": [
|
6
|
-
"DEADLINE_EXCEEDED",
|
7
|
-
"UNAVAILABLE"
|
8
|
-
],
|
9
|
-
"non_idempotent": []
|
10
|
-
},
|
11
|
-
"retry_params": {
|
12
|
-
"default": {
|
13
|
-
"initial_retry_delay_millis": 100,
|
14
|
-
"retry_delay_multiplier": 1.3,
|
15
|
-
"max_retry_delay_millis": 60000,
|
16
|
-
"initial_rpc_timeout_millis": 60000,
|
17
|
-
"rpc_timeout_multiplier": 1.0,
|
18
|
-
"max_rpc_timeout_millis": 60000,
|
19
|
-
"total_timeout_millis": 600000
|
20
|
-
}
|
21
|
-
},
|
22
|
-
"methods": {
|
23
|
-
"Lookup": {
|
24
|
-
"timeout_millis": 60000,
|
25
|
-
"retry_codes_name": "idempotent",
|
26
|
-
"retry_params_name": "default"
|
27
|
-
},
|
28
|
-
"RunQuery": {
|
29
|
-
"timeout_millis": 60000,
|
30
|
-
"retry_codes_name": "idempotent",
|
31
|
-
"retry_params_name": "default"
|
32
|
-
},
|
33
|
-
"ReserveIds": {
|
34
|
-
"timeout_millis": 60000,
|
35
|
-
"retry_codes_name": "idempotent",
|
36
|
-
"retry_params_name": "default"
|
37
|
-
},
|
38
|
-
"BeginTransaction": {
|
39
|
-
"timeout_millis": 60000,
|
40
|
-
"retry_codes_name": "non_idempotent",
|
41
|
-
"retry_params_name": "default"
|
42
|
-
},
|
43
|
-
"Commit": {
|
44
|
-
"timeout_millis": 60000,
|
45
|
-
"retry_codes_name": "non_idempotent",
|
46
|
-
"retry_params_name": "default"
|
47
|
-
},
|
48
|
-
"Rollback": {
|
49
|
-
"timeout_millis": 60000,
|
50
|
-
"retry_codes_name": "non_idempotent",
|
51
|
-
"retry_params_name": "default"
|
52
|
-
},
|
53
|
-
"AllocateIds": {
|
54
|
-
"timeout_millis": 60000,
|
55
|
-
"retry_codes_name": "non_idempotent",
|
56
|
-
"retry_params_name": "default"
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
@@ -1,283 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Datastore
|
18
|
-
module V1
|
19
|
-
# The request for {Google::Datastore::V1::Datastore::Lookup Datastore::Lookup}.
|
20
|
-
# @!attribute [rw] project_id
|
21
|
-
# @return [String]
|
22
|
-
# Required. The ID of the project against which to make the request.
|
23
|
-
# @!attribute [rw] read_options
|
24
|
-
# @return [Google::Datastore::V1::ReadOptions]
|
25
|
-
# The options for this lookup request.
|
26
|
-
# @!attribute [rw] keys
|
27
|
-
# @return [Array<Google::Datastore::V1::Key>]
|
28
|
-
# Required. Keys of entities to look up.
|
29
|
-
class LookupRequest; end
|
30
|
-
|
31
|
-
# The response for {Google::Datastore::V1::Datastore::Lookup Datastore::Lookup}.
|
32
|
-
# @!attribute [rw] found
|
33
|
-
# @return [Array<Google::Datastore::V1::EntityResult>]
|
34
|
-
# Entities found as `ResultType.FULL` entities. The order of results in this
|
35
|
-
# field is undefined and has no relation to the order of the keys in the
|
36
|
-
# input.
|
37
|
-
# @!attribute [rw] missing
|
38
|
-
# @return [Array<Google::Datastore::V1::EntityResult>]
|
39
|
-
# Entities not found as `ResultType.KEY_ONLY` entities. The order of results
|
40
|
-
# in this field is undefined and has no relation to the order of the keys
|
41
|
-
# in the input.
|
42
|
-
# @!attribute [rw] deferred
|
43
|
-
# @return [Array<Google::Datastore::V1::Key>]
|
44
|
-
# A list of keys that were not looked up due to resource constraints. The
|
45
|
-
# order of results in this field is undefined and has no relation to the
|
46
|
-
# order of the keys in the input.
|
47
|
-
class LookupResponse; end
|
48
|
-
|
49
|
-
# The request for {Google::Datastore::V1::Datastore::RunQuery Datastore::RunQuery}.
|
50
|
-
# @!attribute [rw] project_id
|
51
|
-
# @return [String]
|
52
|
-
# Required. The ID of the project against which to make the request.
|
53
|
-
# @!attribute [rw] partition_id
|
54
|
-
# @return [Google::Datastore::V1::PartitionId]
|
55
|
-
# Entities are partitioned into subsets, identified by a partition ID.
|
56
|
-
# Queries are scoped to a single partition.
|
57
|
-
# This partition ID is normalized with the standard default context
|
58
|
-
# partition ID.
|
59
|
-
# @!attribute [rw] read_options
|
60
|
-
# @return [Google::Datastore::V1::ReadOptions]
|
61
|
-
# The options for this query.
|
62
|
-
# @!attribute [rw] query
|
63
|
-
# @return [Google::Datastore::V1::Query]
|
64
|
-
# The query to run.
|
65
|
-
# @!attribute [rw] gql_query
|
66
|
-
# @return [Google::Datastore::V1::GqlQuery]
|
67
|
-
# The GQL query to run.
|
68
|
-
class RunQueryRequest; end
|
69
|
-
|
70
|
-
# The response for {Google::Datastore::V1::Datastore::RunQuery Datastore::RunQuery}.
|
71
|
-
# @!attribute [rw] batch
|
72
|
-
# @return [Google::Datastore::V1::QueryResultBatch]
|
73
|
-
# A batch of query results (always present).
|
74
|
-
# @!attribute [rw] query
|
75
|
-
# @return [Google::Datastore::V1::Query]
|
76
|
-
# The parsed form of the `GqlQuery` from the request, if it was set.
|
77
|
-
class RunQueryResponse; end
|
78
|
-
|
79
|
-
# The request for {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
|
80
|
-
# @!attribute [rw] project_id
|
81
|
-
# @return [String]
|
82
|
-
# Required. The ID of the project against which to make the request.
|
83
|
-
# @!attribute [rw] transaction_options
|
84
|
-
# @return [Google::Datastore::V1::TransactionOptions]
|
85
|
-
# Options for a new transaction.
|
86
|
-
class BeginTransactionRequest; end
|
87
|
-
|
88
|
-
# The response for {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
|
89
|
-
# @!attribute [rw] transaction
|
90
|
-
# @return [String]
|
91
|
-
# The transaction identifier (always present).
|
92
|
-
class BeginTransactionResponse; end
|
93
|
-
|
94
|
-
# The request for {Google::Datastore::V1::Datastore::Rollback Datastore::Rollback}.
|
95
|
-
# @!attribute [rw] project_id
|
96
|
-
# @return [String]
|
97
|
-
# Required. The ID of the project against which to make the request.
|
98
|
-
# @!attribute [rw] transaction
|
99
|
-
# @return [String]
|
100
|
-
# Required. The transaction identifier, returned by a call to
|
101
|
-
# {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
|
102
|
-
class RollbackRequest; end
|
103
|
-
|
104
|
-
# The response for {Google::Datastore::V1::Datastore::Rollback Datastore::Rollback}.
|
105
|
-
# (an empty message).
|
106
|
-
class RollbackResponse; end
|
107
|
-
|
108
|
-
# The request for {Google::Datastore::V1::Datastore::Commit Datastore::Commit}.
|
109
|
-
# @!attribute [rw] project_id
|
110
|
-
# @return [String]
|
111
|
-
# Required. The ID of the project against which to make the request.
|
112
|
-
# @!attribute [rw] mode
|
113
|
-
# @return [Google::Datastore::V1::CommitRequest::Mode]
|
114
|
-
# The type of commit to perform. Defaults to `TRANSACTIONAL`.
|
115
|
-
# @!attribute [rw] transaction
|
116
|
-
# @return [String]
|
117
|
-
# The identifier of the transaction associated with the commit. A
|
118
|
-
# transaction identifier is returned by a call to
|
119
|
-
# {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
|
120
|
-
# @!attribute [rw] mutations
|
121
|
-
# @return [Array<Google::Datastore::V1::Mutation>]
|
122
|
-
# The mutations to perform.
|
123
|
-
#
|
124
|
-
# When mode is `TRANSACTIONAL`, mutations affecting a single entity are
|
125
|
-
# applied in order. The following sequences of mutations affecting a single
|
126
|
-
# entity are not permitted in a single `Commit` request:
|
127
|
-
#
|
128
|
-
# * `insert` followed by `insert`
|
129
|
-
# * `update` followed by `insert`
|
130
|
-
# * `upsert` followed by `insert`
|
131
|
-
# * `delete` followed by `update`
|
132
|
-
#
|
133
|
-
# When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
|
134
|
-
# entity.
|
135
|
-
class CommitRequest
|
136
|
-
# The modes available for commits.
|
137
|
-
module Mode
|
138
|
-
# Unspecified. This value must not be used.
|
139
|
-
MODE_UNSPECIFIED = 0
|
140
|
-
|
141
|
-
# Transactional: The mutations are either all applied, or none are applied.
|
142
|
-
# Learn about transactions
|
143
|
-
# [here](https://cloud.google.com/datastore/docs/concepts/transactions).
|
144
|
-
TRANSACTIONAL = 1
|
145
|
-
|
146
|
-
# Non-transactional: The mutations may not apply as all or none.
|
147
|
-
NON_TRANSACTIONAL = 2
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
# The response for {Google::Datastore::V1::Datastore::Commit Datastore::Commit}.
|
152
|
-
# @!attribute [rw] mutation_results
|
153
|
-
# @return [Array<Google::Datastore::V1::MutationResult>]
|
154
|
-
# The result of performing the mutations.
|
155
|
-
# The i-th mutation result corresponds to the i-th mutation in the request.
|
156
|
-
# @!attribute [rw] index_updates
|
157
|
-
# @return [Integer]
|
158
|
-
# The number of index entries updated during the commit, or zero if none were
|
159
|
-
# updated.
|
160
|
-
class CommitResponse; end
|
161
|
-
|
162
|
-
# The request for {Google::Datastore::V1::Datastore::AllocateIds Datastore::AllocateIds}.
|
163
|
-
# @!attribute [rw] project_id
|
164
|
-
# @return [String]
|
165
|
-
# Required. The ID of the project against which to make the request.
|
166
|
-
# @!attribute [rw] keys
|
167
|
-
# @return [Array<Google::Datastore::V1::Key>]
|
168
|
-
# Required. A list of keys with incomplete key paths for which to allocate IDs.
|
169
|
-
# No key may be reserved/read-only.
|
170
|
-
class AllocateIdsRequest; end
|
171
|
-
|
172
|
-
# The response for {Google::Datastore::V1::Datastore::AllocateIds Datastore::AllocateIds}.
|
173
|
-
# @!attribute [rw] keys
|
174
|
-
# @return [Array<Google::Datastore::V1::Key>]
|
175
|
-
# The keys specified in the request (in the same order), each with
|
176
|
-
# its key path completed with a newly allocated ID.
|
177
|
-
class AllocateIdsResponse; end
|
178
|
-
|
179
|
-
# The request for {Google::Datastore::V1::Datastore::ReserveIds Datastore::ReserveIds}.
|
180
|
-
# @!attribute [rw] project_id
|
181
|
-
# @return [String]
|
182
|
-
# Required. The ID of the project against which to make the request.
|
183
|
-
# @!attribute [rw] database_id
|
184
|
-
# @return [String]
|
185
|
-
# If not empty, the ID of the database against which to make the request.
|
186
|
-
# @!attribute [rw] keys
|
187
|
-
# @return [Array<Google::Datastore::V1::Key>]
|
188
|
-
# Required. A list of keys with complete key paths whose numeric IDs should not be
|
189
|
-
# auto-allocated.
|
190
|
-
class ReserveIdsRequest; end
|
191
|
-
|
192
|
-
# The response for {Google::Datastore::V1::Datastore::ReserveIds Datastore::ReserveIds}.
|
193
|
-
class ReserveIdsResponse; end
|
194
|
-
|
195
|
-
# A mutation to apply to an entity.
|
196
|
-
# @!attribute [rw] insert
|
197
|
-
# @return [Google::Datastore::V1::Entity]
|
198
|
-
# The entity to insert. The entity must not already exist.
|
199
|
-
# The entity key's final path element may be incomplete.
|
200
|
-
# @!attribute [rw] update
|
201
|
-
# @return [Google::Datastore::V1::Entity]
|
202
|
-
# The entity to update. The entity must already exist.
|
203
|
-
# Must have a complete key path.
|
204
|
-
# @!attribute [rw] upsert
|
205
|
-
# @return [Google::Datastore::V1::Entity]
|
206
|
-
# The entity to upsert. The entity may or may not already exist.
|
207
|
-
# The entity key's final path element may be incomplete.
|
208
|
-
# @!attribute [rw] delete
|
209
|
-
# @return [Google::Datastore::V1::Key]
|
210
|
-
# The key of the entity to delete. The entity may or may not already exist.
|
211
|
-
# Must have a complete key path and must not be reserved/read-only.
|
212
|
-
# @!attribute [rw] base_version
|
213
|
-
# @return [Integer]
|
214
|
-
# The version of the entity that this mutation is being applied to. If this
|
215
|
-
# does not match the current version on the server, the mutation conflicts.
|
216
|
-
class Mutation; end
|
217
|
-
|
218
|
-
# The result of applying a mutation.
|
219
|
-
# @!attribute [rw] key
|
220
|
-
# @return [Google::Datastore::V1::Key]
|
221
|
-
# The automatically allocated key.
|
222
|
-
# Set only when the mutation allocated a key.
|
223
|
-
# @!attribute [rw] version
|
224
|
-
# @return [Integer]
|
225
|
-
# The version of the entity on the server after processing the mutation. If
|
226
|
-
# the mutation doesn't change anything on the server, then the version will
|
227
|
-
# be the version of the current entity or, if no entity is present, a version
|
228
|
-
# that is strictly greater than the version of any previous entity and less
|
229
|
-
# than the version of any possible future entity.
|
230
|
-
# @!attribute [rw] conflict_detected
|
231
|
-
# @return [true, false]
|
232
|
-
# Whether a conflict was detected for this mutation. Always false when a
|
233
|
-
# conflict detection strategy field is not set in the mutation.
|
234
|
-
class MutationResult; end
|
235
|
-
|
236
|
-
# The options shared by read requests.
|
237
|
-
# @!attribute [rw] read_consistency
|
238
|
-
# @return [Google::Datastore::V1::ReadOptions::ReadConsistency]
|
239
|
-
# The non-transactional read consistency to use.
|
240
|
-
# Cannot be set to `STRONG` for global queries.
|
241
|
-
# @!attribute [rw] transaction
|
242
|
-
# @return [String]
|
243
|
-
# The identifier of the transaction in which to read. A
|
244
|
-
# transaction identifier is returned by a call to
|
245
|
-
# {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
|
246
|
-
class ReadOptions
|
247
|
-
# The possible values for read consistencies.
|
248
|
-
module ReadConsistency
|
249
|
-
# Unspecified. This value must not be used.
|
250
|
-
READ_CONSISTENCY_UNSPECIFIED = 0
|
251
|
-
|
252
|
-
# Strong consistency.
|
253
|
-
STRONG = 1
|
254
|
-
|
255
|
-
# Eventual consistency.
|
256
|
-
EVENTUAL = 2
|
257
|
-
end
|
258
|
-
end
|
259
|
-
|
260
|
-
# Options for beginning a new transaction.
|
261
|
-
#
|
262
|
-
# Transactions can be created explicitly with calls to
|
263
|
-
# {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction} or implicitly by setting
|
264
|
-
# {Google::Datastore::V1::ReadOptions#new_transaction ReadOptions#new_transaction} in read requests.
|
265
|
-
# @!attribute [rw] read_write
|
266
|
-
# @return [Google::Datastore::V1::TransactionOptions::ReadWrite]
|
267
|
-
# The transaction should allow both reads and writes.
|
268
|
-
# @!attribute [rw] read_only
|
269
|
-
# @return [Google::Datastore::V1::TransactionOptions::ReadOnly]
|
270
|
-
# The transaction should only allow reads.
|
271
|
-
class TransactionOptions
|
272
|
-
# Options specific to read / write transactions.
|
273
|
-
# @!attribute [rw] previous_transaction
|
274
|
-
# @return [String]
|
275
|
-
# The transaction identifier of the transaction being retried.
|
276
|
-
class ReadWrite; end
|
277
|
-
|
278
|
-
# Options specific to read-only transactions.
|
279
|
-
class ReadOnly; end
|
280
|
-
end
|
281
|
-
end
|
282
|
-
end
|
283
|
-
end
|
@@ -1,189 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Datastore
|
18
|
-
module V1
|
19
|
-
# A partition ID identifies a grouping of entities. The grouping is always
|
20
|
-
# by project and namespace, however the namespace ID may be empty.
|
21
|
-
#
|
22
|
-
# A partition ID contains several dimensions:
|
23
|
-
# project ID and namespace ID.
|
24
|
-
#
|
25
|
-
# Partition dimensions:
|
26
|
-
#
|
27
|
-
# * May be `""`.
|
28
|
-
# * Must be valid UTF-8 bytes.
|
29
|
-
# * Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
|
30
|
-
# If the value of any dimension matches regex `__.*__`, the partition is
|
31
|
-
# reserved/read-only.
|
32
|
-
# A reserved/read-only partition ID is forbidden in certain documented
|
33
|
-
# contexts.
|
34
|
-
#
|
35
|
-
# Foreign partition IDs (in which the project ID does
|
36
|
-
# not match the context project ID ) are discouraged.
|
37
|
-
# Reads and writes of foreign partition IDs may fail if the project is not in
|
38
|
-
# an active state.
|
39
|
-
# @!attribute [rw] project_id
|
40
|
-
# @return [String]
|
41
|
-
# The ID of the project to which the entities belong.
|
42
|
-
# @!attribute [rw] namespace_id
|
43
|
-
# @return [String]
|
44
|
-
# If not empty, the ID of the namespace to which the entities belong.
|
45
|
-
class PartitionId; end
|
46
|
-
|
47
|
-
# A unique identifier for an entity.
|
48
|
-
# If a key's partition ID or any of its path kinds or names are
|
49
|
-
# reserved/read-only, the key is reserved/read-only.
|
50
|
-
# A reserved/read-only key is forbidden in certain documented contexts.
|
51
|
-
# @!attribute [rw] partition_id
|
52
|
-
# @return [Google::Datastore::V1::PartitionId]
|
53
|
-
# Entities are partitioned into subsets, currently identified by a project
|
54
|
-
# ID and namespace ID.
|
55
|
-
# Queries are scoped to a single partition.
|
56
|
-
# @!attribute [rw] path
|
57
|
-
# @return [Array<Google::Datastore::V1::Key::PathElement>]
|
58
|
-
# The entity path.
|
59
|
-
# An entity path consists of one or more elements composed of a kind and a
|
60
|
-
# string or numerical identifier, which identify entities. The first
|
61
|
-
# element identifies a _root entity_, the second element identifies
|
62
|
-
# a _child_ of the root entity, the third element identifies a child of the
|
63
|
-
# second entity, and so forth. The entities identified by all prefixes of
|
64
|
-
# the path are called the element's _ancestors_.
|
65
|
-
#
|
66
|
-
# An entity path is always fully complete: *all* of the entity's ancestors
|
67
|
-
# are required to be in the path along with the entity identifier itself.
|
68
|
-
# The only exception is that in some documented cases, the identifier in the
|
69
|
-
# last path element (for the entity) itself may be omitted. For example,
|
70
|
-
# the last path element of the key of `Mutation.insert` may have no
|
71
|
-
# identifier.
|
72
|
-
#
|
73
|
-
# A path can never be empty, and a path can have at most 100 elements.
|
74
|
-
class Key
|
75
|
-
# A (kind, ID/name) pair used to construct a key path.
|
76
|
-
#
|
77
|
-
# If either name or ID is set, the element is complete.
|
78
|
-
# If neither is set, the element is incomplete.
|
79
|
-
# @!attribute [rw] kind
|
80
|
-
# @return [String]
|
81
|
-
# The kind of the entity.
|
82
|
-
# A kind matching regex `__.*__` is reserved/read-only.
|
83
|
-
# A kind must not contain more than 1500 bytes when UTF-8 encoded.
|
84
|
-
# Cannot be `""`.
|
85
|
-
# @!attribute [rw] id
|
86
|
-
# @return [Integer]
|
87
|
-
# The auto-allocated ID of the entity.
|
88
|
-
# Never equal to zero. Values less than zero are discouraged and may not
|
89
|
-
# be supported in the future.
|
90
|
-
# @!attribute [rw] name
|
91
|
-
# @return [String]
|
92
|
-
# The name of the entity.
|
93
|
-
# A name matching regex `__.*__` is reserved/read-only.
|
94
|
-
# A name must not be more than 1500 bytes when UTF-8 encoded.
|
95
|
-
# Cannot be `""`.
|
96
|
-
class PathElement; end
|
97
|
-
end
|
98
|
-
|
99
|
-
# An array value.
|
100
|
-
# @!attribute [rw] values
|
101
|
-
# @return [Array<Google::Datastore::V1::Value>]
|
102
|
-
# Values in the array.
|
103
|
-
# The order of values in an array is preserved as long as all values have
|
104
|
-
# identical settings for 'exclude_from_indexes'.
|
105
|
-
class ArrayValue; end
|
106
|
-
|
107
|
-
# A message that can hold any of the supported value types and associated
|
108
|
-
# metadata.
|
109
|
-
# @!attribute [rw] null_value
|
110
|
-
# @return [Google::Protobuf::NullValue]
|
111
|
-
# A null value.
|
112
|
-
# @!attribute [rw] boolean_value
|
113
|
-
# @return [true, false]
|
114
|
-
# A boolean value.
|
115
|
-
# @!attribute [rw] integer_value
|
116
|
-
# @return [Integer]
|
117
|
-
# An integer value.
|
118
|
-
# @!attribute [rw] double_value
|
119
|
-
# @return [Float]
|
120
|
-
# A double value.
|
121
|
-
# @!attribute [rw] timestamp_value
|
122
|
-
# @return [Google::Protobuf::Timestamp]
|
123
|
-
# A timestamp value.
|
124
|
-
# When stored in the Datastore, precise only to microseconds;
|
125
|
-
# any additional precision is rounded down.
|
126
|
-
# @!attribute [rw] key_value
|
127
|
-
# @return [Google::Datastore::V1::Key]
|
128
|
-
# A key value.
|
129
|
-
# @!attribute [rw] string_value
|
130
|
-
# @return [String]
|
131
|
-
# A UTF-8 encoded string value.
|
132
|
-
# When `exclude_from_indexes` is false (it is indexed), may have at most
|
133
|
-
# 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
|
134
|
-
# @!attribute [rw] blob_value
|
135
|
-
# @return [String]
|
136
|
-
# A blob value.
|
137
|
-
# May have at most 1,000,000 bytes.
|
138
|
-
# When `exclude_from_indexes` is false, may have at most 1500 bytes.
|
139
|
-
# In JSON requests, must be base64-encoded.
|
140
|
-
# @!attribute [rw] geo_point_value
|
141
|
-
# @return [Google::Type::LatLng]
|
142
|
-
# A geo point value representing a point on the surface of Earth.
|
143
|
-
# @!attribute [rw] entity_value
|
144
|
-
# @return [Google::Datastore::V1::Entity]
|
145
|
-
# An entity value.
|
146
|
-
#
|
147
|
-
# * May have no key.
|
148
|
-
# * May have a key with an incomplete key path.
|
149
|
-
# * May have a reserved/read-only key.
|
150
|
-
# @!attribute [rw] array_value
|
151
|
-
# @return [Google::Datastore::V1::ArrayValue]
|
152
|
-
# An array value.
|
153
|
-
# Cannot contain another array value.
|
154
|
-
# A `Value` instance that sets field `array_value` must not set fields
|
155
|
-
# `meaning` or `exclude_from_indexes`.
|
156
|
-
# @!attribute [rw] meaning
|
157
|
-
# @return [Integer]
|
158
|
-
# The `meaning` field should only be populated for backwards compatibility.
|
159
|
-
# @!attribute [rw] exclude_from_indexes
|
160
|
-
# @return [true, false]
|
161
|
-
# If the value should be excluded from all indexes including those defined
|
162
|
-
# explicitly.
|
163
|
-
class Value; end
|
164
|
-
|
165
|
-
# A Datastore data object.
|
166
|
-
#
|
167
|
-
# An entity is limited to 1 megabyte when stored. That _roughly_
|
168
|
-
# corresponds to a limit of 1 megabyte for the serialized form of this
|
169
|
-
# message.
|
170
|
-
# @!attribute [rw] key
|
171
|
-
# @return [Google::Datastore::V1::Key]
|
172
|
-
# The entity's key.
|
173
|
-
#
|
174
|
-
# An entity must have a key, unless otherwise documented (for example,
|
175
|
-
# an entity in `Value.entity_value` may have no key).
|
176
|
-
# An entity's kind is its key path's last element's kind,
|
177
|
-
# or null if it has no key.
|
178
|
-
# @!attribute [rw] properties
|
179
|
-
# @return [Hash{String => Google::Datastore::V1::Value}]
|
180
|
-
# The entity's properties.
|
181
|
-
# The map's keys are property names.
|
182
|
-
# A property name matching regex `__.*__` is reserved.
|
183
|
-
# A reserved property name is forbidden in certain documented contexts.
|
184
|
-
# The name must not contain more than 500 characters.
|
185
|
-
# The name cannot be `""`.
|
186
|
-
class Entity; end
|
187
|
-
end
|
188
|
-
end
|
189
|
-
end
|