google-apis-datastore_v1beta3 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 +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-datastore_v1beta3.rb +15 -0
- data/lib/google/apis/datastore_v1beta3.rb +40 -0
- data/lib/google/apis/datastore_v1beta3/classes.rb +1776 -0
- data/lib/google/apis/datastore_v1beta3/gem_version.rb +28 -0
- data/lib/google/apis/datastore_v1beta3/representations.rb +859 -0
- data/lib/google/apis/datastore_v1beta3/service.rb +295 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a7b9f767025700cda394ef16deb16d72177cf8e0bf40048d0c27fb4a43494b78
|
4
|
+
data.tar.gz: 77c04cfbb42708d796ceb7d65431c936e6af369e2b20071fb44f381c6d9afb35
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b7fa6278519dfc3147e29adf06e63e665ac1ecdf57e8c58bd74e843998c267f4f5d6aecd37e7d64fbdc47c572e86309d5865cb05ed341b6af8bb4336c950b245
|
7
|
+
data.tar.gz: 85dc42ee041959478d8eb2c01dc4b32f9ac847db6a792e144351b1d2ee12bb4e6f329a410c94faa6ba591604dcf0b443e3d653836a5a02f4a406051e93a5e390
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-datastore_v1beta3
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/datastore_v1beta3/*.rb
|
9
|
+
lib/google/apis/datastore_v1beta3.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1beta3 of the Cloud Datastore API
|
2
|
+
|
3
|
+
This is a simple client library for version V1beta3 of the Cloud Datastore API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/datastore.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-datastore_v1beta3', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-datastore_v1beta3
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/datastore_v1beta3"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::DatastoreV1beta3::DatastoreService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Datastore service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Cloud Datastore API, see the {Google::Apis::DatastoreV1beta3::DatastoreService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-datastore_v1beta3`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://cloud.google.com/datastore/) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
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
|
+
# http://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
|
+
require "google/apis/datastore_v1beta3"
|
@@ -0,0 +1,40 @@
|
|
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
|
+
# http://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
|
+
require 'google/apis/datastore_v1beta3/service.rb'
|
16
|
+
require 'google/apis/datastore_v1beta3/classes.rb'
|
17
|
+
require 'google/apis/datastore_v1beta3/representations.rb'
|
18
|
+
require 'google/apis/datastore_v1beta3/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Cloud Datastore API
|
23
|
+
#
|
24
|
+
# Accesses the schemaless NoSQL database to provide fully managed, robust,
|
25
|
+
# scalable storage for your application.
|
26
|
+
#
|
27
|
+
# @see https://cloud.google.com/datastore/
|
28
|
+
module DatastoreV1beta3
|
29
|
+
# Version of the Cloud Datastore API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V1beta3'
|
32
|
+
|
33
|
+
# View and manage your data across Google Cloud Platform services
|
34
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
35
|
+
|
36
|
+
# View and manage your Google Cloud Datastore data
|
37
|
+
AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,1776 @@
|
|
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
|
+
# http://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
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module DatastoreV1beta3
|
24
|
+
|
25
|
+
# The request for Datastore.AllocateIds.
|
26
|
+
class AllocateIdsRequest
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Required. A list of keys with incomplete key paths for which to allocate IDs.
|
30
|
+
# No key may be reserved/read-only.
|
31
|
+
# Corresponds to the JSON property `keys`
|
32
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
33
|
+
attr_accessor :keys
|
34
|
+
|
35
|
+
def initialize(**args)
|
36
|
+
update!(**args)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Update properties of this object
|
40
|
+
def update!(**args)
|
41
|
+
@keys = args[:keys] if args.key?(:keys)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# The response for Datastore.AllocateIds.
|
46
|
+
class AllocateIdsResponse
|
47
|
+
include Google::Apis::Core::Hashable
|
48
|
+
|
49
|
+
# The keys specified in the request (in the same order), each with its key path
|
50
|
+
# completed with a newly allocated ID.
|
51
|
+
# Corresponds to the JSON property `keys`
|
52
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
53
|
+
attr_accessor :keys
|
54
|
+
|
55
|
+
def initialize(**args)
|
56
|
+
update!(**args)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Update properties of this object
|
60
|
+
def update!(**args)
|
61
|
+
@keys = args[:keys] if args.key?(:keys)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# An array value.
|
66
|
+
class ArrayValue
|
67
|
+
include Google::Apis::Core::Hashable
|
68
|
+
|
69
|
+
# Values in the array. The order of values in an array is preserved as long as
|
70
|
+
# all values have identical settings for 'exclude_from_indexes'.
|
71
|
+
# Corresponds to the JSON property `values`
|
72
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Value>]
|
73
|
+
attr_accessor :values
|
74
|
+
|
75
|
+
def initialize(**args)
|
76
|
+
update!(**args)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Update properties of this object
|
80
|
+
def update!(**args)
|
81
|
+
@values = args[:values] if args.key?(:values)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# The request for Datastore.BeginTransaction.
|
86
|
+
class BeginTransactionRequest
|
87
|
+
include Google::Apis::Core::Hashable
|
88
|
+
|
89
|
+
# Options for beginning a new transaction. Transactions can be created
|
90
|
+
# explicitly with calls to Datastore.BeginTransaction or implicitly by setting
|
91
|
+
# ReadOptions.new_transaction in read requests.
|
92
|
+
# Corresponds to the JSON property `transactionOptions`
|
93
|
+
# @return [Google::Apis::DatastoreV1beta3::TransactionOptions]
|
94
|
+
attr_accessor :transaction_options
|
95
|
+
|
96
|
+
def initialize(**args)
|
97
|
+
update!(**args)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Update properties of this object
|
101
|
+
def update!(**args)
|
102
|
+
@transaction_options = args[:transaction_options] if args.key?(:transaction_options)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# The response for Datastore.BeginTransaction.
|
107
|
+
class BeginTransactionResponse
|
108
|
+
include Google::Apis::Core::Hashable
|
109
|
+
|
110
|
+
# The transaction identifier (always present).
|
111
|
+
# Corresponds to the JSON property `transaction`
|
112
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
113
|
+
# @return [String]
|
114
|
+
attr_accessor :transaction
|
115
|
+
|
116
|
+
def initialize(**args)
|
117
|
+
update!(**args)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Update properties of this object
|
121
|
+
def update!(**args)
|
122
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# The request for Datastore.Commit.
|
127
|
+
class CommitRequest
|
128
|
+
include Google::Apis::Core::Hashable
|
129
|
+
|
130
|
+
# The type of commit to perform. Defaults to `TRANSACTIONAL`.
|
131
|
+
# Corresponds to the JSON property `mode`
|
132
|
+
# @return [String]
|
133
|
+
attr_accessor :mode
|
134
|
+
|
135
|
+
# The mutations to perform. When mode is `TRANSACTIONAL`, mutations affecting a
|
136
|
+
# single entity are applied in order. The following sequences of mutations
|
137
|
+
# affecting a single entity are not permitted in a single `Commit` request: - `
|
138
|
+
# insert` followed by `insert` - `update` followed by `insert` - `upsert`
|
139
|
+
# followed by `insert` - `delete` followed by `update` When mode is `
|
140
|
+
# NON_TRANSACTIONAL`, no two mutations may affect a single entity.
|
141
|
+
# Corresponds to the JSON property `mutations`
|
142
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Mutation>]
|
143
|
+
attr_accessor :mutations
|
144
|
+
|
145
|
+
# The identifier of the transaction associated with the commit. A transaction
|
146
|
+
# identifier is returned by a call to Datastore.BeginTransaction.
|
147
|
+
# Corresponds to the JSON property `transaction`
|
148
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
149
|
+
# @return [String]
|
150
|
+
attr_accessor :transaction
|
151
|
+
|
152
|
+
def initialize(**args)
|
153
|
+
update!(**args)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Update properties of this object
|
157
|
+
def update!(**args)
|
158
|
+
@mode = args[:mode] if args.key?(:mode)
|
159
|
+
@mutations = args[:mutations] if args.key?(:mutations)
|
160
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# The response for Datastore.Commit.
|
165
|
+
class CommitResponse
|
166
|
+
include Google::Apis::Core::Hashable
|
167
|
+
|
168
|
+
# The number of index entries updated during the commit, or zero if none were
|
169
|
+
# updated.
|
170
|
+
# Corresponds to the JSON property `indexUpdates`
|
171
|
+
# @return [Fixnum]
|
172
|
+
attr_accessor :index_updates
|
173
|
+
|
174
|
+
# The result of performing the mutations. The i-th mutation result corresponds
|
175
|
+
# to the i-th mutation in the request.
|
176
|
+
# Corresponds to the JSON property `mutationResults`
|
177
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::MutationResult>]
|
178
|
+
attr_accessor :mutation_results
|
179
|
+
|
180
|
+
def initialize(**args)
|
181
|
+
update!(**args)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Update properties of this object
|
185
|
+
def update!(**args)
|
186
|
+
@index_updates = args[:index_updates] if args.key?(:index_updates)
|
187
|
+
@mutation_results = args[:mutation_results] if args.key?(:mutation_results)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# A filter that merges multiple other filters using the given operator.
|
192
|
+
class CompositeFilter
|
193
|
+
include Google::Apis::Core::Hashable
|
194
|
+
|
195
|
+
# The list of filters to combine. Must contain at least one filter.
|
196
|
+
# Corresponds to the JSON property `filters`
|
197
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Filter>]
|
198
|
+
attr_accessor :filters
|
199
|
+
|
200
|
+
# The operator for combining multiple filters.
|
201
|
+
# Corresponds to the JSON property `op`
|
202
|
+
# @return [String]
|
203
|
+
attr_accessor :op
|
204
|
+
|
205
|
+
def initialize(**args)
|
206
|
+
update!(**args)
|
207
|
+
end
|
208
|
+
|
209
|
+
# Update properties of this object
|
210
|
+
def update!(**args)
|
211
|
+
@filters = args[:filters] if args.key?(:filters)
|
212
|
+
@op = args[:op] if args.key?(:op)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# A Datastore data object. An entity is limited to 1 megabyte when stored. That
|
217
|
+
# _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
|
218
|
+
# message.
|
219
|
+
class Entity
|
220
|
+
include Google::Apis::Core::Hashable
|
221
|
+
|
222
|
+
# A unique identifier for an entity. If a key's partition ID or any of its path
|
223
|
+
# kinds or names are reserved/read-only, the key is reserved/read-only. A
|
224
|
+
# reserved/read-only key is forbidden in certain documented contexts.
|
225
|
+
# Corresponds to the JSON property `key`
|
226
|
+
# @return [Google::Apis::DatastoreV1beta3::Key]
|
227
|
+
attr_accessor :key
|
228
|
+
|
229
|
+
# The entity's properties. The map's keys are property names. A property name
|
230
|
+
# matching regex `__.*__` is reserved. A reserved property name is forbidden in
|
231
|
+
# certain documented contexts. The name must not contain more than 500
|
232
|
+
# characters. The name cannot be `""`.
|
233
|
+
# Corresponds to the JSON property `properties`
|
234
|
+
# @return [Hash<String,Google::Apis::DatastoreV1beta3::Value>]
|
235
|
+
attr_accessor :properties
|
236
|
+
|
237
|
+
def initialize(**args)
|
238
|
+
update!(**args)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Update properties of this object
|
242
|
+
def update!(**args)
|
243
|
+
@key = args[:key] if args.key?(:key)
|
244
|
+
@properties = args[:properties] if args.key?(:properties)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# The result of fetching an entity from Datastore.
|
249
|
+
class EntityResult
|
250
|
+
include Google::Apis::Core::Hashable
|
251
|
+
|
252
|
+
# A cursor that points to the position after the result entity. Set only when
|
253
|
+
# the `EntityResult` is part of a `QueryResultBatch` message.
|
254
|
+
# Corresponds to the JSON property `cursor`
|
255
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
256
|
+
# @return [String]
|
257
|
+
attr_accessor :cursor
|
258
|
+
|
259
|
+
# A Datastore data object. An entity is limited to 1 megabyte when stored. That
|
260
|
+
# _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
|
261
|
+
# message.
|
262
|
+
# Corresponds to the JSON property `entity`
|
263
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
264
|
+
attr_accessor :entity
|
265
|
+
|
266
|
+
# The version of the entity, a strictly positive number that monotonically
|
267
|
+
# increases with changes to the entity. This field is set for `FULL` entity
|
268
|
+
# results. For missing entities in `LookupResponse`, this is the version of the
|
269
|
+
# snapshot that was used to look up the entity, and it is always set except for
|
270
|
+
# eventually consistent reads.
|
271
|
+
# Corresponds to the JSON property `version`
|
272
|
+
# @return [Fixnum]
|
273
|
+
attr_accessor :version
|
274
|
+
|
275
|
+
def initialize(**args)
|
276
|
+
update!(**args)
|
277
|
+
end
|
278
|
+
|
279
|
+
# Update properties of this object
|
280
|
+
def update!(**args)
|
281
|
+
@cursor = args[:cursor] if args.key?(:cursor)
|
282
|
+
@entity = args[:entity] if args.key?(:entity)
|
283
|
+
@version = args[:version] if args.key?(:version)
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
# A holder for any type of filter.
|
288
|
+
class Filter
|
289
|
+
include Google::Apis::Core::Hashable
|
290
|
+
|
291
|
+
# A filter that merges multiple other filters using the given operator.
|
292
|
+
# Corresponds to the JSON property `compositeFilter`
|
293
|
+
# @return [Google::Apis::DatastoreV1beta3::CompositeFilter]
|
294
|
+
attr_accessor :composite_filter
|
295
|
+
|
296
|
+
# A filter on a specific property.
|
297
|
+
# Corresponds to the JSON property `propertyFilter`
|
298
|
+
# @return [Google::Apis::DatastoreV1beta3::PropertyFilter]
|
299
|
+
attr_accessor :property_filter
|
300
|
+
|
301
|
+
def initialize(**args)
|
302
|
+
update!(**args)
|
303
|
+
end
|
304
|
+
|
305
|
+
# Update properties of this object
|
306
|
+
def update!(**args)
|
307
|
+
@composite_filter = args[:composite_filter] if args.key?(:composite_filter)
|
308
|
+
@property_filter = args[:property_filter] if args.key?(:property_filter)
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
# Metadata common to all Datastore Admin operations.
|
313
|
+
class GoogleDatastoreAdminV1CommonMetadata
|
314
|
+
include Google::Apis::Core::Hashable
|
315
|
+
|
316
|
+
# The time the operation ended, either successfully or otherwise.
|
317
|
+
# Corresponds to the JSON property `endTime`
|
318
|
+
# @return [String]
|
319
|
+
attr_accessor :end_time
|
320
|
+
|
321
|
+
# The client-assigned labels which were provided when the operation was created.
|
322
|
+
# May also include additional labels.
|
323
|
+
# Corresponds to the JSON property `labels`
|
324
|
+
# @return [Hash<String,String>]
|
325
|
+
attr_accessor :labels
|
326
|
+
|
327
|
+
# The type of the operation. Can be used as a filter in ListOperationsRequest.
|
328
|
+
# Corresponds to the JSON property `operationType`
|
329
|
+
# @return [String]
|
330
|
+
attr_accessor :operation_type
|
331
|
+
|
332
|
+
# The time that work began on the operation.
|
333
|
+
# Corresponds to the JSON property `startTime`
|
334
|
+
# @return [String]
|
335
|
+
attr_accessor :start_time
|
336
|
+
|
337
|
+
# The current state of the Operation.
|
338
|
+
# Corresponds to the JSON property `state`
|
339
|
+
# @return [String]
|
340
|
+
attr_accessor :state
|
341
|
+
|
342
|
+
def initialize(**args)
|
343
|
+
update!(**args)
|
344
|
+
end
|
345
|
+
|
346
|
+
# Update properties of this object
|
347
|
+
def update!(**args)
|
348
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
349
|
+
@labels = args[:labels] if args.key?(:labels)
|
350
|
+
@operation_type = args[:operation_type] if args.key?(:operation_type)
|
351
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
352
|
+
@state = args[:state] if args.key?(:state)
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
# Identifies a subset of entities in a project. This is specified as
|
357
|
+
# combinations of kinds and namespaces (either or both of which may be all, as
|
358
|
+
# described in the following examples). Example usage: Entire project: kinds=[],
|
359
|
+
# namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
|
360
|
+
# namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
|
361
|
+
# 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
|
362
|
+
# namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
|
363
|
+
# namespace: kinds=[], namespace_ids=['Baz']
|
364
|
+
class GoogleDatastoreAdminV1EntityFilter
|
365
|
+
include Google::Apis::Core::Hashable
|
366
|
+
|
367
|
+
# If empty, then this represents all kinds.
|
368
|
+
# Corresponds to the JSON property `kinds`
|
369
|
+
# @return [Array<String>]
|
370
|
+
attr_accessor :kinds
|
371
|
+
|
372
|
+
# An empty list represents all namespaces. This is the preferred usage for
|
373
|
+
# projects that don't use namespaces. An empty string element represents the
|
374
|
+
# default namespace. This should be used if the project has data in non-default
|
375
|
+
# namespaces, but doesn't want to include them. Each namespace in this list must
|
376
|
+
# be unique.
|
377
|
+
# Corresponds to the JSON property `namespaceIds`
|
378
|
+
# @return [Array<String>]
|
379
|
+
attr_accessor :namespace_ids
|
380
|
+
|
381
|
+
def initialize(**args)
|
382
|
+
update!(**args)
|
383
|
+
end
|
384
|
+
|
385
|
+
# Update properties of this object
|
386
|
+
def update!(**args)
|
387
|
+
@kinds = args[:kinds] if args.key?(:kinds)
|
388
|
+
@namespace_ids = args[:namespace_ids] if args.key?(:namespace_ids)
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
# Metadata for ExportEntities operations.
|
393
|
+
class GoogleDatastoreAdminV1ExportEntitiesMetadata
|
394
|
+
include Google::Apis::Core::Hashable
|
395
|
+
|
396
|
+
# Metadata common to all Datastore Admin operations.
|
397
|
+
# Corresponds to the JSON property `common`
|
398
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1CommonMetadata]
|
399
|
+
attr_accessor :common
|
400
|
+
|
401
|
+
# Identifies a subset of entities in a project. This is specified as
|
402
|
+
# combinations of kinds and namespaces (either or both of which may be all, as
|
403
|
+
# described in the following examples). Example usage: Entire project: kinds=[],
|
404
|
+
# namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
|
405
|
+
# namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
|
406
|
+
# 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
|
407
|
+
# namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
|
408
|
+
# namespace: kinds=[], namespace_ids=['Baz']
|
409
|
+
# Corresponds to the JSON property `entityFilter`
|
410
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1EntityFilter]
|
411
|
+
attr_accessor :entity_filter
|
412
|
+
|
413
|
+
# Location for the export metadata and data files. This will be the same value
|
414
|
+
# as the google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix field.
|
415
|
+
# The final output location is provided in google.datastore.admin.v1.
|
416
|
+
# ExportEntitiesResponse.output_url.
|
417
|
+
# Corresponds to the JSON property `outputUrlPrefix`
|
418
|
+
# @return [String]
|
419
|
+
attr_accessor :output_url_prefix
|
420
|
+
|
421
|
+
# Measures the progress of a particular metric.
|
422
|
+
# Corresponds to the JSON property `progressBytes`
|
423
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1Progress]
|
424
|
+
attr_accessor :progress_bytes
|
425
|
+
|
426
|
+
# Measures the progress of a particular metric.
|
427
|
+
# Corresponds to the JSON property `progressEntities`
|
428
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1Progress]
|
429
|
+
attr_accessor :progress_entities
|
430
|
+
|
431
|
+
def initialize(**args)
|
432
|
+
update!(**args)
|
433
|
+
end
|
434
|
+
|
435
|
+
# Update properties of this object
|
436
|
+
def update!(**args)
|
437
|
+
@common = args[:common] if args.key?(:common)
|
438
|
+
@entity_filter = args[:entity_filter] if args.key?(:entity_filter)
|
439
|
+
@output_url_prefix = args[:output_url_prefix] if args.key?(:output_url_prefix)
|
440
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
441
|
+
@progress_entities = args[:progress_entities] if args.key?(:progress_entities)
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
# The response for google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
|
446
|
+
class GoogleDatastoreAdminV1ExportEntitiesResponse
|
447
|
+
include Google::Apis::Core::Hashable
|
448
|
+
|
449
|
+
# Location of the output metadata file. This can be used to begin an import into
|
450
|
+
# Cloud Datastore (this project or another project). See google.datastore.admin.
|
451
|
+
# v1.ImportEntitiesRequest.input_url. Only present if the operation completed
|
452
|
+
# successfully.
|
453
|
+
# Corresponds to the JSON property `outputUrl`
|
454
|
+
# @return [String]
|
455
|
+
attr_accessor :output_url
|
456
|
+
|
457
|
+
def initialize(**args)
|
458
|
+
update!(**args)
|
459
|
+
end
|
460
|
+
|
461
|
+
# Update properties of this object
|
462
|
+
def update!(**args)
|
463
|
+
@output_url = args[:output_url] if args.key?(:output_url)
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
# Metadata for ImportEntities operations.
|
468
|
+
class GoogleDatastoreAdminV1ImportEntitiesMetadata
|
469
|
+
include Google::Apis::Core::Hashable
|
470
|
+
|
471
|
+
# Metadata common to all Datastore Admin operations.
|
472
|
+
# Corresponds to the JSON property `common`
|
473
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1CommonMetadata]
|
474
|
+
attr_accessor :common
|
475
|
+
|
476
|
+
# Identifies a subset of entities in a project. This is specified as
|
477
|
+
# combinations of kinds and namespaces (either or both of which may be all, as
|
478
|
+
# described in the following examples). Example usage: Entire project: kinds=[],
|
479
|
+
# namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
|
480
|
+
# namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
|
481
|
+
# 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
|
482
|
+
# namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
|
483
|
+
# namespace: kinds=[], namespace_ids=['Baz']
|
484
|
+
# Corresponds to the JSON property `entityFilter`
|
485
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1EntityFilter]
|
486
|
+
attr_accessor :entity_filter
|
487
|
+
|
488
|
+
# The location of the import metadata file. This will be the same value as the
|
489
|
+
# google.datastore.admin.v1.ExportEntitiesResponse.output_url field.
|
490
|
+
# Corresponds to the JSON property `inputUrl`
|
491
|
+
# @return [String]
|
492
|
+
attr_accessor :input_url
|
493
|
+
|
494
|
+
# Measures the progress of a particular metric.
|
495
|
+
# Corresponds to the JSON property `progressBytes`
|
496
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1Progress]
|
497
|
+
attr_accessor :progress_bytes
|
498
|
+
|
499
|
+
# Measures the progress of a particular metric.
|
500
|
+
# Corresponds to the JSON property `progressEntities`
|
501
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1Progress]
|
502
|
+
attr_accessor :progress_entities
|
503
|
+
|
504
|
+
def initialize(**args)
|
505
|
+
update!(**args)
|
506
|
+
end
|
507
|
+
|
508
|
+
# Update properties of this object
|
509
|
+
def update!(**args)
|
510
|
+
@common = args[:common] if args.key?(:common)
|
511
|
+
@entity_filter = args[:entity_filter] if args.key?(:entity_filter)
|
512
|
+
@input_url = args[:input_url] if args.key?(:input_url)
|
513
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
514
|
+
@progress_entities = args[:progress_entities] if args.key?(:progress_entities)
|
515
|
+
end
|
516
|
+
end
|
517
|
+
|
518
|
+
# Metadata for Index operations.
|
519
|
+
class GoogleDatastoreAdminV1IndexOperationMetadata
|
520
|
+
include Google::Apis::Core::Hashable
|
521
|
+
|
522
|
+
# Metadata common to all Datastore Admin operations.
|
523
|
+
# Corresponds to the JSON property `common`
|
524
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1CommonMetadata]
|
525
|
+
attr_accessor :common
|
526
|
+
|
527
|
+
# The index resource ID that this operation is acting on.
|
528
|
+
# Corresponds to the JSON property `indexId`
|
529
|
+
# @return [String]
|
530
|
+
attr_accessor :index_id
|
531
|
+
|
532
|
+
# Measures the progress of a particular metric.
|
533
|
+
# Corresponds to the JSON property `progressEntities`
|
534
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1Progress]
|
535
|
+
attr_accessor :progress_entities
|
536
|
+
|
537
|
+
def initialize(**args)
|
538
|
+
update!(**args)
|
539
|
+
end
|
540
|
+
|
541
|
+
# Update properties of this object
|
542
|
+
def update!(**args)
|
543
|
+
@common = args[:common] if args.key?(:common)
|
544
|
+
@index_id = args[:index_id] if args.key?(:index_id)
|
545
|
+
@progress_entities = args[:progress_entities] if args.key?(:progress_entities)
|
546
|
+
end
|
547
|
+
end
|
548
|
+
|
549
|
+
# Measures the progress of a particular metric.
|
550
|
+
class GoogleDatastoreAdminV1Progress
|
551
|
+
include Google::Apis::Core::Hashable
|
552
|
+
|
553
|
+
# The amount of work that has been completed. Note that this may be greater than
|
554
|
+
# work_estimated.
|
555
|
+
# Corresponds to the JSON property `workCompleted`
|
556
|
+
# @return [Fixnum]
|
557
|
+
attr_accessor :work_completed
|
558
|
+
|
559
|
+
# An estimate of how much work needs to be performed. May be zero if the work
|
560
|
+
# estimate is unavailable.
|
561
|
+
# Corresponds to the JSON property `workEstimated`
|
562
|
+
# @return [Fixnum]
|
563
|
+
attr_accessor :work_estimated
|
564
|
+
|
565
|
+
def initialize(**args)
|
566
|
+
update!(**args)
|
567
|
+
end
|
568
|
+
|
569
|
+
# Update properties of this object
|
570
|
+
def update!(**args)
|
571
|
+
@work_completed = args[:work_completed] if args.key?(:work_completed)
|
572
|
+
@work_estimated = args[:work_estimated] if args.key?(:work_estimated)
|
573
|
+
end
|
574
|
+
end
|
575
|
+
|
576
|
+
# Metadata common to all Datastore Admin operations.
|
577
|
+
class GoogleDatastoreAdminV1beta1CommonMetadata
|
578
|
+
include Google::Apis::Core::Hashable
|
579
|
+
|
580
|
+
# The time the operation ended, either successfully or otherwise.
|
581
|
+
# Corresponds to the JSON property `endTime`
|
582
|
+
# @return [String]
|
583
|
+
attr_accessor :end_time
|
584
|
+
|
585
|
+
# The client-assigned labels which were provided when the operation was created.
|
586
|
+
# May also include additional labels.
|
587
|
+
# Corresponds to the JSON property `labels`
|
588
|
+
# @return [Hash<String,String>]
|
589
|
+
attr_accessor :labels
|
590
|
+
|
591
|
+
# The type of the operation. Can be used as a filter in ListOperationsRequest.
|
592
|
+
# Corresponds to the JSON property `operationType`
|
593
|
+
# @return [String]
|
594
|
+
attr_accessor :operation_type
|
595
|
+
|
596
|
+
# The time that work began on the operation.
|
597
|
+
# Corresponds to the JSON property `startTime`
|
598
|
+
# @return [String]
|
599
|
+
attr_accessor :start_time
|
600
|
+
|
601
|
+
# The current state of the Operation.
|
602
|
+
# Corresponds to the JSON property `state`
|
603
|
+
# @return [String]
|
604
|
+
attr_accessor :state
|
605
|
+
|
606
|
+
def initialize(**args)
|
607
|
+
update!(**args)
|
608
|
+
end
|
609
|
+
|
610
|
+
# Update properties of this object
|
611
|
+
def update!(**args)
|
612
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
613
|
+
@labels = args[:labels] if args.key?(:labels)
|
614
|
+
@operation_type = args[:operation_type] if args.key?(:operation_type)
|
615
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
616
|
+
@state = args[:state] if args.key?(:state)
|
617
|
+
end
|
618
|
+
end
|
619
|
+
|
620
|
+
# Identifies a subset of entities in a project. This is specified as
|
621
|
+
# combinations of kinds and namespaces (either or both of which may be all, as
|
622
|
+
# described in the following examples). Example usage: Entire project: kinds=[],
|
623
|
+
# namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
|
624
|
+
# namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
|
625
|
+
# 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
|
626
|
+
# namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
|
627
|
+
# namespace: kinds=[], namespace_ids=['Baz']
|
628
|
+
class GoogleDatastoreAdminV1beta1EntityFilter
|
629
|
+
include Google::Apis::Core::Hashable
|
630
|
+
|
631
|
+
# If empty, then this represents all kinds.
|
632
|
+
# Corresponds to the JSON property `kinds`
|
633
|
+
# @return [Array<String>]
|
634
|
+
attr_accessor :kinds
|
635
|
+
|
636
|
+
# An empty list represents all namespaces. This is the preferred usage for
|
637
|
+
# projects that don't use namespaces. An empty string element represents the
|
638
|
+
# default namespace. This should be used if the project has data in non-default
|
639
|
+
# namespaces, but doesn't want to include them. Each namespace in this list must
|
640
|
+
# be unique.
|
641
|
+
# Corresponds to the JSON property `namespaceIds`
|
642
|
+
# @return [Array<String>]
|
643
|
+
attr_accessor :namespace_ids
|
644
|
+
|
645
|
+
def initialize(**args)
|
646
|
+
update!(**args)
|
647
|
+
end
|
648
|
+
|
649
|
+
# Update properties of this object
|
650
|
+
def update!(**args)
|
651
|
+
@kinds = args[:kinds] if args.key?(:kinds)
|
652
|
+
@namespace_ids = args[:namespace_ids] if args.key?(:namespace_ids)
|
653
|
+
end
|
654
|
+
end
|
655
|
+
|
656
|
+
# Metadata for ExportEntities operations.
|
657
|
+
class GoogleDatastoreAdminV1beta1ExportEntitiesMetadata
|
658
|
+
include Google::Apis::Core::Hashable
|
659
|
+
|
660
|
+
# Metadata common to all Datastore Admin operations.
|
661
|
+
# Corresponds to the JSON property `common`
|
662
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1CommonMetadata]
|
663
|
+
attr_accessor :common
|
664
|
+
|
665
|
+
# Identifies a subset of entities in a project. This is specified as
|
666
|
+
# combinations of kinds and namespaces (either or both of which may be all, as
|
667
|
+
# described in the following examples). Example usage: Entire project: kinds=[],
|
668
|
+
# namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
|
669
|
+
# namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
|
670
|
+
# 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
|
671
|
+
# namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
|
672
|
+
# namespace: kinds=[], namespace_ids=['Baz']
|
673
|
+
# Corresponds to the JSON property `entityFilter`
|
674
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1EntityFilter]
|
675
|
+
attr_accessor :entity_filter
|
676
|
+
|
677
|
+
# Location for the export metadata and data files. This will be the same value
|
678
|
+
# as the google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix
|
679
|
+
# field. The final output location is provided in google.datastore.admin.v1beta1.
|
680
|
+
# ExportEntitiesResponse.output_url.
|
681
|
+
# Corresponds to the JSON property `outputUrlPrefix`
|
682
|
+
# @return [String]
|
683
|
+
attr_accessor :output_url_prefix
|
684
|
+
|
685
|
+
# Measures the progress of a particular metric.
|
686
|
+
# Corresponds to the JSON property `progressBytes`
|
687
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress]
|
688
|
+
attr_accessor :progress_bytes
|
689
|
+
|
690
|
+
# Measures the progress of a particular metric.
|
691
|
+
# Corresponds to the JSON property `progressEntities`
|
692
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress]
|
693
|
+
attr_accessor :progress_entities
|
694
|
+
|
695
|
+
def initialize(**args)
|
696
|
+
update!(**args)
|
697
|
+
end
|
698
|
+
|
699
|
+
# Update properties of this object
|
700
|
+
def update!(**args)
|
701
|
+
@common = args[:common] if args.key?(:common)
|
702
|
+
@entity_filter = args[:entity_filter] if args.key?(:entity_filter)
|
703
|
+
@output_url_prefix = args[:output_url_prefix] if args.key?(:output_url_prefix)
|
704
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
705
|
+
@progress_entities = args[:progress_entities] if args.key?(:progress_entities)
|
706
|
+
end
|
707
|
+
end
|
708
|
+
|
709
|
+
# The response for google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.
|
710
|
+
class GoogleDatastoreAdminV1beta1ExportEntitiesResponse
|
711
|
+
include Google::Apis::Core::Hashable
|
712
|
+
|
713
|
+
# Location of the output metadata file. This can be used to begin an import into
|
714
|
+
# Cloud Datastore (this project or another project). See google.datastore.admin.
|
715
|
+
# v1beta1.ImportEntitiesRequest.input_url. Only present if the operation
|
716
|
+
# completed successfully.
|
717
|
+
# Corresponds to the JSON property `outputUrl`
|
718
|
+
# @return [String]
|
719
|
+
attr_accessor :output_url
|
720
|
+
|
721
|
+
def initialize(**args)
|
722
|
+
update!(**args)
|
723
|
+
end
|
724
|
+
|
725
|
+
# Update properties of this object
|
726
|
+
def update!(**args)
|
727
|
+
@output_url = args[:output_url] if args.key?(:output_url)
|
728
|
+
end
|
729
|
+
end
|
730
|
+
|
731
|
+
# Metadata for ImportEntities operations.
|
732
|
+
class GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
|
733
|
+
include Google::Apis::Core::Hashable
|
734
|
+
|
735
|
+
# Metadata common to all Datastore Admin operations.
|
736
|
+
# Corresponds to the JSON property `common`
|
737
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1CommonMetadata]
|
738
|
+
attr_accessor :common
|
739
|
+
|
740
|
+
# Identifies a subset of entities in a project. This is specified as
|
741
|
+
# combinations of kinds and namespaces (either or both of which may be all, as
|
742
|
+
# described in the following examples). Example usage: Entire project: kinds=[],
|
743
|
+
# namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
|
744
|
+
# namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
|
745
|
+
# 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
|
746
|
+
# namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
|
747
|
+
# namespace: kinds=[], namespace_ids=['Baz']
|
748
|
+
# Corresponds to the JSON property `entityFilter`
|
749
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1EntityFilter]
|
750
|
+
attr_accessor :entity_filter
|
751
|
+
|
752
|
+
# The location of the import metadata file. This will be the same value as the
|
753
|
+
# google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url field.
|
754
|
+
# Corresponds to the JSON property `inputUrl`
|
755
|
+
# @return [String]
|
756
|
+
attr_accessor :input_url
|
757
|
+
|
758
|
+
# Measures the progress of a particular metric.
|
759
|
+
# Corresponds to the JSON property `progressBytes`
|
760
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress]
|
761
|
+
attr_accessor :progress_bytes
|
762
|
+
|
763
|
+
# Measures the progress of a particular metric.
|
764
|
+
# Corresponds to the JSON property `progressEntities`
|
765
|
+
# @return [Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress]
|
766
|
+
attr_accessor :progress_entities
|
767
|
+
|
768
|
+
def initialize(**args)
|
769
|
+
update!(**args)
|
770
|
+
end
|
771
|
+
|
772
|
+
# Update properties of this object
|
773
|
+
def update!(**args)
|
774
|
+
@common = args[:common] if args.key?(:common)
|
775
|
+
@entity_filter = args[:entity_filter] if args.key?(:entity_filter)
|
776
|
+
@input_url = args[:input_url] if args.key?(:input_url)
|
777
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
778
|
+
@progress_entities = args[:progress_entities] if args.key?(:progress_entities)
|
779
|
+
end
|
780
|
+
end
|
781
|
+
|
782
|
+
# Measures the progress of a particular metric.
|
783
|
+
class GoogleDatastoreAdminV1beta1Progress
|
784
|
+
include Google::Apis::Core::Hashable
|
785
|
+
|
786
|
+
# The amount of work that has been completed. Note that this may be greater than
|
787
|
+
# work_estimated.
|
788
|
+
# Corresponds to the JSON property `workCompleted`
|
789
|
+
# @return [Fixnum]
|
790
|
+
attr_accessor :work_completed
|
791
|
+
|
792
|
+
# An estimate of how much work needs to be performed. May be zero if the work
|
793
|
+
# estimate is unavailable.
|
794
|
+
# Corresponds to the JSON property `workEstimated`
|
795
|
+
# @return [Fixnum]
|
796
|
+
attr_accessor :work_estimated
|
797
|
+
|
798
|
+
def initialize(**args)
|
799
|
+
update!(**args)
|
800
|
+
end
|
801
|
+
|
802
|
+
# Update properties of this object
|
803
|
+
def update!(**args)
|
804
|
+
@work_completed = args[:work_completed] if args.key?(:work_completed)
|
805
|
+
@work_estimated = args[:work_estimated] if args.key?(:work_estimated)
|
806
|
+
end
|
807
|
+
end
|
808
|
+
|
809
|
+
# A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
810
|
+
class GqlQuery
|
811
|
+
include Google::Apis::Core::Hashable
|
812
|
+
|
813
|
+
# When false, the query string must not contain any literals and instead must
|
814
|
+
# bind all values. For example, `SELECT * FROM Kind WHERE a = 'string literal'`
|
815
|
+
# is not allowed, while `SELECT * FROM Kind WHERE a = @value` is.
|
816
|
+
# Corresponds to the JSON property `allowLiterals`
|
817
|
+
# @return [Boolean]
|
818
|
+
attr_accessor :allow_literals
|
819
|
+
alias_method :allow_literals?, :allow_literals
|
820
|
+
|
821
|
+
# For each non-reserved named binding site in the query string, there must be a
|
822
|
+
# named parameter with that name, but not necessarily the inverse. Key must
|
823
|
+
# match regex `A-Za-z_$*`, must not match regex `__.*__`, and must not be `""`.
|
824
|
+
# Corresponds to the JSON property `namedBindings`
|
825
|
+
# @return [Hash<String,Google::Apis::DatastoreV1beta3::GqlQueryParameter>]
|
826
|
+
attr_accessor :named_bindings
|
827
|
+
|
828
|
+
# Numbered binding site @1 references the first numbered parameter, effectively
|
829
|
+
# using 1-based indexing, rather than the usual 0. For each binding site
|
830
|
+
# numbered i in `query_string`, there must be an i-th numbered parameter. The
|
831
|
+
# inverse must also be true.
|
832
|
+
# Corresponds to the JSON property `positionalBindings`
|
833
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::GqlQueryParameter>]
|
834
|
+
attr_accessor :positional_bindings
|
835
|
+
|
836
|
+
# A string of the format described [here](https://cloud.google.com/datastore/
|
837
|
+
# docs/apis/gql/gql_reference).
|
838
|
+
# Corresponds to the JSON property `queryString`
|
839
|
+
# @return [String]
|
840
|
+
attr_accessor :query_string
|
841
|
+
|
842
|
+
def initialize(**args)
|
843
|
+
update!(**args)
|
844
|
+
end
|
845
|
+
|
846
|
+
# Update properties of this object
|
847
|
+
def update!(**args)
|
848
|
+
@allow_literals = args[:allow_literals] if args.key?(:allow_literals)
|
849
|
+
@named_bindings = args[:named_bindings] if args.key?(:named_bindings)
|
850
|
+
@positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings)
|
851
|
+
@query_string = args[:query_string] if args.key?(:query_string)
|
852
|
+
end
|
853
|
+
end
|
854
|
+
|
855
|
+
# A binding parameter for a GQL query.
|
856
|
+
class GqlQueryParameter
|
857
|
+
include Google::Apis::Core::Hashable
|
858
|
+
|
859
|
+
# A query cursor. Query cursors are returned in query result batches.
|
860
|
+
# Corresponds to the JSON property `cursor`
|
861
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
862
|
+
# @return [String]
|
863
|
+
attr_accessor :cursor
|
864
|
+
|
865
|
+
# A message that can hold any of the supported value types and associated
|
866
|
+
# metadata.
|
867
|
+
# Corresponds to the JSON property `value`
|
868
|
+
# @return [Google::Apis::DatastoreV1beta3::Value]
|
869
|
+
attr_accessor :value
|
870
|
+
|
871
|
+
def initialize(**args)
|
872
|
+
update!(**args)
|
873
|
+
end
|
874
|
+
|
875
|
+
# Update properties of this object
|
876
|
+
def update!(**args)
|
877
|
+
@cursor = args[:cursor] if args.key?(:cursor)
|
878
|
+
@value = args[:value] if args.key?(:value)
|
879
|
+
end
|
880
|
+
end
|
881
|
+
|
882
|
+
# A unique identifier for an entity. If a key's partition ID or any of its path
|
883
|
+
# kinds or names are reserved/read-only, the key is reserved/read-only. A
|
884
|
+
# reserved/read-only key is forbidden in certain documented contexts.
|
885
|
+
class Key
|
886
|
+
include Google::Apis::Core::Hashable
|
887
|
+
|
888
|
+
# A partition ID identifies a grouping of entities. The grouping is always by
|
889
|
+
# project and namespace, however the namespace ID may be empty. A partition ID
|
890
|
+
# contains several dimensions: project ID and namespace ID. Partition dimensions:
|
891
|
+
# - May be `""`. - Must be valid UTF-8 bytes. - Must have values that match
|
892
|
+
# regex `[A-Za-z\d\.\-_]`1,100`` If the value of any dimension matches regex `__.
|
893
|
+
# *__`, the partition is reserved/read-only. A reserved/read-only partition ID
|
894
|
+
# is forbidden in certain documented contexts. Foreign partition IDs (in which
|
895
|
+
# the project ID does not match the context project ID ) are discouraged. Reads
|
896
|
+
# and writes of foreign partition IDs may fail if the project is not in an
|
897
|
+
# active state.
|
898
|
+
# Corresponds to the JSON property `partitionId`
|
899
|
+
# @return [Google::Apis::DatastoreV1beta3::PartitionId]
|
900
|
+
attr_accessor :partition_id
|
901
|
+
|
902
|
+
# The entity path. An entity path consists of one or more elements composed of a
|
903
|
+
# kind and a string or numerical identifier, which identify entities. The first
|
904
|
+
# element identifies a _root entity_, the second element identifies a _child_ of
|
905
|
+
# the root entity, the third element identifies a child of the second entity,
|
906
|
+
# and so forth. The entities identified by all prefixes of the path are called
|
907
|
+
# the element's _ancestors_. An entity path is always fully complete: *all* of
|
908
|
+
# the entity's ancestors are required to be in the path along with the entity
|
909
|
+
# identifier itself. The only exception is that in some documented cases, the
|
910
|
+
# identifier in the last path element (for the entity) itself may be omitted.
|
911
|
+
# For example, the last path element of the key of `Mutation.insert` may have no
|
912
|
+
# identifier. A path can never be empty, and a path can have at most 100
|
913
|
+
# elements.
|
914
|
+
# Corresponds to the JSON property `path`
|
915
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::PathElement>]
|
916
|
+
attr_accessor :path
|
917
|
+
|
918
|
+
def initialize(**args)
|
919
|
+
update!(**args)
|
920
|
+
end
|
921
|
+
|
922
|
+
# Update properties of this object
|
923
|
+
def update!(**args)
|
924
|
+
@partition_id = args[:partition_id] if args.key?(:partition_id)
|
925
|
+
@path = args[:path] if args.key?(:path)
|
926
|
+
end
|
927
|
+
end
|
928
|
+
|
929
|
+
# A representation of a kind.
|
930
|
+
class KindExpression
|
931
|
+
include Google::Apis::Core::Hashable
|
932
|
+
|
933
|
+
# The name of the kind.
|
934
|
+
# Corresponds to the JSON property `name`
|
935
|
+
# @return [String]
|
936
|
+
attr_accessor :name
|
937
|
+
|
938
|
+
def initialize(**args)
|
939
|
+
update!(**args)
|
940
|
+
end
|
941
|
+
|
942
|
+
# Update properties of this object
|
943
|
+
def update!(**args)
|
944
|
+
@name = args[:name] if args.key?(:name)
|
945
|
+
end
|
946
|
+
end
|
947
|
+
|
948
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
949
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
950
|
+
# specified otherwise, this must conform to the WGS84 standard. Values must be
|
951
|
+
# within normalized ranges.
|
952
|
+
class LatLng
|
953
|
+
include Google::Apis::Core::Hashable
|
954
|
+
|
955
|
+
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
956
|
+
# Corresponds to the JSON property `latitude`
|
957
|
+
# @return [Float]
|
958
|
+
attr_accessor :latitude
|
959
|
+
|
960
|
+
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
961
|
+
# Corresponds to the JSON property `longitude`
|
962
|
+
# @return [Float]
|
963
|
+
attr_accessor :longitude
|
964
|
+
|
965
|
+
def initialize(**args)
|
966
|
+
update!(**args)
|
967
|
+
end
|
968
|
+
|
969
|
+
# Update properties of this object
|
970
|
+
def update!(**args)
|
971
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
972
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
973
|
+
end
|
974
|
+
end
|
975
|
+
|
976
|
+
# The request for Datastore.Lookup.
|
977
|
+
class LookupRequest
|
978
|
+
include Google::Apis::Core::Hashable
|
979
|
+
|
980
|
+
# Required. Keys of entities to look up.
|
981
|
+
# Corresponds to the JSON property `keys`
|
982
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
983
|
+
attr_accessor :keys
|
984
|
+
|
985
|
+
# The options shared by read requests.
|
986
|
+
# Corresponds to the JSON property `readOptions`
|
987
|
+
# @return [Google::Apis::DatastoreV1beta3::ReadOptions]
|
988
|
+
attr_accessor :read_options
|
989
|
+
|
990
|
+
def initialize(**args)
|
991
|
+
update!(**args)
|
992
|
+
end
|
993
|
+
|
994
|
+
# Update properties of this object
|
995
|
+
def update!(**args)
|
996
|
+
@keys = args[:keys] if args.key?(:keys)
|
997
|
+
@read_options = args[:read_options] if args.key?(:read_options)
|
998
|
+
end
|
999
|
+
end
|
1000
|
+
|
1001
|
+
# The response for Datastore.Lookup.
|
1002
|
+
class LookupResponse
|
1003
|
+
include Google::Apis::Core::Hashable
|
1004
|
+
|
1005
|
+
# A list of keys that were not looked up due to resource constraints. The order
|
1006
|
+
# of results in this field is undefined and has no relation to the order of the
|
1007
|
+
# keys in the input.
|
1008
|
+
# Corresponds to the JSON property `deferred`
|
1009
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
1010
|
+
attr_accessor :deferred
|
1011
|
+
|
1012
|
+
# Entities found as `ResultType.FULL` entities. The order of results in this
|
1013
|
+
# field is undefined and has no relation to the order of the keys in the input.
|
1014
|
+
# Corresponds to the JSON property `found`
|
1015
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::EntityResult>]
|
1016
|
+
attr_accessor :found
|
1017
|
+
|
1018
|
+
# Entities not found as `ResultType.KEY_ONLY` entities. The order of results in
|
1019
|
+
# this field is undefined and has no relation to the order of the keys in the
|
1020
|
+
# input.
|
1021
|
+
# Corresponds to the JSON property `missing`
|
1022
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::EntityResult>]
|
1023
|
+
attr_accessor :missing
|
1024
|
+
|
1025
|
+
def initialize(**args)
|
1026
|
+
update!(**args)
|
1027
|
+
end
|
1028
|
+
|
1029
|
+
# Update properties of this object
|
1030
|
+
def update!(**args)
|
1031
|
+
@deferred = args[:deferred] if args.key?(:deferred)
|
1032
|
+
@found = args[:found] if args.key?(:found)
|
1033
|
+
@missing = args[:missing] if args.key?(:missing)
|
1034
|
+
end
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
# A mutation to apply to an entity.
|
1038
|
+
class Mutation
|
1039
|
+
include Google::Apis::Core::Hashable
|
1040
|
+
|
1041
|
+
# The version of the entity that this mutation is being applied to. If this does
|
1042
|
+
# not match the current version on the server, the mutation conflicts.
|
1043
|
+
# Corresponds to the JSON property `baseVersion`
|
1044
|
+
# @return [Fixnum]
|
1045
|
+
attr_accessor :base_version
|
1046
|
+
|
1047
|
+
# A unique identifier for an entity. If a key's partition ID or any of its path
|
1048
|
+
# kinds or names are reserved/read-only, the key is reserved/read-only. A
|
1049
|
+
# reserved/read-only key is forbidden in certain documented contexts.
|
1050
|
+
# Corresponds to the JSON property `delete`
|
1051
|
+
# @return [Google::Apis::DatastoreV1beta3::Key]
|
1052
|
+
attr_accessor :delete
|
1053
|
+
|
1054
|
+
# A Datastore data object. An entity is limited to 1 megabyte when stored. That
|
1055
|
+
# _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
|
1056
|
+
# message.
|
1057
|
+
# Corresponds to the JSON property `insert`
|
1058
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
1059
|
+
attr_accessor :insert
|
1060
|
+
|
1061
|
+
# A Datastore data object. An entity is limited to 1 megabyte when stored. That
|
1062
|
+
# _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
|
1063
|
+
# message.
|
1064
|
+
# Corresponds to the JSON property `update`
|
1065
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
1066
|
+
attr_accessor :update
|
1067
|
+
|
1068
|
+
# A Datastore data object. An entity is limited to 1 megabyte when stored. That
|
1069
|
+
# _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
|
1070
|
+
# message.
|
1071
|
+
# Corresponds to the JSON property `upsert`
|
1072
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
1073
|
+
attr_accessor :upsert
|
1074
|
+
|
1075
|
+
def initialize(**args)
|
1076
|
+
update!(**args)
|
1077
|
+
end
|
1078
|
+
|
1079
|
+
# Update properties of this object
|
1080
|
+
def update!(**args)
|
1081
|
+
@base_version = args[:base_version] if args.key?(:base_version)
|
1082
|
+
@delete = args[:delete] if args.key?(:delete)
|
1083
|
+
@insert = args[:insert] if args.key?(:insert)
|
1084
|
+
@update = args[:update] if args.key?(:update)
|
1085
|
+
@upsert = args[:upsert] if args.key?(:upsert)
|
1086
|
+
end
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
# The result of applying a mutation.
|
1090
|
+
class MutationResult
|
1091
|
+
include Google::Apis::Core::Hashable
|
1092
|
+
|
1093
|
+
# Whether a conflict was detected for this mutation. Always false when a
|
1094
|
+
# conflict detection strategy field is not set in the mutation.
|
1095
|
+
# Corresponds to the JSON property `conflictDetected`
|
1096
|
+
# @return [Boolean]
|
1097
|
+
attr_accessor :conflict_detected
|
1098
|
+
alias_method :conflict_detected?, :conflict_detected
|
1099
|
+
|
1100
|
+
# A unique identifier for an entity. If a key's partition ID or any of its path
|
1101
|
+
# kinds or names are reserved/read-only, the key is reserved/read-only. A
|
1102
|
+
# reserved/read-only key is forbidden in certain documented contexts.
|
1103
|
+
# Corresponds to the JSON property `key`
|
1104
|
+
# @return [Google::Apis::DatastoreV1beta3::Key]
|
1105
|
+
attr_accessor :key
|
1106
|
+
|
1107
|
+
# The version of the entity on the server after processing the mutation. If the
|
1108
|
+
# mutation doesn't change anything on the server, then the version will be the
|
1109
|
+
# version of the current entity or, if no entity is present, a version that is
|
1110
|
+
# strictly greater than the version of any previous entity and less than the
|
1111
|
+
# version of any possible future entity.
|
1112
|
+
# Corresponds to the JSON property `version`
|
1113
|
+
# @return [Fixnum]
|
1114
|
+
attr_accessor :version
|
1115
|
+
|
1116
|
+
def initialize(**args)
|
1117
|
+
update!(**args)
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
# Update properties of this object
|
1121
|
+
def update!(**args)
|
1122
|
+
@conflict_detected = args[:conflict_detected] if args.key?(:conflict_detected)
|
1123
|
+
@key = args[:key] if args.key?(:key)
|
1124
|
+
@version = args[:version] if args.key?(:version)
|
1125
|
+
end
|
1126
|
+
end
|
1127
|
+
|
1128
|
+
# A partition ID identifies a grouping of entities. The grouping is always by
|
1129
|
+
# project and namespace, however the namespace ID may be empty. A partition ID
|
1130
|
+
# contains several dimensions: project ID and namespace ID. Partition dimensions:
|
1131
|
+
# - May be `""`. - Must be valid UTF-8 bytes. - Must have values that match
|
1132
|
+
# regex `[A-Za-z\d\.\-_]`1,100`` If the value of any dimension matches regex `__.
|
1133
|
+
# *__`, the partition is reserved/read-only. A reserved/read-only partition ID
|
1134
|
+
# is forbidden in certain documented contexts. Foreign partition IDs (in which
|
1135
|
+
# the project ID does not match the context project ID ) are discouraged. Reads
|
1136
|
+
# and writes of foreign partition IDs may fail if the project is not in an
|
1137
|
+
# active state.
|
1138
|
+
class PartitionId
|
1139
|
+
include Google::Apis::Core::Hashable
|
1140
|
+
|
1141
|
+
# If not empty, the ID of the namespace to which the entities belong.
|
1142
|
+
# Corresponds to the JSON property `namespaceId`
|
1143
|
+
# @return [String]
|
1144
|
+
attr_accessor :namespace_id
|
1145
|
+
|
1146
|
+
# The ID of the project to which the entities belong.
|
1147
|
+
# Corresponds to the JSON property `projectId`
|
1148
|
+
# @return [String]
|
1149
|
+
attr_accessor :project_id
|
1150
|
+
|
1151
|
+
def initialize(**args)
|
1152
|
+
update!(**args)
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
# Update properties of this object
|
1156
|
+
def update!(**args)
|
1157
|
+
@namespace_id = args[:namespace_id] if args.key?(:namespace_id)
|
1158
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
1159
|
+
end
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
# A (kind, ID/name) pair used to construct a key path. If either name or ID is
|
1163
|
+
# set, the element is complete. If neither is set, the element is incomplete.
|
1164
|
+
class PathElement
|
1165
|
+
include Google::Apis::Core::Hashable
|
1166
|
+
|
1167
|
+
# The auto-allocated ID of the entity. Never equal to zero. Values less than
|
1168
|
+
# zero are discouraged and may not be supported in the future.
|
1169
|
+
# Corresponds to the JSON property `id`
|
1170
|
+
# @return [Fixnum]
|
1171
|
+
attr_accessor :id
|
1172
|
+
|
1173
|
+
# The kind of the entity. A kind matching regex `__.*__` is reserved/read-only.
|
1174
|
+
# A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be `""`
|
1175
|
+
# .
|
1176
|
+
# Corresponds to the JSON property `kind`
|
1177
|
+
# @return [String]
|
1178
|
+
attr_accessor :kind
|
1179
|
+
|
1180
|
+
# The name of the entity. A name matching regex `__.*__` is reserved/read-only.
|
1181
|
+
# A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be `""`.
|
1182
|
+
# Corresponds to the JSON property `name`
|
1183
|
+
# @return [String]
|
1184
|
+
attr_accessor :name
|
1185
|
+
|
1186
|
+
def initialize(**args)
|
1187
|
+
update!(**args)
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
# Update properties of this object
|
1191
|
+
def update!(**args)
|
1192
|
+
@id = args[:id] if args.key?(:id)
|
1193
|
+
@kind = args[:kind] if args.key?(:kind)
|
1194
|
+
@name = args[:name] if args.key?(:name)
|
1195
|
+
end
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
# A representation of a property in a projection.
|
1199
|
+
class Projection
|
1200
|
+
include Google::Apis::Core::Hashable
|
1201
|
+
|
1202
|
+
# A reference to a property relative to the kind expressions.
|
1203
|
+
# Corresponds to the JSON property `property`
|
1204
|
+
# @return [Google::Apis::DatastoreV1beta3::PropertyReference]
|
1205
|
+
attr_accessor :property
|
1206
|
+
|
1207
|
+
def initialize(**args)
|
1208
|
+
update!(**args)
|
1209
|
+
end
|
1210
|
+
|
1211
|
+
# Update properties of this object
|
1212
|
+
def update!(**args)
|
1213
|
+
@property = args[:property] if args.key?(:property)
|
1214
|
+
end
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
# A filter on a specific property.
|
1218
|
+
class PropertyFilter
|
1219
|
+
include Google::Apis::Core::Hashable
|
1220
|
+
|
1221
|
+
# The operator to filter by.
|
1222
|
+
# Corresponds to the JSON property `op`
|
1223
|
+
# @return [String]
|
1224
|
+
attr_accessor :op
|
1225
|
+
|
1226
|
+
# A reference to a property relative to the kind expressions.
|
1227
|
+
# Corresponds to the JSON property `property`
|
1228
|
+
# @return [Google::Apis::DatastoreV1beta3::PropertyReference]
|
1229
|
+
attr_accessor :property
|
1230
|
+
|
1231
|
+
# A message that can hold any of the supported value types and associated
|
1232
|
+
# metadata.
|
1233
|
+
# Corresponds to the JSON property `value`
|
1234
|
+
# @return [Google::Apis::DatastoreV1beta3::Value]
|
1235
|
+
attr_accessor :value
|
1236
|
+
|
1237
|
+
def initialize(**args)
|
1238
|
+
update!(**args)
|
1239
|
+
end
|
1240
|
+
|
1241
|
+
# Update properties of this object
|
1242
|
+
def update!(**args)
|
1243
|
+
@op = args[:op] if args.key?(:op)
|
1244
|
+
@property = args[:property] if args.key?(:property)
|
1245
|
+
@value = args[:value] if args.key?(:value)
|
1246
|
+
end
|
1247
|
+
end
|
1248
|
+
|
1249
|
+
# The desired order for a specific property.
|
1250
|
+
class PropertyOrder
|
1251
|
+
include Google::Apis::Core::Hashable
|
1252
|
+
|
1253
|
+
# The direction to order by. Defaults to `ASCENDING`.
|
1254
|
+
# Corresponds to the JSON property `direction`
|
1255
|
+
# @return [String]
|
1256
|
+
attr_accessor :direction
|
1257
|
+
|
1258
|
+
# A reference to a property relative to the kind expressions.
|
1259
|
+
# Corresponds to the JSON property `property`
|
1260
|
+
# @return [Google::Apis::DatastoreV1beta3::PropertyReference]
|
1261
|
+
attr_accessor :property
|
1262
|
+
|
1263
|
+
def initialize(**args)
|
1264
|
+
update!(**args)
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# Update properties of this object
|
1268
|
+
def update!(**args)
|
1269
|
+
@direction = args[:direction] if args.key?(:direction)
|
1270
|
+
@property = args[:property] if args.key?(:property)
|
1271
|
+
end
|
1272
|
+
end
|
1273
|
+
|
1274
|
+
# A reference to a property relative to the kind expressions.
|
1275
|
+
class PropertyReference
|
1276
|
+
include Google::Apis::Core::Hashable
|
1277
|
+
|
1278
|
+
# The name of the property. If name includes "."s, it may be interpreted as a
|
1279
|
+
# property name path.
|
1280
|
+
# Corresponds to the JSON property `name`
|
1281
|
+
# @return [String]
|
1282
|
+
attr_accessor :name
|
1283
|
+
|
1284
|
+
def initialize(**args)
|
1285
|
+
update!(**args)
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
# Update properties of this object
|
1289
|
+
def update!(**args)
|
1290
|
+
@name = args[:name] if args.key?(:name)
|
1291
|
+
end
|
1292
|
+
end
|
1293
|
+
|
1294
|
+
# A query for entities.
|
1295
|
+
class Query
|
1296
|
+
include Google::Apis::Core::Hashable
|
1297
|
+
|
1298
|
+
# The properties to make distinct. The query results will contain the first
|
1299
|
+
# result for each distinct combination of values for the given properties (if
|
1300
|
+
# empty, all results are returned).
|
1301
|
+
# Corresponds to the JSON property `distinctOn`
|
1302
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::PropertyReference>]
|
1303
|
+
attr_accessor :distinct_on
|
1304
|
+
|
1305
|
+
# An ending point for the query results. Query cursors are returned in query
|
1306
|
+
# result batches and [can only be used to limit the same query](https://cloud.
|
1307
|
+
# google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
|
1308
|
+
# Corresponds to the JSON property `endCursor`
|
1309
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1310
|
+
# @return [String]
|
1311
|
+
attr_accessor :end_cursor
|
1312
|
+
|
1313
|
+
# A holder for any type of filter.
|
1314
|
+
# Corresponds to the JSON property `filter`
|
1315
|
+
# @return [Google::Apis::DatastoreV1beta3::Filter]
|
1316
|
+
attr_accessor :filter
|
1317
|
+
|
1318
|
+
# The kinds to query (if empty, returns entities of all kinds). Currently at
|
1319
|
+
# most 1 kind may be specified.
|
1320
|
+
# Corresponds to the JSON property `kind`
|
1321
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::KindExpression>]
|
1322
|
+
attr_accessor :kind
|
1323
|
+
|
1324
|
+
# The maximum number of results to return. Applies after all other constraints.
|
1325
|
+
# Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
|
1326
|
+
# Corresponds to the JSON property `limit`
|
1327
|
+
# @return [Fixnum]
|
1328
|
+
attr_accessor :limit
|
1329
|
+
|
1330
|
+
# The number of results to skip. Applies before limit, but after all other
|
1331
|
+
# constraints. Optional. Must be >= 0 if specified.
|
1332
|
+
# Corresponds to the JSON property `offset`
|
1333
|
+
# @return [Fixnum]
|
1334
|
+
attr_accessor :offset
|
1335
|
+
|
1336
|
+
# The order to apply to the query results (if empty, order is unspecified).
|
1337
|
+
# Corresponds to the JSON property `order`
|
1338
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::PropertyOrder>]
|
1339
|
+
attr_accessor :order
|
1340
|
+
|
1341
|
+
# The projection to return. Defaults to returning all properties.
|
1342
|
+
# Corresponds to the JSON property `projection`
|
1343
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Projection>]
|
1344
|
+
attr_accessor :projection
|
1345
|
+
|
1346
|
+
# A starting point for the query results. Query cursors are returned in query
|
1347
|
+
# result batches and [can only be used to continue the same query](https://cloud.
|
1348
|
+
# google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
|
1349
|
+
# Corresponds to the JSON property `startCursor`
|
1350
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1351
|
+
# @return [String]
|
1352
|
+
attr_accessor :start_cursor
|
1353
|
+
|
1354
|
+
def initialize(**args)
|
1355
|
+
update!(**args)
|
1356
|
+
end
|
1357
|
+
|
1358
|
+
# Update properties of this object
|
1359
|
+
def update!(**args)
|
1360
|
+
@distinct_on = args[:distinct_on] if args.key?(:distinct_on)
|
1361
|
+
@end_cursor = args[:end_cursor] if args.key?(:end_cursor)
|
1362
|
+
@filter = args[:filter] if args.key?(:filter)
|
1363
|
+
@kind = args[:kind] if args.key?(:kind)
|
1364
|
+
@limit = args[:limit] if args.key?(:limit)
|
1365
|
+
@offset = args[:offset] if args.key?(:offset)
|
1366
|
+
@order = args[:order] if args.key?(:order)
|
1367
|
+
@projection = args[:projection] if args.key?(:projection)
|
1368
|
+
@start_cursor = args[:start_cursor] if args.key?(:start_cursor)
|
1369
|
+
end
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
# A batch of results produced by a query.
|
1373
|
+
class QueryResultBatch
|
1374
|
+
include Google::Apis::Core::Hashable
|
1375
|
+
|
1376
|
+
# A cursor that points to the position after the last result in the batch.
|
1377
|
+
# Corresponds to the JSON property `endCursor`
|
1378
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1379
|
+
# @return [String]
|
1380
|
+
attr_accessor :end_cursor
|
1381
|
+
|
1382
|
+
# The result type for every entity in `entity_results`.
|
1383
|
+
# Corresponds to the JSON property `entityResultType`
|
1384
|
+
# @return [String]
|
1385
|
+
attr_accessor :entity_result_type
|
1386
|
+
|
1387
|
+
# The results for this batch.
|
1388
|
+
# Corresponds to the JSON property `entityResults`
|
1389
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::EntityResult>]
|
1390
|
+
attr_accessor :entity_results
|
1391
|
+
|
1392
|
+
# The state of the query after the current batch.
|
1393
|
+
# Corresponds to the JSON property `moreResults`
|
1394
|
+
# @return [String]
|
1395
|
+
attr_accessor :more_results
|
1396
|
+
|
1397
|
+
# A cursor that points to the position after the last skipped result. Will be
|
1398
|
+
# set when `skipped_results` != 0.
|
1399
|
+
# Corresponds to the JSON property `skippedCursor`
|
1400
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1401
|
+
# @return [String]
|
1402
|
+
attr_accessor :skipped_cursor
|
1403
|
+
|
1404
|
+
# The number of results skipped, typically because of an offset.
|
1405
|
+
# Corresponds to the JSON property `skippedResults`
|
1406
|
+
# @return [Fixnum]
|
1407
|
+
attr_accessor :skipped_results
|
1408
|
+
|
1409
|
+
# The version number of the snapshot this batch was returned from. This applies
|
1410
|
+
# to the range of results from the query's `start_cursor` (or the beginning of
|
1411
|
+
# the query if no cursor was given) to this batch's `end_cursor` (not the query'
|
1412
|
+
# s `end_cursor`). In a single transaction, subsequent query result batches for
|
1413
|
+
# the same query can have a greater snapshot version number. Each batch's
|
1414
|
+
# snapshot version is valid for all preceding batches. The value will be zero
|
1415
|
+
# for eventually consistent queries.
|
1416
|
+
# Corresponds to the JSON property `snapshotVersion`
|
1417
|
+
# @return [Fixnum]
|
1418
|
+
attr_accessor :snapshot_version
|
1419
|
+
|
1420
|
+
def initialize(**args)
|
1421
|
+
update!(**args)
|
1422
|
+
end
|
1423
|
+
|
1424
|
+
# Update properties of this object
|
1425
|
+
def update!(**args)
|
1426
|
+
@end_cursor = args[:end_cursor] if args.key?(:end_cursor)
|
1427
|
+
@entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
|
1428
|
+
@entity_results = args[:entity_results] if args.key?(:entity_results)
|
1429
|
+
@more_results = args[:more_results] if args.key?(:more_results)
|
1430
|
+
@skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
|
1431
|
+
@skipped_results = args[:skipped_results] if args.key?(:skipped_results)
|
1432
|
+
@snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version)
|
1433
|
+
end
|
1434
|
+
end
|
1435
|
+
|
1436
|
+
# Options specific to read-only transactions.
|
1437
|
+
class ReadOnly
|
1438
|
+
include Google::Apis::Core::Hashable
|
1439
|
+
|
1440
|
+
def initialize(**args)
|
1441
|
+
update!(**args)
|
1442
|
+
end
|
1443
|
+
|
1444
|
+
# Update properties of this object
|
1445
|
+
def update!(**args)
|
1446
|
+
end
|
1447
|
+
end
|
1448
|
+
|
1449
|
+
# The options shared by read requests.
|
1450
|
+
class ReadOptions
|
1451
|
+
include Google::Apis::Core::Hashable
|
1452
|
+
|
1453
|
+
# The non-transactional read consistency to use. Cannot be set to `STRONG` for
|
1454
|
+
# global queries.
|
1455
|
+
# Corresponds to the JSON property `readConsistency`
|
1456
|
+
# @return [String]
|
1457
|
+
attr_accessor :read_consistency
|
1458
|
+
|
1459
|
+
# The identifier of the transaction in which to read. A transaction identifier
|
1460
|
+
# is returned by a call to Datastore.BeginTransaction.
|
1461
|
+
# Corresponds to the JSON property `transaction`
|
1462
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1463
|
+
# @return [String]
|
1464
|
+
attr_accessor :transaction
|
1465
|
+
|
1466
|
+
def initialize(**args)
|
1467
|
+
update!(**args)
|
1468
|
+
end
|
1469
|
+
|
1470
|
+
# Update properties of this object
|
1471
|
+
def update!(**args)
|
1472
|
+
@read_consistency = args[:read_consistency] if args.key?(:read_consistency)
|
1473
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
1474
|
+
end
|
1475
|
+
end
|
1476
|
+
|
1477
|
+
# Options specific to read / write transactions.
|
1478
|
+
class ReadWrite
|
1479
|
+
include Google::Apis::Core::Hashable
|
1480
|
+
|
1481
|
+
# The transaction identifier of the transaction being retried.
|
1482
|
+
# Corresponds to the JSON property `previousTransaction`
|
1483
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1484
|
+
# @return [String]
|
1485
|
+
attr_accessor :previous_transaction
|
1486
|
+
|
1487
|
+
def initialize(**args)
|
1488
|
+
update!(**args)
|
1489
|
+
end
|
1490
|
+
|
1491
|
+
# Update properties of this object
|
1492
|
+
def update!(**args)
|
1493
|
+
@previous_transaction = args[:previous_transaction] if args.key?(:previous_transaction)
|
1494
|
+
end
|
1495
|
+
end
|
1496
|
+
|
1497
|
+
# The request for Datastore.ReserveIds.
|
1498
|
+
class ReserveIdsRequest
|
1499
|
+
include Google::Apis::Core::Hashable
|
1500
|
+
|
1501
|
+
# If not empty, the ID of the database against which to make the request.
|
1502
|
+
# Corresponds to the JSON property `databaseId`
|
1503
|
+
# @return [String]
|
1504
|
+
attr_accessor :database_id
|
1505
|
+
|
1506
|
+
# Required. A list of keys with complete key paths whose numeric IDs should not
|
1507
|
+
# be auto-allocated.
|
1508
|
+
# Corresponds to the JSON property `keys`
|
1509
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
1510
|
+
attr_accessor :keys
|
1511
|
+
|
1512
|
+
def initialize(**args)
|
1513
|
+
update!(**args)
|
1514
|
+
end
|
1515
|
+
|
1516
|
+
# Update properties of this object
|
1517
|
+
def update!(**args)
|
1518
|
+
@database_id = args[:database_id] if args.key?(:database_id)
|
1519
|
+
@keys = args[:keys] if args.key?(:keys)
|
1520
|
+
end
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
# The response for Datastore.ReserveIds.
|
1524
|
+
class ReserveIdsResponse
|
1525
|
+
include Google::Apis::Core::Hashable
|
1526
|
+
|
1527
|
+
def initialize(**args)
|
1528
|
+
update!(**args)
|
1529
|
+
end
|
1530
|
+
|
1531
|
+
# Update properties of this object
|
1532
|
+
def update!(**args)
|
1533
|
+
end
|
1534
|
+
end
|
1535
|
+
|
1536
|
+
# The request for Datastore.Rollback.
|
1537
|
+
class RollbackRequest
|
1538
|
+
include Google::Apis::Core::Hashable
|
1539
|
+
|
1540
|
+
# Required. The transaction identifier, returned by a call to Datastore.
|
1541
|
+
# BeginTransaction.
|
1542
|
+
# Corresponds to the JSON property `transaction`
|
1543
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1544
|
+
# @return [String]
|
1545
|
+
attr_accessor :transaction
|
1546
|
+
|
1547
|
+
def initialize(**args)
|
1548
|
+
update!(**args)
|
1549
|
+
end
|
1550
|
+
|
1551
|
+
# Update properties of this object
|
1552
|
+
def update!(**args)
|
1553
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
1554
|
+
end
|
1555
|
+
end
|
1556
|
+
|
1557
|
+
# The response for Datastore.Rollback. (an empty message).
|
1558
|
+
class RollbackResponse
|
1559
|
+
include Google::Apis::Core::Hashable
|
1560
|
+
|
1561
|
+
def initialize(**args)
|
1562
|
+
update!(**args)
|
1563
|
+
end
|
1564
|
+
|
1565
|
+
# Update properties of this object
|
1566
|
+
def update!(**args)
|
1567
|
+
end
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
# The request for Datastore.RunQuery.
|
1571
|
+
class RunQueryRequest
|
1572
|
+
include Google::Apis::Core::Hashable
|
1573
|
+
|
1574
|
+
# A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
1575
|
+
# Corresponds to the JSON property `gqlQuery`
|
1576
|
+
# @return [Google::Apis::DatastoreV1beta3::GqlQuery]
|
1577
|
+
attr_accessor :gql_query
|
1578
|
+
|
1579
|
+
# A partition ID identifies a grouping of entities. The grouping is always by
|
1580
|
+
# project and namespace, however the namespace ID may be empty. A partition ID
|
1581
|
+
# contains several dimensions: project ID and namespace ID. Partition dimensions:
|
1582
|
+
# - May be `""`. - Must be valid UTF-8 bytes. - Must have values that match
|
1583
|
+
# regex `[A-Za-z\d\.\-_]`1,100`` If the value of any dimension matches regex `__.
|
1584
|
+
# *__`, the partition is reserved/read-only. A reserved/read-only partition ID
|
1585
|
+
# is forbidden in certain documented contexts. Foreign partition IDs (in which
|
1586
|
+
# the project ID does not match the context project ID ) are discouraged. Reads
|
1587
|
+
# and writes of foreign partition IDs may fail if the project is not in an
|
1588
|
+
# active state.
|
1589
|
+
# Corresponds to the JSON property `partitionId`
|
1590
|
+
# @return [Google::Apis::DatastoreV1beta3::PartitionId]
|
1591
|
+
attr_accessor :partition_id
|
1592
|
+
|
1593
|
+
# A query for entities.
|
1594
|
+
# Corresponds to the JSON property `query`
|
1595
|
+
# @return [Google::Apis::DatastoreV1beta3::Query]
|
1596
|
+
attr_accessor :query
|
1597
|
+
|
1598
|
+
# The options shared by read requests.
|
1599
|
+
# Corresponds to the JSON property `readOptions`
|
1600
|
+
# @return [Google::Apis::DatastoreV1beta3::ReadOptions]
|
1601
|
+
attr_accessor :read_options
|
1602
|
+
|
1603
|
+
def initialize(**args)
|
1604
|
+
update!(**args)
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# Update properties of this object
|
1608
|
+
def update!(**args)
|
1609
|
+
@gql_query = args[:gql_query] if args.key?(:gql_query)
|
1610
|
+
@partition_id = args[:partition_id] if args.key?(:partition_id)
|
1611
|
+
@query = args[:query] if args.key?(:query)
|
1612
|
+
@read_options = args[:read_options] if args.key?(:read_options)
|
1613
|
+
end
|
1614
|
+
end
|
1615
|
+
|
1616
|
+
# The response for Datastore.RunQuery.
|
1617
|
+
class RunQueryResponse
|
1618
|
+
include Google::Apis::Core::Hashable
|
1619
|
+
|
1620
|
+
# A batch of results produced by a query.
|
1621
|
+
# Corresponds to the JSON property `batch`
|
1622
|
+
# @return [Google::Apis::DatastoreV1beta3::QueryResultBatch]
|
1623
|
+
attr_accessor :batch
|
1624
|
+
|
1625
|
+
# A query for entities.
|
1626
|
+
# Corresponds to the JSON property `query`
|
1627
|
+
# @return [Google::Apis::DatastoreV1beta3::Query]
|
1628
|
+
attr_accessor :query
|
1629
|
+
|
1630
|
+
def initialize(**args)
|
1631
|
+
update!(**args)
|
1632
|
+
end
|
1633
|
+
|
1634
|
+
# Update properties of this object
|
1635
|
+
def update!(**args)
|
1636
|
+
@batch = args[:batch] if args.key?(:batch)
|
1637
|
+
@query = args[:query] if args.key?(:query)
|
1638
|
+
end
|
1639
|
+
end
|
1640
|
+
|
1641
|
+
# Options for beginning a new transaction. Transactions can be created
|
1642
|
+
# explicitly with calls to Datastore.BeginTransaction or implicitly by setting
|
1643
|
+
# ReadOptions.new_transaction in read requests.
|
1644
|
+
class TransactionOptions
|
1645
|
+
include Google::Apis::Core::Hashable
|
1646
|
+
|
1647
|
+
# Options specific to read-only transactions.
|
1648
|
+
# Corresponds to the JSON property `readOnly`
|
1649
|
+
# @return [Google::Apis::DatastoreV1beta3::ReadOnly]
|
1650
|
+
attr_accessor :read_only
|
1651
|
+
|
1652
|
+
# Options specific to read / write transactions.
|
1653
|
+
# Corresponds to the JSON property `readWrite`
|
1654
|
+
# @return [Google::Apis::DatastoreV1beta3::ReadWrite]
|
1655
|
+
attr_accessor :read_write
|
1656
|
+
|
1657
|
+
def initialize(**args)
|
1658
|
+
update!(**args)
|
1659
|
+
end
|
1660
|
+
|
1661
|
+
# Update properties of this object
|
1662
|
+
def update!(**args)
|
1663
|
+
@read_only = args[:read_only] if args.key?(:read_only)
|
1664
|
+
@read_write = args[:read_write] if args.key?(:read_write)
|
1665
|
+
end
|
1666
|
+
end
|
1667
|
+
|
1668
|
+
# A message that can hold any of the supported value types and associated
|
1669
|
+
# metadata.
|
1670
|
+
class Value
|
1671
|
+
include Google::Apis::Core::Hashable
|
1672
|
+
|
1673
|
+
# An array value.
|
1674
|
+
# Corresponds to the JSON property `arrayValue`
|
1675
|
+
# @return [Google::Apis::DatastoreV1beta3::ArrayValue]
|
1676
|
+
attr_accessor :array_value
|
1677
|
+
|
1678
|
+
# A blob value. May have at most 1,000,000 bytes. When `exclude_from_indexes` is
|
1679
|
+
# false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.
|
1680
|
+
# Corresponds to the JSON property `blobValue`
|
1681
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1682
|
+
# @return [String]
|
1683
|
+
attr_accessor :blob_value
|
1684
|
+
|
1685
|
+
# A boolean value.
|
1686
|
+
# Corresponds to the JSON property `booleanValue`
|
1687
|
+
# @return [Boolean]
|
1688
|
+
attr_accessor :boolean_value
|
1689
|
+
alias_method :boolean_value?, :boolean_value
|
1690
|
+
|
1691
|
+
# A double value.
|
1692
|
+
# Corresponds to the JSON property `doubleValue`
|
1693
|
+
# @return [Float]
|
1694
|
+
attr_accessor :double_value
|
1695
|
+
|
1696
|
+
# A Datastore data object. An entity is limited to 1 megabyte when stored. That
|
1697
|
+
# _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
|
1698
|
+
# message.
|
1699
|
+
# Corresponds to the JSON property `entityValue`
|
1700
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
1701
|
+
attr_accessor :entity_value
|
1702
|
+
|
1703
|
+
# If the value should be excluded from all indexes including those defined
|
1704
|
+
# explicitly.
|
1705
|
+
# Corresponds to the JSON property `excludeFromIndexes`
|
1706
|
+
# @return [Boolean]
|
1707
|
+
attr_accessor :exclude_from_indexes
|
1708
|
+
alias_method :exclude_from_indexes?, :exclude_from_indexes
|
1709
|
+
|
1710
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
1711
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
1712
|
+
# specified otherwise, this must conform to the WGS84 standard. Values must be
|
1713
|
+
# within normalized ranges.
|
1714
|
+
# Corresponds to the JSON property `geoPointValue`
|
1715
|
+
# @return [Google::Apis::DatastoreV1beta3::LatLng]
|
1716
|
+
attr_accessor :geo_point_value
|
1717
|
+
|
1718
|
+
# An integer value.
|
1719
|
+
# Corresponds to the JSON property `integerValue`
|
1720
|
+
# @return [Fixnum]
|
1721
|
+
attr_accessor :integer_value
|
1722
|
+
|
1723
|
+
# A unique identifier for an entity. If a key's partition ID or any of its path
|
1724
|
+
# kinds or names are reserved/read-only, the key is reserved/read-only. A
|
1725
|
+
# reserved/read-only key is forbidden in certain documented contexts.
|
1726
|
+
# Corresponds to the JSON property `keyValue`
|
1727
|
+
# @return [Google::Apis::DatastoreV1beta3::Key]
|
1728
|
+
attr_accessor :key_value
|
1729
|
+
|
1730
|
+
# The `meaning` field should only be populated for backwards compatibility.
|
1731
|
+
# Corresponds to the JSON property `meaning`
|
1732
|
+
# @return [Fixnum]
|
1733
|
+
attr_accessor :meaning
|
1734
|
+
|
1735
|
+
# A null value.
|
1736
|
+
# Corresponds to the JSON property `nullValue`
|
1737
|
+
# @return [String]
|
1738
|
+
attr_accessor :null_value
|
1739
|
+
|
1740
|
+
# A UTF-8 encoded string value. When `exclude_from_indexes` is false (it is
|
1741
|
+
# indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,
|
1742
|
+
# 000 bytes.
|
1743
|
+
# Corresponds to the JSON property `stringValue`
|
1744
|
+
# @return [String]
|
1745
|
+
attr_accessor :string_value
|
1746
|
+
|
1747
|
+
# A timestamp value. When stored in the Datastore, precise only to microseconds;
|
1748
|
+
# any additional precision is rounded down.
|
1749
|
+
# Corresponds to the JSON property `timestampValue`
|
1750
|
+
# @return [String]
|
1751
|
+
attr_accessor :timestamp_value
|
1752
|
+
|
1753
|
+
def initialize(**args)
|
1754
|
+
update!(**args)
|
1755
|
+
end
|
1756
|
+
|
1757
|
+
# Update properties of this object
|
1758
|
+
def update!(**args)
|
1759
|
+
@array_value = args[:array_value] if args.key?(:array_value)
|
1760
|
+
@blob_value = args[:blob_value] if args.key?(:blob_value)
|
1761
|
+
@boolean_value = args[:boolean_value] if args.key?(:boolean_value)
|
1762
|
+
@double_value = args[:double_value] if args.key?(:double_value)
|
1763
|
+
@entity_value = args[:entity_value] if args.key?(:entity_value)
|
1764
|
+
@exclude_from_indexes = args[:exclude_from_indexes] if args.key?(:exclude_from_indexes)
|
1765
|
+
@geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value)
|
1766
|
+
@integer_value = args[:integer_value] if args.key?(:integer_value)
|
1767
|
+
@key_value = args[:key_value] if args.key?(:key_value)
|
1768
|
+
@meaning = args[:meaning] if args.key?(:meaning)
|
1769
|
+
@null_value = args[:null_value] if args.key?(:null_value)
|
1770
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
1771
|
+
@timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
|
1772
|
+
end
|
1773
|
+
end
|
1774
|
+
end
|
1775
|
+
end
|
1776
|
+
end
|