google-apis-datastore_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 703616933f7cf133201c35906787c7ae2e5713734b6696f9562af5114339ded9
4
+ data.tar.gz: c2f4064f8dafc01972131ca9dc5b63a6cbb4bd221e0128029c8effb2e7399fb8
5
+ SHA512:
6
+ metadata.gz: 81f0af9f13ac629cf7deedfce908c641d4d834fb3c63b9edae0a86ee805fb84a21929e835b8a0ea7e3acb6470ad46953c5bb7cce1cbcd413736113a2ecff39e8
7
+ data.tar.gz: 59d904aa7b774ab5795ae536bb02bdf0f5d8faad1367f5506a9d217f95379fa47b50f8b33ce3ac2226717640dfb75a90f2a877f4b1a9d4270bef986b5694ddb6
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-datastore_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/datastore_v1/*.rb
9
+ lib/google/apis/datastore_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-datastore_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201017
7
+
@@ -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.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Cloud Datastore API
2
+
3
+ This is a simple client library for version V1 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_v1', '~> 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_v1
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_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::DatastoreV1::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::DatastoreV1::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_v1`, 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_v1"
@@ -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_v1/service.rb'
16
+ require 'google/apis/datastore_v1/classes.rb'
17
+ require 'google/apis/datastore_v1/representations.rb'
18
+ require 'google/apis/datastore_v1/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 DatastoreV1
29
+ # Version of the Cloud Datastore API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V1'
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,2115 @@
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 DatastoreV1
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::DatastoreV1::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::DatastoreV1::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::DatastoreV1::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::DatastoreV1::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::DatastoreV1::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::DatastoreV1::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::DatastoreV1::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 generic empty message that you can re-use to avoid defining duplicated empty
217
+ # messages in your APIs. A typical example is to use it as the request or the
218
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
219
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
220
+ # `Empty` is empty JSON object ````.
221
+ class Empty
222
+ include Google::Apis::Core::Hashable
223
+
224
+ def initialize(**args)
225
+ update!(**args)
226
+ end
227
+
228
+ # Update properties of this object
229
+ def update!(**args)
230
+ end
231
+ end
232
+
233
+ # A Datastore data object. An entity is limited to 1 megabyte when stored. That
234
+ # _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
235
+ # message.
236
+ class Entity
237
+ include Google::Apis::Core::Hashable
238
+
239
+ # A unique identifier for an entity. If a key's partition ID or any of its path
240
+ # kinds or names are reserved/read-only, the key is reserved/read-only. A
241
+ # reserved/read-only key is forbidden in certain documented contexts.
242
+ # Corresponds to the JSON property `key`
243
+ # @return [Google::Apis::DatastoreV1::Key]
244
+ attr_accessor :key
245
+
246
+ # The entity's properties. The map's keys are property names. A property name
247
+ # matching regex `__.*__` is reserved. A reserved property name is forbidden in
248
+ # certain documented contexts. The name must not contain more than 500
249
+ # characters. The name cannot be `""`.
250
+ # Corresponds to the JSON property `properties`
251
+ # @return [Hash<String,Google::Apis::DatastoreV1::Value>]
252
+ attr_accessor :properties
253
+
254
+ def initialize(**args)
255
+ update!(**args)
256
+ end
257
+
258
+ # Update properties of this object
259
+ def update!(**args)
260
+ @key = args[:key] if args.key?(:key)
261
+ @properties = args[:properties] if args.key?(:properties)
262
+ end
263
+ end
264
+
265
+ # The result of fetching an entity from Datastore.
266
+ class EntityResult
267
+ include Google::Apis::Core::Hashable
268
+
269
+ # A cursor that points to the position after the result entity. Set only when
270
+ # the `EntityResult` is part of a `QueryResultBatch` message.
271
+ # Corresponds to the JSON property `cursor`
272
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
273
+ # @return [String]
274
+ attr_accessor :cursor
275
+
276
+ # A Datastore data object. An entity is limited to 1 megabyte when stored. That
277
+ # _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
278
+ # message.
279
+ # Corresponds to the JSON property `entity`
280
+ # @return [Google::Apis::DatastoreV1::Entity]
281
+ attr_accessor :entity
282
+
283
+ # The version of the entity, a strictly positive number that monotonically
284
+ # increases with changes to the entity. This field is set for `FULL` entity
285
+ # results. For missing entities in `LookupResponse`, this is the version of the
286
+ # snapshot that was used to look up the entity, and it is always set except for
287
+ # eventually consistent reads.
288
+ # Corresponds to the JSON property `version`
289
+ # @return [Fixnum]
290
+ attr_accessor :version
291
+
292
+ def initialize(**args)
293
+ update!(**args)
294
+ end
295
+
296
+ # Update properties of this object
297
+ def update!(**args)
298
+ @cursor = args[:cursor] if args.key?(:cursor)
299
+ @entity = args[:entity] if args.key?(:entity)
300
+ @version = args[:version] if args.key?(:version)
301
+ end
302
+ end
303
+
304
+ # A holder for any type of filter.
305
+ class Filter
306
+ include Google::Apis::Core::Hashable
307
+
308
+ # A filter that merges multiple other filters using the given operator.
309
+ # Corresponds to the JSON property `compositeFilter`
310
+ # @return [Google::Apis::DatastoreV1::CompositeFilter]
311
+ attr_accessor :composite_filter
312
+
313
+ # A filter on a specific property.
314
+ # Corresponds to the JSON property `propertyFilter`
315
+ # @return [Google::Apis::DatastoreV1::PropertyFilter]
316
+ attr_accessor :property_filter
317
+
318
+ def initialize(**args)
319
+ update!(**args)
320
+ end
321
+
322
+ # Update properties of this object
323
+ def update!(**args)
324
+ @composite_filter = args[:composite_filter] if args.key?(:composite_filter)
325
+ @property_filter = args[:property_filter] if args.key?(:property_filter)
326
+ end
327
+ end
328
+
329
+ # Metadata common to all Datastore Admin operations.
330
+ class GoogleDatastoreAdminV1CommonMetadata
331
+ include Google::Apis::Core::Hashable
332
+
333
+ # The time the operation ended, either successfully or otherwise.
334
+ # Corresponds to the JSON property `endTime`
335
+ # @return [String]
336
+ attr_accessor :end_time
337
+
338
+ # The client-assigned labels which were provided when the operation was created.
339
+ # May also include additional labels.
340
+ # Corresponds to the JSON property `labels`
341
+ # @return [Hash<String,String>]
342
+ attr_accessor :labels
343
+
344
+ # The type of the operation. Can be used as a filter in ListOperationsRequest.
345
+ # Corresponds to the JSON property `operationType`
346
+ # @return [String]
347
+ attr_accessor :operation_type
348
+
349
+ # The time that work began on the operation.
350
+ # Corresponds to the JSON property `startTime`
351
+ # @return [String]
352
+ attr_accessor :start_time
353
+
354
+ # The current state of the Operation.
355
+ # Corresponds to the JSON property `state`
356
+ # @return [String]
357
+ attr_accessor :state
358
+
359
+ def initialize(**args)
360
+ update!(**args)
361
+ end
362
+
363
+ # Update properties of this object
364
+ def update!(**args)
365
+ @end_time = args[:end_time] if args.key?(:end_time)
366
+ @labels = args[:labels] if args.key?(:labels)
367
+ @operation_type = args[:operation_type] if args.key?(:operation_type)
368
+ @start_time = args[:start_time] if args.key?(:start_time)
369
+ @state = args[:state] if args.key?(:state)
370
+ end
371
+ end
372
+
373
+ # Identifies a subset of entities in a project. This is specified as
374
+ # combinations of kinds and namespaces (either or both of which may be all, as
375
+ # described in the following examples). Example usage: Entire project: kinds=[],
376
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
377
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
378
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
379
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
380
+ # namespace: kinds=[], namespace_ids=['Baz']
381
+ class GoogleDatastoreAdminV1EntityFilter
382
+ include Google::Apis::Core::Hashable
383
+
384
+ # If empty, then this represents all kinds.
385
+ # Corresponds to the JSON property `kinds`
386
+ # @return [Array<String>]
387
+ attr_accessor :kinds
388
+
389
+ # An empty list represents all namespaces. This is the preferred usage for
390
+ # projects that don't use namespaces. An empty string element represents the
391
+ # default namespace. This should be used if the project has data in non-default
392
+ # namespaces, but doesn't want to include them. Each namespace in this list must
393
+ # be unique.
394
+ # Corresponds to the JSON property `namespaceIds`
395
+ # @return [Array<String>]
396
+ attr_accessor :namespace_ids
397
+
398
+ def initialize(**args)
399
+ update!(**args)
400
+ end
401
+
402
+ # Update properties of this object
403
+ def update!(**args)
404
+ @kinds = args[:kinds] if args.key?(:kinds)
405
+ @namespace_ids = args[:namespace_ids] if args.key?(:namespace_ids)
406
+ end
407
+ end
408
+
409
+ # Metadata for ExportEntities operations.
410
+ class GoogleDatastoreAdminV1ExportEntitiesMetadata
411
+ include Google::Apis::Core::Hashable
412
+
413
+ # Metadata common to all Datastore Admin operations.
414
+ # Corresponds to the JSON property `common`
415
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1CommonMetadata]
416
+ attr_accessor :common
417
+
418
+ # Identifies a subset of entities in a project. This is specified as
419
+ # combinations of kinds and namespaces (either or both of which may be all, as
420
+ # described in the following examples). Example usage: Entire project: kinds=[],
421
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
422
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
423
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
424
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
425
+ # namespace: kinds=[], namespace_ids=['Baz']
426
+ # Corresponds to the JSON property `entityFilter`
427
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1EntityFilter]
428
+ attr_accessor :entity_filter
429
+
430
+ # Location for the export metadata and data files. This will be the same value
431
+ # as the google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix field.
432
+ # The final output location is provided in google.datastore.admin.v1.
433
+ # ExportEntitiesResponse.output_url.
434
+ # Corresponds to the JSON property `outputUrlPrefix`
435
+ # @return [String]
436
+ attr_accessor :output_url_prefix
437
+
438
+ # Measures the progress of a particular metric.
439
+ # Corresponds to the JSON property `progressBytes`
440
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Progress]
441
+ attr_accessor :progress_bytes
442
+
443
+ # Measures the progress of a particular metric.
444
+ # Corresponds to the JSON property `progressEntities`
445
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Progress]
446
+ attr_accessor :progress_entities
447
+
448
+ def initialize(**args)
449
+ update!(**args)
450
+ end
451
+
452
+ # Update properties of this object
453
+ def update!(**args)
454
+ @common = args[:common] if args.key?(:common)
455
+ @entity_filter = args[:entity_filter] if args.key?(:entity_filter)
456
+ @output_url_prefix = args[:output_url_prefix] if args.key?(:output_url_prefix)
457
+ @progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
458
+ @progress_entities = args[:progress_entities] if args.key?(:progress_entities)
459
+ end
460
+ end
461
+
462
+ # The request for google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
463
+ class GoogleDatastoreAdminV1ExportEntitiesRequest
464
+ include Google::Apis::Core::Hashable
465
+
466
+ # Identifies a subset of entities in a project. This is specified as
467
+ # combinations of kinds and namespaces (either or both of which may be all, as
468
+ # described in the following examples). Example usage: Entire project: kinds=[],
469
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
470
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
471
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
472
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
473
+ # namespace: kinds=[], namespace_ids=['Baz']
474
+ # Corresponds to the JSON property `entityFilter`
475
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1EntityFilter]
476
+ attr_accessor :entity_filter
477
+
478
+ # Client-assigned labels.
479
+ # Corresponds to the JSON property `labels`
480
+ # @return [Hash<String,String>]
481
+ attr_accessor :labels
482
+
483
+ # Required. Location for the export metadata and data files. The full resource
484
+ # URL of the external storage location. Currently, only Google Cloud Storage is
485
+ # supported. So output_url_prefix should be of the form: `gs://BUCKET_NAME[/
486
+ # NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the Cloud Storage bucket
487
+ # and `NAMESPACE_PATH` is an optional Cloud Storage namespace path (this is not
488
+ # a Cloud Datastore namespace). For more information about Cloud Storage
489
+ # namespace paths, see [Object name considerations](https://cloud.google.com/
490
+ # storage/docs/naming#object-considerations). The resulting files will be nested
491
+ # deeper than the specified URL prefix. The final output URL will be provided in
492
+ # the google.datastore.admin.v1.ExportEntitiesResponse.output_url field. That
493
+ # value should be used for subsequent ImportEntities operations. By nesting the
494
+ # data files deeper, the same Cloud Storage bucket can be used in multiple
495
+ # ExportEntities operations without conflict.
496
+ # Corresponds to the JSON property `outputUrlPrefix`
497
+ # @return [String]
498
+ attr_accessor :output_url_prefix
499
+
500
+ def initialize(**args)
501
+ update!(**args)
502
+ end
503
+
504
+ # Update properties of this object
505
+ def update!(**args)
506
+ @entity_filter = args[:entity_filter] if args.key?(:entity_filter)
507
+ @labels = args[:labels] if args.key?(:labels)
508
+ @output_url_prefix = args[:output_url_prefix] if args.key?(:output_url_prefix)
509
+ end
510
+ end
511
+
512
+ # The response for google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
513
+ class GoogleDatastoreAdminV1ExportEntitiesResponse
514
+ include Google::Apis::Core::Hashable
515
+
516
+ # Location of the output metadata file. This can be used to begin an import into
517
+ # Cloud Datastore (this project or another project). See google.datastore.admin.
518
+ # v1.ImportEntitiesRequest.input_url. Only present if the operation completed
519
+ # successfully.
520
+ # Corresponds to the JSON property `outputUrl`
521
+ # @return [String]
522
+ attr_accessor :output_url
523
+
524
+ def initialize(**args)
525
+ update!(**args)
526
+ end
527
+
528
+ # Update properties of this object
529
+ def update!(**args)
530
+ @output_url = args[:output_url] if args.key?(:output_url)
531
+ end
532
+ end
533
+
534
+ # Metadata for ImportEntities operations.
535
+ class GoogleDatastoreAdminV1ImportEntitiesMetadata
536
+ include Google::Apis::Core::Hashable
537
+
538
+ # Metadata common to all Datastore Admin operations.
539
+ # Corresponds to the JSON property `common`
540
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1CommonMetadata]
541
+ attr_accessor :common
542
+
543
+ # Identifies a subset of entities in a project. This is specified as
544
+ # combinations of kinds and namespaces (either or both of which may be all, as
545
+ # described in the following examples). Example usage: Entire project: kinds=[],
546
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
547
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
548
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
549
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
550
+ # namespace: kinds=[], namespace_ids=['Baz']
551
+ # Corresponds to the JSON property `entityFilter`
552
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1EntityFilter]
553
+ attr_accessor :entity_filter
554
+
555
+ # The location of the import metadata file. This will be the same value as the
556
+ # google.datastore.admin.v1.ExportEntitiesResponse.output_url field.
557
+ # Corresponds to the JSON property `inputUrl`
558
+ # @return [String]
559
+ attr_accessor :input_url
560
+
561
+ # Measures the progress of a particular metric.
562
+ # Corresponds to the JSON property `progressBytes`
563
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Progress]
564
+ attr_accessor :progress_bytes
565
+
566
+ # Measures the progress of a particular metric.
567
+ # Corresponds to the JSON property `progressEntities`
568
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Progress]
569
+ attr_accessor :progress_entities
570
+
571
+ def initialize(**args)
572
+ update!(**args)
573
+ end
574
+
575
+ # Update properties of this object
576
+ def update!(**args)
577
+ @common = args[:common] if args.key?(:common)
578
+ @entity_filter = args[:entity_filter] if args.key?(:entity_filter)
579
+ @input_url = args[:input_url] if args.key?(:input_url)
580
+ @progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
581
+ @progress_entities = args[:progress_entities] if args.key?(:progress_entities)
582
+ end
583
+ end
584
+
585
+ # The request for google.datastore.admin.v1.DatastoreAdmin.ImportEntities.
586
+ class GoogleDatastoreAdminV1ImportEntitiesRequest
587
+ include Google::Apis::Core::Hashable
588
+
589
+ # Identifies a subset of entities in a project. This is specified as
590
+ # combinations of kinds and namespaces (either or both of which may be all, as
591
+ # described in the following examples). Example usage: Entire project: kinds=[],
592
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
593
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
594
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
595
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
596
+ # namespace: kinds=[], namespace_ids=['Baz']
597
+ # Corresponds to the JSON property `entityFilter`
598
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1EntityFilter]
599
+ attr_accessor :entity_filter
600
+
601
+ # Required. The full resource URL of the external storage location. Currently,
602
+ # only Google Cloud Storage is supported. So input_url should be of the form: `
603
+ # gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where `
604
+ # BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is an
605
+ # optional Cloud Storage namespace path (this is not a Cloud Datastore namespace)
606
+ # , and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written by the
607
+ # ExportEntities operation. For more information about Cloud Storage namespace
608
+ # paths, see [Object name considerations](https://cloud.google.com/storage/docs/
609
+ # naming#object-considerations). For more information, see google.datastore.
610
+ # admin.v1.ExportEntitiesResponse.output_url.
611
+ # Corresponds to the JSON property `inputUrl`
612
+ # @return [String]
613
+ attr_accessor :input_url
614
+
615
+ # Client-assigned labels.
616
+ # Corresponds to the JSON property `labels`
617
+ # @return [Hash<String,String>]
618
+ attr_accessor :labels
619
+
620
+ def initialize(**args)
621
+ update!(**args)
622
+ end
623
+
624
+ # Update properties of this object
625
+ def update!(**args)
626
+ @entity_filter = args[:entity_filter] if args.key?(:entity_filter)
627
+ @input_url = args[:input_url] if args.key?(:input_url)
628
+ @labels = args[:labels] if args.key?(:labels)
629
+ end
630
+ end
631
+
632
+ # Datastore composite index definition.
633
+ class GoogleDatastoreAdminV1Index
634
+ include Google::Apis::Core::Hashable
635
+
636
+ # Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
637
+ # Corresponds to the JSON property `ancestor`
638
+ # @return [String]
639
+ attr_accessor :ancestor
640
+
641
+ # Output only. The resource ID of the index.
642
+ # Corresponds to the JSON property `indexId`
643
+ # @return [String]
644
+ attr_accessor :index_id
645
+
646
+ # Required. The entity kind to which this index applies.
647
+ # Corresponds to the JSON property `kind`
648
+ # @return [String]
649
+ attr_accessor :kind
650
+
651
+ # Output only. Project ID.
652
+ # Corresponds to the JSON property `projectId`
653
+ # @return [String]
654
+ attr_accessor :project_id
655
+
656
+ # Required. An ordered sequence of property names and their index attributes.
657
+ # Corresponds to the JSON property `properties`
658
+ # @return [Array<Google::Apis::DatastoreV1::GoogleDatastoreAdminV1IndexedProperty>]
659
+ attr_accessor :properties
660
+
661
+ # Output only. The state of the index.
662
+ # Corresponds to the JSON property `state`
663
+ # @return [String]
664
+ attr_accessor :state
665
+
666
+ def initialize(**args)
667
+ update!(**args)
668
+ end
669
+
670
+ # Update properties of this object
671
+ def update!(**args)
672
+ @ancestor = args[:ancestor] if args.key?(:ancestor)
673
+ @index_id = args[:index_id] if args.key?(:index_id)
674
+ @kind = args[:kind] if args.key?(:kind)
675
+ @project_id = args[:project_id] if args.key?(:project_id)
676
+ @properties = args[:properties] if args.key?(:properties)
677
+ @state = args[:state] if args.key?(:state)
678
+ end
679
+ end
680
+
681
+ # Metadata for Index operations.
682
+ class GoogleDatastoreAdminV1IndexOperationMetadata
683
+ include Google::Apis::Core::Hashable
684
+
685
+ # Metadata common to all Datastore Admin operations.
686
+ # Corresponds to the JSON property `common`
687
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1CommonMetadata]
688
+ attr_accessor :common
689
+
690
+ # The index resource ID that this operation is acting on.
691
+ # Corresponds to the JSON property `indexId`
692
+ # @return [String]
693
+ attr_accessor :index_id
694
+
695
+ # Measures the progress of a particular metric.
696
+ # Corresponds to the JSON property `progressEntities`
697
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Progress]
698
+ attr_accessor :progress_entities
699
+
700
+ def initialize(**args)
701
+ update!(**args)
702
+ end
703
+
704
+ # Update properties of this object
705
+ def update!(**args)
706
+ @common = args[:common] if args.key?(:common)
707
+ @index_id = args[:index_id] if args.key?(:index_id)
708
+ @progress_entities = args[:progress_entities] if args.key?(:progress_entities)
709
+ end
710
+ end
711
+
712
+ # A property of an index.
713
+ class GoogleDatastoreAdminV1IndexedProperty
714
+ include Google::Apis::Core::Hashable
715
+
716
+ # Required. The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
717
+ # Corresponds to the JSON property `direction`
718
+ # @return [String]
719
+ attr_accessor :direction
720
+
721
+ # Required. The property name to index.
722
+ # Corresponds to the JSON property `name`
723
+ # @return [String]
724
+ attr_accessor :name
725
+
726
+ def initialize(**args)
727
+ update!(**args)
728
+ end
729
+
730
+ # Update properties of this object
731
+ def update!(**args)
732
+ @direction = args[:direction] if args.key?(:direction)
733
+ @name = args[:name] if args.key?(:name)
734
+ end
735
+ end
736
+
737
+ # The response for google.datastore.admin.v1.DatastoreAdmin.ListIndexes.
738
+ class GoogleDatastoreAdminV1ListIndexesResponse
739
+ include Google::Apis::Core::Hashable
740
+
741
+ # The indexes.
742
+ # Corresponds to the JSON property `indexes`
743
+ # @return [Array<Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Index>]
744
+ attr_accessor :indexes
745
+
746
+ # The standard List next-page token.
747
+ # Corresponds to the JSON property `nextPageToken`
748
+ # @return [String]
749
+ attr_accessor :next_page_token
750
+
751
+ def initialize(**args)
752
+ update!(**args)
753
+ end
754
+
755
+ # Update properties of this object
756
+ def update!(**args)
757
+ @indexes = args[:indexes] if args.key?(:indexes)
758
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
759
+ end
760
+ end
761
+
762
+ # Measures the progress of a particular metric.
763
+ class GoogleDatastoreAdminV1Progress
764
+ include Google::Apis::Core::Hashable
765
+
766
+ # The amount of work that has been completed. Note that this may be greater than
767
+ # work_estimated.
768
+ # Corresponds to the JSON property `workCompleted`
769
+ # @return [Fixnum]
770
+ attr_accessor :work_completed
771
+
772
+ # An estimate of how much work needs to be performed. May be zero if the work
773
+ # estimate is unavailable.
774
+ # Corresponds to the JSON property `workEstimated`
775
+ # @return [Fixnum]
776
+ attr_accessor :work_estimated
777
+
778
+ def initialize(**args)
779
+ update!(**args)
780
+ end
781
+
782
+ # Update properties of this object
783
+ def update!(**args)
784
+ @work_completed = args[:work_completed] if args.key?(:work_completed)
785
+ @work_estimated = args[:work_estimated] if args.key?(:work_estimated)
786
+ end
787
+ end
788
+
789
+ # Metadata common to all Datastore Admin operations.
790
+ class GoogleDatastoreAdminV1beta1CommonMetadata
791
+ include Google::Apis::Core::Hashable
792
+
793
+ # The time the operation ended, either successfully or otherwise.
794
+ # Corresponds to the JSON property `endTime`
795
+ # @return [String]
796
+ attr_accessor :end_time
797
+
798
+ # The client-assigned labels which were provided when the operation was created.
799
+ # May also include additional labels.
800
+ # Corresponds to the JSON property `labels`
801
+ # @return [Hash<String,String>]
802
+ attr_accessor :labels
803
+
804
+ # The type of the operation. Can be used as a filter in ListOperationsRequest.
805
+ # Corresponds to the JSON property `operationType`
806
+ # @return [String]
807
+ attr_accessor :operation_type
808
+
809
+ # The time that work began on the operation.
810
+ # Corresponds to the JSON property `startTime`
811
+ # @return [String]
812
+ attr_accessor :start_time
813
+
814
+ # The current state of the Operation.
815
+ # Corresponds to the JSON property `state`
816
+ # @return [String]
817
+ attr_accessor :state
818
+
819
+ def initialize(**args)
820
+ update!(**args)
821
+ end
822
+
823
+ # Update properties of this object
824
+ def update!(**args)
825
+ @end_time = args[:end_time] if args.key?(:end_time)
826
+ @labels = args[:labels] if args.key?(:labels)
827
+ @operation_type = args[:operation_type] if args.key?(:operation_type)
828
+ @start_time = args[:start_time] if args.key?(:start_time)
829
+ @state = args[:state] if args.key?(:state)
830
+ end
831
+ end
832
+
833
+ # Identifies a subset of entities in a project. This is specified as
834
+ # combinations of kinds and namespaces (either or both of which may be all, as
835
+ # described in the following examples). Example usage: Entire project: kinds=[],
836
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
837
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
838
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
839
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
840
+ # namespace: kinds=[], namespace_ids=['Baz']
841
+ class GoogleDatastoreAdminV1beta1EntityFilter
842
+ include Google::Apis::Core::Hashable
843
+
844
+ # If empty, then this represents all kinds.
845
+ # Corresponds to the JSON property `kinds`
846
+ # @return [Array<String>]
847
+ attr_accessor :kinds
848
+
849
+ # An empty list represents all namespaces. This is the preferred usage for
850
+ # projects that don't use namespaces. An empty string element represents the
851
+ # default namespace. This should be used if the project has data in non-default
852
+ # namespaces, but doesn't want to include them. Each namespace in this list must
853
+ # be unique.
854
+ # Corresponds to the JSON property `namespaceIds`
855
+ # @return [Array<String>]
856
+ attr_accessor :namespace_ids
857
+
858
+ def initialize(**args)
859
+ update!(**args)
860
+ end
861
+
862
+ # Update properties of this object
863
+ def update!(**args)
864
+ @kinds = args[:kinds] if args.key?(:kinds)
865
+ @namespace_ids = args[:namespace_ids] if args.key?(:namespace_ids)
866
+ end
867
+ end
868
+
869
+ # Metadata for ExportEntities operations.
870
+ class GoogleDatastoreAdminV1beta1ExportEntitiesMetadata
871
+ include Google::Apis::Core::Hashable
872
+
873
+ # Metadata common to all Datastore Admin operations.
874
+ # Corresponds to the JSON property `common`
875
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1CommonMetadata]
876
+ attr_accessor :common
877
+
878
+ # Identifies a subset of entities in a project. This is specified as
879
+ # combinations of kinds and namespaces (either or both of which may be all, as
880
+ # described in the following examples). Example usage: Entire project: kinds=[],
881
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
882
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
883
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
884
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
885
+ # namespace: kinds=[], namespace_ids=['Baz']
886
+ # Corresponds to the JSON property `entityFilter`
887
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1EntityFilter]
888
+ attr_accessor :entity_filter
889
+
890
+ # Location for the export metadata and data files. This will be the same value
891
+ # as the google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix
892
+ # field. The final output location is provided in google.datastore.admin.v1beta1.
893
+ # ExportEntitiesResponse.output_url.
894
+ # Corresponds to the JSON property `outputUrlPrefix`
895
+ # @return [String]
896
+ attr_accessor :output_url_prefix
897
+
898
+ # Measures the progress of a particular metric.
899
+ # Corresponds to the JSON property `progressBytes`
900
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1Progress]
901
+ attr_accessor :progress_bytes
902
+
903
+ # Measures the progress of a particular metric.
904
+ # Corresponds to the JSON property `progressEntities`
905
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1Progress]
906
+ attr_accessor :progress_entities
907
+
908
+ def initialize(**args)
909
+ update!(**args)
910
+ end
911
+
912
+ # Update properties of this object
913
+ def update!(**args)
914
+ @common = args[:common] if args.key?(:common)
915
+ @entity_filter = args[:entity_filter] if args.key?(:entity_filter)
916
+ @output_url_prefix = args[:output_url_prefix] if args.key?(:output_url_prefix)
917
+ @progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
918
+ @progress_entities = args[:progress_entities] if args.key?(:progress_entities)
919
+ end
920
+ end
921
+
922
+ # The response for google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.
923
+ class GoogleDatastoreAdminV1beta1ExportEntitiesResponse
924
+ include Google::Apis::Core::Hashable
925
+
926
+ # Location of the output metadata file. This can be used to begin an import into
927
+ # Cloud Datastore (this project or another project). See google.datastore.admin.
928
+ # v1beta1.ImportEntitiesRequest.input_url. Only present if the operation
929
+ # completed successfully.
930
+ # Corresponds to the JSON property `outputUrl`
931
+ # @return [String]
932
+ attr_accessor :output_url
933
+
934
+ def initialize(**args)
935
+ update!(**args)
936
+ end
937
+
938
+ # Update properties of this object
939
+ def update!(**args)
940
+ @output_url = args[:output_url] if args.key?(:output_url)
941
+ end
942
+ end
943
+
944
+ # Metadata for ImportEntities operations.
945
+ class GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
946
+ include Google::Apis::Core::Hashable
947
+
948
+ # Metadata common to all Datastore Admin operations.
949
+ # Corresponds to the JSON property `common`
950
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1CommonMetadata]
951
+ attr_accessor :common
952
+
953
+ # Identifies a subset of entities in a project. This is specified as
954
+ # combinations of kinds and namespaces (either or both of which may be all, as
955
+ # described in the following examples). Example usage: Entire project: kinds=[],
956
+ # namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'],
957
+ # namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo',
958
+ # 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz
959
+ # namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz
960
+ # namespace: kinds=[], namespace_ids=['Baz']
961
+ # Corresponds to the JSON property `entityFilter`
962
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1EntityFilter]
963
+ attr_accessor :entity_filter
964
+
965
+ # The location of the import metadata file. This will be the same value as the
966
+ # google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url field.
967
+ # Corresponds to the JSON property `inputUrl`
968
+ # @return [String]
969
+ attr_accessor :input_url
970
+
971
+ # Measures the progress of a particular metric.
972
+ # Corresponds to the JSON property `progressBytes`
973
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1Progress]
974
+ attr_accessor :progress_bytes
975
+
976
+ # Measures the progress of a particular metric.
977
+ # Corresponds to the JSON property `progressEntities`
978
+ # @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1beta1Progress]
979
+ attr_accessor :progress_entities
980
+
981
+ def initialize(**args)
982
+ update!(**args)
983
+ end
984
+
985
+ # Update properties of this object
986
+ def update!(**args)
987
+ @common = args[:common] if args.key?(:common)
988
+ @entity_filter = args[:entity_filter] if args.key?(:entity_filter)
989
+ @input_url = args[:input_url] if args.key?(:input_url)
990
+ @progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
991
+ @progress_entities = args[:progress_entities] if args.key?(:progress_entities)
992
+ end
993
+ end
994
+
995
+ # Measures the progress of a particular metric.
996
+ class GoogleDatastoreAdminV1beta1Progress
997
+ include Google::Apis::Core::Hashable
998
+
999
+ # The amount of work that has been completed. Note that this may be greater than
1000
+ # work_estimated.
1001
+ # Corresponds to the JSON property `workCompleted`
1002
+ # @return [Fixnum]
1003
+ attr_accessor :work_completed
1004
+
1005
+ # An estimate of how much work needs to be performed. May be zero if the work
1006
+ # estimate is unavailable.
1007
+ # Corresponds to the JSON property `workEstimated`
1008
+ # @return [Fixnum]
1009
+ attr_accessor :work_estimated
1010
+
1011
+ def initialize(**args)
1012
+ update!(**args)
1013
+ end
1014
+
1015
+ # Update properties of this object
1016
+ def update!(**args)
1017
+ @work_completed = args[:work_completed] if args.key?(:work_completed)
1018
+ @work_estimated = args[:work_estimated] if args.key?(:work_estimated)
1019
+ end
1020
+ end
1021
+
1022
+ # The response message for Operations.ListOperations.
1023
+ class GoogleLongrunningListOperationsResponse
1024
+ include Google::Apis::Core::Hashable
1025
+
1026
+ # The standard List next-page token.
1027
+ # Corresponds to the JSON property `nextPageToken`
1028
+ # @return [String]
1029
+ attr_accessor :next_page_token
1030
+
1031
+ # A list of operations that matches the specified filter in the request.
1032
+ # Corresponds to the JSON property `operations`
1033
+ # @return [Array<Google::Apis::DatastoreV1::GoogleLongrunningOperation>]
1034
+ attr_accessor :operations
1035
+
1036
+ def initialize(**args)
1037
+ update!(**args)
1038
+ end
1039
+
1040
+ # Update properties of this object
1041
+ def update!(**args)
1042
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1043
+ @operations = args[:operations] if args.key?(:operations)
1044
+ end
1045
+ end
1046
+
1047
+ # This resource represents a long-running operation that is the result of a
1048
+ # network API call.
1049
+ class GoogleLongrunningOperation
1050
+ include Google::Apis::Core::Hashable
1051
+
1052
+ # If the value is `false`, it means the operation is still in progress. If `true`
1053
+ # , the operation is completed, and either `error` or `response` is available.
1054
+ # Corresponds to the JSON property `done`
1055
+ # @return [Boolean]
1056
+ attr_accessor :done
1057
+ alias_method :done?, :done
1058
+
1059
+ # The `Status` type defines a logical error model that is suitable for different
1060
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1061
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1062
+ # data: error code, error message, and error details. You can find out more
1063
+ # about this error model and how to work with it in the [API Design Guide](https:
1064
+ # //cloud.google.com/apis/design/errors).
1065
+ # Corresponds to the JSON property `error`
1066
+ # @return [Google::Apis::DatastoreV1::Status]
1067
+ attr_accessor :error
1068
+
1069
+ # Service-specific metadata associated with the operation. It typically contains
1070
+ # progress information and common metadata such as create time. Some services
1071
+ # might not provide such metadata. Any method that returns a long-running
1072
+ # operation should document the metadata type, if any.
1073
+ # Corresponds to the JSON property `metadata`
1074
+ # @return [Hash<String,Object>]
1075
+ attr_accessor :metadata
1076
+
1077
+ # The server-assigned name, which is only unique within the same service that
1078
+ # originally returns it. If you use the default HTTP mapping, the `name` should
1079
+ # be a resource name ending with `operations/`unique_id``.
1080
+ # Corresponds to the JSON property `name`
1081
+ # @return [String]
1082
+ attr_accessor :name
1083
+
1084
+ # The normal response of the operation in case of success. If the original
1085
+ # method returns no data on success, such as `Delete`, the response is `google.
1086
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
1087
+ # the response should be the resource. For other methods, the response should
1088
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
1089
+ # example, if the original method name is `TakeSnapshot()`, the inferred
1090
+ # response type is `TakeSnapshotResponse`.
1091
+ # Corresponds to the JSON property `response`
1092
+ # @return [Hash<String,Object>]
1093
+ attr_accessor :response
1094
+
1095
+ def initialize(**args)
1096
+ update!(**args)
1097
+ end
1098
+
1099
+ # Update properties of this object
1100
+ def update!(**args)
1101
+ @done = args[:done] if args.key?(:done)
1102
+ @error = args[:error] if args.key?(:error)
1103
+ @metadata = args[:metadata] if args.key?(:metadata)
1104
+ @name = args[:name] if args.key?(:name)
1105
+ @response = args[:response] if args.key?(:response)
1106
+ end
1107
+ end
1108
+
1109
+ # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
1110
+ class GqlQuery
1111
+ include Google::Apis::Core::Hashable
1112
+
1113
+ # When false, the query string must not contain any literals and instead must
1114
+ # bind all values. For example, `SELECT * FROM Kind WHERE a = 'string literal'`
1115
+ # is not allowed, while `SELECT * FROM Kind WHERE a = @value` is.
1116
+ # Corresponds to the JSON property `allowLiterals`
1117
+ # @return [Boolean]
1118
+ attr_accessor :allow_literals
1119
+ alias_method :allow_literals?, :allow_literals
1120
+
1121
+ # For each non-reserved named binding site in the query string, there must be a
1122
+ # named parameter with that name, but not necessarily the inverse. Key must
1123
+ # match regex `A-Za-z_$*`, must not match regex `__.*__`, and must not be `""`.
1124
+ # Corresponds to the JSON property `namedBindings`
1125
+ # @return [Hash<String,Google::Apis::DatastoreV1::GqlQueryParameter>]
1126
+ attr_accessor :named_bindings
1127
+
1128
+ # Numbered binding site @1 references the first numbered parameter, effectively
1129
+ # using 1-based indexing, rather than the usual 0. For each binding site
1130
+ # numbered i in `query_string`, there must be an i-th numbered parameter. The
1131
+ # inverse must also be true.
1132
+ # Corresponds to the JSON property `positionalBindings`
1133
+ # @return [Array<Google::Apis::DatastoreV1::GqlQueryParameter>]
1134
+ attr_accessor :positional_bindings
1135
+
1136
+ # A string of the format described [here](https://cloud.google.com/datastore/
1137
+ # docs/apis/gql/gql_reference).
1138
+ # Corresponds to the JSON property `queryString`
1139
+ # @return [String]
1140
+ attr_accessor :query_string
1141
+
1142
+ def initialize(**args)
1143
+ update!(**args)
1144
+ end
1145
+
1146
+ # Update properties of this object
1147
+ def update!(**args)
1148
+ @allow_literals = args[:allow_literals] if args.key?(:allow_literals)
1149
+ @named_bindings = args[:named_bindings] if args.key?(:named_bindings)
1150
+ @positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings)
1151
+ @query_string = args[:query_string] if args.key?(:query_string)
1152
+ end
1153
+ end
1154
+
1155
+ # A binding parameter for a GQL query.
1156
+ class GqlQueryParameter
1157
+ include Google::Apis::Core::Hashable
1158
+
1159
+ # A query cursor. Query cursors are returned in query result batches.
1160
+ # Corresponds to the JSON property `cursor`
1161
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1162
+ # @return [String]
1163
+ attr_accessor :cursor
1164
+
1165
+ # A message that can hold any of the supported value types and associated
1166
+ # metadata.
1167
+ # Corresponds to the JSON property `value`
1168
+ # @return [Google::Apis::DatastoreV1::Value]
1169
+ attr_accessor :value
1170
+
1171
+ def initialize(**args)
1172
+ update!(**args)
1173
+ end
1174
+
1175
+ # Update properties of this object
1176
+ def update!(**args)
1177
+ @cursor = args[:cursor] if args.key?(:cursor)
1178
+ @value = args[:value] if args.key?(:value)
1179
+ end
1180
+ end
1181
+
1182
+ # A unique identifier for an entity. If a key's partition ID or any of its path
1183
+ # kinds or names are reserved/read-only, the key is reserved/read-only. A
1184
+ # reserved/read-only key is forbidden in certain documented contexts.
1185
+ class Key
1186
+ include Google::Apis::Core::Hashable
1187
+
1188
+ # A partition ID identifies a grouping of entities. The grouping is always by
1189
+ # project and namespace, however the namespace ID may be empty. A partition ID
1190
+ # contains several dimensions: project ID and namespace ID. Partition dimensions:
1191
+ # - May be `""`. - Must be valid UTF-8 bytes. - Must have values that match
1192
+ # regex `[A-Za-z\d\.\-_]`1,100`` If the value of any dimension matches regex `__.
1193
+ # *__`, the partition is reserved/read-only. A reserved/read-only partition ID
1194
+ # is forbidden in certain documented contexts. Foreign partition IDs (in which
1195
+ # the project ID does not match the context project ID ) are discouraged. Reads
1196
+ # and writes of foreign partition IDs may fail if the project is not in an
1197
+ # active state.
1198
+ # Corresponds to the JSON property `partitionId`
1199
+ # @return [Google::Apis::DatastoreV1::PartitionId]
1200
+ attr_accessor :partition_id
1201
+
1202
+ # The entity path. An entity path consists of one or more elements composed of a
1203
+ # kind and a string or numerical identifier, which identify entities. The first
1204
+ # element identifies a _root entity_, the second element identifies a _child_ of
1205
+ # the root entity, the third element identifies a child of the second entity,
1206
+ # and so forth. The entities identified by all prefixes of the path are called
1207
+ # the element's _ancestors_. An entity path is always fully complete: *all* of
1208
+ # the entity's ancestors are required to be in the path along with the entity
1209
+ # identifier itself. The only exception is that in some documented cases, the
1210
+ # identifier in the last path element (for the entity) itself may be omitted.
1211
+ # For example, the last path element of the key of `Mutation.insert` may have no
1212
+ # identifier. A path can never be empty, and a path can have at most 100
1213
+ # elements.
1214
+ # Corresponds to the JSON property `path`
1215
+ # @return [Array<Google::Apis::DatastoreV1::PathElement>]
1216
+ attr_accessor :path
1217
+
1218
+ def initialize(**args)
1219
+ update!(**args)
1220
+ end
1221
+
1222
+ # Update properties of this object
1223
+ def update!(**args)
1224
+ @partition_id = args[:partition_id] if args.key?(:partition_id)
1225
+ @path = args[:path] if args.key?(:path)
1226
+ end
1227
+ end
1228
+
1229
+ # A representation of a kind.
1230
+ class KindExpression
1231
+ include Google::Apis::Core::Hashable
1232
+
1233
+ # The name of the kind.
1234
+ # Corresponds to the JSON property `name`
1235
+ # @return [String]
1236
+ attr_accessor :name
1237
+
1238
+ def initialize(**args)
1239
+ update!(**args)
1240
+ end
1241
+
1242
+ # Update properties of this object
1243
+ def update!(**args)
1244
+ @name = args[:name] if args.key?(:name)
1245
+ end
1246
+ end
1247
+
1248
+ # An object that represents a latitude/longitude pair. This is expressed as a
1249
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
1250
+ # specified otherwise, this must conform to the WGS84 standard. Values must be
1251
+ # within normalized ranges.
1252
+ class LatLng
1253
+ include Google::Apis::Core::Hashable
1254
+
1255
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1256
+ # Corresponds to the JSON property `latitude`
1257
+ # @return [Float]
1258
+ attr_accessor :latitude
1259
+
1260
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1261
+ # Corresponds to the JSON property `longitude`
1262
+ # @return [Float]
1263
+ attr_accessor :longitude
1264
+
1265
+ def initialize(**args)
1266
+ update!(**args)
1267
+ end
1268
+
1269
+ # Update properties of this object
1270
+ def update!(**args)
1271
+ @latitude = args[:latitude] if args.key?(:latitude)
1272
+ @longitude = args[:longitude] if args.key?(:longitude)
1273
+ end
1274
+ end
1275
+
1276
+ # The request for Datastore.Lookup.
1277
+ class LookupRequest
1278
+ include Google::Apis::Core::Hashable
1279
+
1280
+ # Required. Keys of entities to look up.
1281
+ # Corresponds to the JSON property `keys`
1282
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
1283
+ attr_accessor :keys
1284
+
1285
+ # The options shared by read requests.
1286
+ # Corresponds to the JSON property `readOptions`
1287
+ # @return [Google::Apis::DatastoreV1::ReadOptions]
1288
+ attr_accessor :read_options
1289
+
1290
+ def initialize(**args)
1291
+ update!(**args)
1292
+ end
1293
+
1294
+ # Update properties of this object
1295
+ def update!(**args)
1296
+ @keys = args[:keys] if args.key?(:keys)
1297
+ @read_options = args[:read_options] if args.key?(:read_options)
1298
+ end
1299
+ end
1300
+
1301
+ # The response for Datastore.Lookup.
1302
+ class LookupResponse
1303
+ include Google::Apis::Core::Hashable
1304
+
1305
+ # A list of keys that were not looked up due to resource constraints. The order
1306
+ # of results in this field is undefined and has no relation to the order of the
1307
+ # keys in the input.
1308
+ # Corresponds to the JSON property `deferred`
1309
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
1310
+ attr_accessor :deferred
1311
+
1312
+ # Entities found as `ResultType.FULL` entities. The order of results in this
1313
+ # field is undefined and has no relation to the order of the keys in the input.
1314
+ # Corresponds to the JSON property `found`
1315
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
1316
+ attr_accessor :found
1317
+
1318
+ # Entities not found as `ResultType.KEY_ONLY` entities. The order of results in
1319
+ # this field is undefined and has no relation to the order of the keys in the
1320
+ # input.
1321
+ # Corresponds to the JSON property `missing`
1322
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
1323
+ attr_accessor :missing
1324
+
1325
+ def initialize(**args)
1326
+ update!(**args)
1327
+ end
1328
+
1329
+ # Update properties of this object
1330
+ def update!(**args)
1331
+ @deferred = args[:deferred] if args.key?(:deferred)
1332
+ @found = args[:found] if args.key?(:found)
1333
+ @missing = args[:missing] if args.key?(:missing)
1334
+ end
1335
+ end
1336
+
1337
+ # A mutation to apply to an entity.
1338
+ class Mutation
1339
+ include Google::Apis::Core::Hashable
1340
+
1341
+ # The version of the entity that this mutation is being applied to. If this does
1342
+ # not match the current version on the server, the mutation conflicts.
1343
+ # Corresponds to the JSON property `baseVersion`
1344
+ # @return [Fixnum]
1345
+ attr_accessor :base_version
1346
+
1347
+ # A unique identifier for an entity. If a key's partition ID or any of its path
1348
+ # kinds or names are reserved/read-only, the key is reserved/read-only. A
1349
+ # reserved/read-only key is forbidden in certain documented contexts.
1350
+ # Corresponds to the JSON property `delete`
1351
+ # @return [Google::Apis::DatastoreV1::Key]
1352
+ attr_accessor :delete
1353
+
1354
+ # A Datastore data object. An entity is limited to 1 megabyte when stored. That
1355
+ # _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
1356
+ # message.
1357
+ # Corresponds to the JSON property `insert`
1358
+ # @return [Google::Apis::DatastoreV1::Entity]
1359
+ attr_accessor :insert
1360
+
1361
+ # A Datastore data object. An entity is limited to 1 megabyte when stored. That
1362
+ # _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
1363
+ # message.
1364
+ # Corresponds to the JSON property `update`
1365
+ # @return [Google::Apis::DatastoreV1::Entity]
1366
+ attr_accessor :update
1367
+
1368
+ # A Datastore data object. An entity is limited to 1 megabyte when stored. That
1369
+ # _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
1370
+ # message.
1371
+ # Corresponds to the JSON property `upsert`
1372
+ # @return [Google::Apis::DatastoreV1::Entity]
1373
+ attr_accessor :upsert
1374
+
1375
+ def initialize(**args)
1376
+ update!(**args)
1377
+ end
1378
+
1379
+ # Update properties of this object
1380
+ def update!(**args)
1381
+ @base_version = args[:base_version] if args.key?(:base_version)
1382
+ @delete = args[:delete] if args.key?(:delete)
1383
+ @insert = args[:insert] if args.key?(:insert)
1384
+ @update = args[:update] if args.key?(:update)
1385
+ @upsert = args[:upsert] if args.key?(:upsert)
1386
+ end
1387
+ end
1388
+
1389
+ # The result of applying a mutation.
1390
+ class MutationResult
1391
+ include Google::Apis::Core::Hashable
1392
+
1393
+ # Whether a conflict was detected for this mutation. Always false when a
1394
+ # conflict detection strategy field is not set in the mutation.
1395
+ # Corresponds to the JSON property `conflictDetected`
1396
+ # @return [Boolean]
1397
+ attr_accessor :conflict_detected
1398
+ alias_method :conflict_detected?, :conflict_detected
1399
+
1400
+ # A unique identifier for an entity. If a key's partition ID or any of its path
1401
+ # kinds or names are reserved/read-only, the key is reserved/read-only. A
1402
+ # reserved/read-only key is forbidden in certain documented contexts.
1403
+ # Corresponds to the JSON property `key`
1404
+ # @return [Google::Apis::DatastoreV1::Key]
1405
+ attr_accessor :key
1406
+
1407
+ # The version of the entity on the server after processing the mutation. If the
1408
+ # mutation doesn't change anything on the server, then the version will be the
1409
+ # version of the current entity or, if no entity is present, a version that is
1410
+ # strictly greater than the version of any previous entity and less than the
1411
+ # version of any possible future entity.
1412
+ # Corresponds to the JSON property `version`
1413
+ # @return [Fixnum]
1414
+ attr_accessor :version
1415
+
1416
+ def initialize(**args)
1417
+ update!(**args)
1418
+ end
1419
+
1420
+ # Update properties of this object
1421
+ def update!(**args)
1422
+ @conflict_detected = args[:conflict_detected] if args.key?(:conflict_detected)
1423
+ @key = args[:key] if args.key?(:key)
1424
+ @version = args[:version] if args.key?(:version)
1425
+ end
1426
+ end
1427
+
1428
+ # A partition ID identifies a grouping of entities. The grouping is always by
1429
+ # project and namespace, however the namespace ID may be empty. A partition ID
1430
+ # contains several dimensions: project ID and namespace ID. Partition dimensions:
1431
+ # - May be `""`. - Must be valid UTF-8 bytes. - Must have values that match
1432
+ # regex `[A-Za-z\d\.\-_]`1,100`` If the value of any dimension matches regex `__.
1433
+ # *__`, the partition is reserved/read-only. A reserved/read-only partition ID
1434
+ # is forbidden in certain documented contexts. Foreign partition IDs (in which
1435
+ # the project ID does not match the context project ID ) are discouraged. Reads
1436
+ # and writes of foreign partition IDs may fail if the project is not in an
1437
+ # active state.
1438
+ class PartitionId
1439
+ include Google::Apis::Core::Hashable
1440
+
1441
+ # If not empty, the ID of the namespace to which the entities belong.
1442
+ # Corresponds to the JSON property `namespaceId`
1443
+ # @return [String]
1444
+ attr_accessor :namespace_id
1445
+
1446
+ # The ID of the project to which the entities belong.
1447
+ # Corresponds to the JSON property `projectId`
1448
+ # @return [String]
1449
+ attr_accessor :project_id
1450
+
1451
+ def initialize(**args)
1452
+ update!(**args)
1453
+ end
1454
+
1455
+ # Update properties of this object
1456
+ def update!(**args)
1457
+ @namespace_id = args[:namespace_id] if args.key?(:namespace_id)
1458
+ @project_id = args[:project_id] if args.key?(:project_id)
1459
+ end
1460
+ end
1461
+
1462
+ # A (kind, ID/name) pair used to construct a key path. If either name or ID is
1463
+ # set, the element is complete. If neither is set, the element is incomplete.
1464
+ class PathElement
1465
+ include Google::Apis::Core::Hashable
1466
+
1467
+ # The auto-allocated ID of the entity. Never equal to zero. Values less than
1468
+ # zero are discouraged and may not be supported in the future.
1469
+ # Corresponds to the JSON property `id`
1470
+ # @return [Fixnum]
1471
+ attr_accessor :id
1472
+
1473
+ # The kind of the entity. A kind matching regex `__.*__` is reserved/read-only.
1474
+ # A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be `""`
1475
+ # .
1476
+ # Corresponds to the JSON property `kind`
1477
+ # @return [String]
1478
+ attr_accessor :kind
1479
+
1480
+ # The name of the entity. A name matching regex `__.*__` is reserved/read-only.
1481
+ # A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be `""`.
1482
+ # Corresponds to the JSON property `name`
1483
+ # @return [String]
1484
+ attr_accessor :name
1485
+
1486
+ def initialize(**args)
1487
+ update!(**args)
1488
+ end
1489
+
1490
+ # Update properties of this object
1491
+ def update!(**args)
1492
+ @id = args[:id] if args.key?(:id)
1493
+ @kind = args[:kind] if args.key?(:kind)
1494
+ @name = args[:name] if args.key?(:name)
1495
+ end
1496
+ end
1497
+
1498
+ # A representation of a property in a projection.
1499
+ class Projection
1500
+ include Google::Apis::Core::Hashable
1501
+
1502
+ # A reference to a property relative to the kind expressions.
1503
+ # Corresponds to the JSON property `property`
1504
+ # @return [Google::Apis::DatastoreV1::PropertyReference]
1505
+ attr_accessor :property
1506
+
1507
+ def initialize(**args)
1508
+ update!(**args)
1509
+ end
1510
+
1511
+ # Update properties of this object
1512
+ def update!(**args)
1513
+ @property = args[:property] if args.key?(:property)
1514
+ end
1515
+ end
1516
+
1517
+ # A filter on a specific property.
1518
+ class PropertyFilter
1519
+ include Google::Apis::Core::Hashable
1520
+
1521
+ # The operator to filter by.
1522
+ # Corresponds to the JSON property `op`
1523
+ # @return [String]
1524
+ attr_accessor :op
1525
+
1526
+ # A reference to a property relative to the kind expressions.
1527
+ # Corresponds to the JSON property `property`
1528
+ # @return [Google::Apis::DatastoreV1::PropertyReference]
1529
+ attr_accessor :property
1530
+
1531
+ # A message that can hold any of the supported value types and associated
1532
+ # metadata.
1533
+ # Corresponds to the JSON property `value`
1534
+ # @return [Google::Apis::DatastoreV1::Value]
1535
+ attr_accessor :value
1536
+
1537
+ def initialize(**args)
1538
+ update!(**args)
1539
+ end
1540
+
1541
+ # Update properties of this object
1542
+ def update!(**args)
1543
+ @op = args[:op] if args.key?(:op)
1544
+ @property = args[:property] if args.key?(:property)
1545
+ @value = args[:value] if args.key?(:value)
1546
+ end
1547
+ end
1548
+
1549
+ # The desired order for a specific property.
1550
+ class PropertyOrder
1551
+ include Google::Apis::Core::Hashable
1552
+
1553
+ # The direction to order by. Defaults to `ASCENDING`.
1554
+ # Corresponds to the JSON property `direction`
1555
+ # @return [String]
1556
+ attr_accessor :direction
1557
+
1558
+ # A reference to a property relative to the kind expressions.
1559
+ # Corresponds to the JSON property `property`
1560
+ # @return [Google::Apis::DatastoreV1::PropertyReference]
1561
+ attr_accessor :property
1562
+
1563
+ def initialize(**args)
1564
+ update!(**args)
1565
+ end
1566
+
1567
+ # Update properties of this object
1568
+ def update!(**args)
1569
+ @direction = args[:direction] if args.key?(:direction)
1570
+ @property = args[:property] if args.key?(:property)
1571
+ end
1572
+ end
1573
+
1574
+ # A reference to a property relative to the kind expressions.
1575
+ class PropertyReference
1576
+ include Google::Apis::Core::Hashable
1577
+
1578
+ # The name of the property. If name includes "."s, it may be interpreted as a
1579
+ # property name path.
1580
+ # Corresponds to the JSON property `name`
1581
+ # @return [String]
1582
+ attr_accessor :name
1583
+
1584
+ def initialize(**args)
1585
+ update!(**args)
1586
+ end
1587
+
1588
+ # Update properties of this object
1589
+ def update!(**args)
1590
+ @name = args[:name] if args.key?(:name)
1591
+ end
1592
+ end
1593
+
1594
+ # A query for entities.
1595
+ class Query
1596
+ include Google::Apis::Core::Hashable
1597
+
1598
+ # The properties to make distinct. The query results will contain the first
1599
+ # result for each distinct combination of values for the given properties (if
1600
+ # empty, all results are returned).
1601
+ # Corresponds to the JSON property `distinctOn`
1602
+ # @return [Array<Google::Apis::DatastoreV1::PropertyReference>]
1603
+ attr_accessor :distinct_on
1604
+
1605
+ # An ending point for the query results. Query cursors are returned in query
1606
+ # result batches and [can only be used to limit the same query](https://cloud.
1607
+ # google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
1608
+ # Corresponds to the JSON property `endCursor`
1609
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1610
+ # @return [String]
1611
+ attr_accessor :end_cursor
1612
+
1613
+ # A holder for any type of filter.
1614
+ # Corresponds to the JSON property `filter`
1615
+ # @return [Google::Apis::DatastoreV1::Filter]
1616
+ attr_accessor :filter
1617
+
1618
+ # The kinds to query (if empty, returns entities of all kinds). Currently at
1619
+ # most 1 kind may be specified.
1620
+ # Corresponds to the JSON property `kind`
1621
+ # @return [Array<Google::Apis::DatastoreV1::KindExpression>]
1622
+ attr_accessor :kind
1623
+
1624
+ # The maximum number of results to return. Applies after all other constraints.
1625
+ # Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
1626
+ # Corresponds to the JSON property `limit`
1627
+ # @return [Fixnum]
1628
+ attr_accessor :limit
1629
+
1630
+ # The number of results to skip. Applies before limit, but after all other
1631
+ # constraints. Optional. Must be >= 0 if specified.
1632
+ # Corresponds to the JSON property `offset`
1633
+ # @return [Fixnum]
1634
+ attr_accessor :offset
1635
+
1636
+ # The order to apply to the query results (if empty, order is unspecified).
1637
+ # Corresponds to the JSON property `order`
1638
+ # @return [Array<Google::Apis::DatastoreV1::PropertyOrder>]
1639
+ attr_accessor :order
1640
+
1641
+ # The projection to return. Defaults to returning all properties.
1642
+ # Corresponds to the JSON property `projection`
1643
+ # @return [Array<Google::Apis::DatastoreV1::Projection>]
1644
+ attr_accessor :projection
1645
+
1646
+ # A starting point for the query results. Query cursors are returned in query
1647
+ # result batches and [can only be used to continue the same query](https://cloud.
1648
+ # google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
1649
+ # Corresponds to the JSON property `startCursor`
1650
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1651
+ # @return [String]
1652
+ attr_accessor :start_cursor
1653
+
1654
+ def initialize(**args)
1655
+ update!(**args)
1656
+ end
1657
+
1658
+ # Update properties of this object
1659
+ def update!(**args)
1660
+ @distinct_on = args[:distinct_on] if args.key?(:distinct_on)
1661
+ @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
1662
+ @filter = args[:filter] if args.key?(:filter)
1663
+ @kind = args[:kind] if args.key?(:kind)
1664
+ @limit = args[:limit] if args.key?(:limit)
1665
+ @offset = args[:offset] if args.key?(:offset)
1666
+ @order = args[:order] if args.key?(:order)
1667
+ @projection = args[:projection] if args.key?(:projection)
1668
+ @start_cursor = args[:start_cursor] if args.key?(:start_cursor)
1669
+ end
1670
+ end
1671
+
1672
+ # A batch of results produced by a query.
1673
+ class QueryResultBatch
1674
+ include Google::Apis::Core::Hashable
1675
+
1676
+ # A cursor that points to the position after the last result in the batch.
1677
+ # Corresponds to the JSON property `endCursor`
1678
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1679
+ # @return [String]
1680
+ attr_accessor :end_cursor
1681
+
1682
+ # The result type for every entity in `entity_results`.
1683
+ # Corresponds to the JSON property `entityResultType`
1684
+ # @return [String]
1685
+ attr_accessor :entity_result_type
1686
+
1687
+ # The results for this batch.
1688
+ # Corresponds to the JSON property `entityResults`
1689
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
1690
+ attr_accessor :entity_results
1691
+
1692
+ # The state of the query after the current batch.
1693
+ # Corresponds to the JSON property `moreResults`
1694
+ # @return [String]
1695
+ attr_accessor :more_results
1696
+
1697
+ # A cursor that points to the position after the last skipped result. Will be
1698
+ # set when `skipped_results` != 0.
1699
+ # Corresponds to the JSON property `skippedCursor`
1700
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1701
+ # @return [String]
1702
+ attr_accessor :skipped_cursor
1703
+
1704
+ # The number of results skipped, typically because of an offset.
1705
+ # Corresponds to the JSON property `skippedResults`
1706
+ # @return [Fixnum]
1707
+ attr_accessor :skipped_results
1708
+
1709
+ # The version number of the snapshot this batch was returned from. This applies
1710
+ # to the range of results from the query's `start_cursor` (or the beginning of
1711
+ # the query if no cursor was given) to this batch's `end_cursor` (not the query'
1712
+ # s `end_cursor`). In a single transaction, subsequent query result batches for
1713
+ # the same query can have a greater snapshot version number. Each batch's
1714
+ # snapshot version is valid for all preceding batches. The value will be zero
1715
+ # for eventually consistent queries.
1716
+ # Corresponds to the JSON property `snapshotVersion`
1717
+ # @return [Fixnum]
1718
+ attr_accessor :snapshot_version
1719
+
1720
+ def initialize(**args)
1721
+ update!(**args)
1722
+ end
1723
+
1724
+ # Update properties of this object
1725
+ def update!(**args)
1726
+ @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
1727
+ @entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
1728
+ @entity_results = args[:entity_results] if args.key?(:entity_results)
1729
+ @more_results = args[:more_results] if args.key?(:more_results)
1730
+ @skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
1731
+ @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
1732
+ @snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version)
1733
+ end
1734
+ end
1735
+
1736
+ # Options specific to read-only transactions.
1737
+ class ReadOnly
1738
+ include Google::Apis::Core::Hashable
1739
+
1740
+ def initialize(**args)
1741
+ update!(**args)
1742
+ end
1743
+
1744
+ # Update properties of this object
1745
+ def update!(**args)
1746
+ end
1747
+ end
1748
+
1749
+ # The options shared by read requests.
1750
+ class ReadOptions
1751
+ include Google::Apis::Core::Hashable
1752
+
1753
+ # The non-transactional read consistency to use. Cannot be set to `STRONG` for
1754
+ # global queries.
1755
+ # Corresponds to the JSON property `readConsistency`
1756
+ # @return [String]
1757
+ attr_accessor :read_consistency
1758
+
1759
+ # The identifier of the transaction in which to read. A transaction identifier
1760
+ # is returned by a call to Datastore.BeginTransaction.
1761
+ # Corresponds to the JSON property `transaction`
1762
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1763
+ # @return [String]
1764
+ attr_accessor :transaction
1765
+
1766
+ def initialize(**args)
1767
+ update!(**args)
1768
+ end
1769
+
1770
+ # Update properties of this object
1771
+ def update!(**args)
1772
+ @read_consistency = args[:read_consistency] if args.key?(:read_consistency)
1773
+ @transaction = args[:transaction] if args.key?(:transaction)
1774
+ end
1775
+ end
1776
+
1777
+ # Options specific to read / write transactions.
1778
+ class ReadWrite
1779
+ include Google::Apis::Core::Hashable
1780
+
1781
+ # The transaction identifier of the transaction being retried.
1782
+ # Corresponds to the JSON property `previousTransaction`
1783
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1784
+ # @return [String]
1785
+ attr_accessor :previous_transaction
1786
+
1787
+ def initialize(**args)
1788
+ update!(**args)
1789
+ end
1790
+
1791
+ # Update properties of this object
1792
+ def update!(**args)
1793
+ @previous_transaction = args[:previous_transaction] if args.key?(:previous_transaction)
1794
+ end
1795
+ end
1796
+
1797
+ # The request for Datastore.ReserveIds.
1798
+ class ReserveIdsRequest
1799
+ include Google::Apis::Core::Hashable
1800
+
1801
+ # If not empty, the ID of the database against which to make the request.
1802
+ # Corresponds to the JSON property `databaseId`
1803
+ # @return [String]
1804
+ attr_accessor :database_id
1805
+
1806
+ # Required. A list of keys with complete key paths whose numeric IDs should not
1807
+ # be auto-allocated.
1808
+ # Corresponds to the JSON property `keys`
1809
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
1810
+ attr_accessor :keys
1811
+
1812
+ def initialize(**args)
1813
+ update!(**args)
1814
+ end
1815
+
1816
+ # Update properties of this object
1817
+ def update!(**args)
1818
+ @database_id = args[:database_id] if args.key?(:database_id)
1819
+ @keys = args[:keys] if args.key?(:keys)
1820
+ end
1821
+ end
1822
+
1823
+ # The response for Datastore.ReserveIds.
1824
+ class ReserveIdsResponse
1825
+ include Google::Apis::Core::Hashable
1826
+
1827
+ def initialize(**args)
1828
+ update!(**args)
1829
+ end
1830
+
1831
+ # Update properties of this object
1832
+ def update!(**args)
1833
+ end
1834
+ end
1835
+
1836
+ # The request for Datastore.Rollback.
1837
+ class RollbackRequest
1838
+ include Google::Apis::Core::Hashable
1839
+
1840
+ # Required. The transaction identifier, returned by a call to Datastore.
1841
+ # BeginTransaction.
1842
+ # Corresponds to the JSON property `transaction`
1843
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1844
+ # @return [String]
1845
+ attr_accessor :transaction
1846
+
1847
+ def initialize(**args)
1848
+ update!(**args)
1849
+ end
1850
+
1851
+ # Update properties of this object
1852
+ def update!(**args)
1853
+ @transaction = args[:transaction] if args.key?(:transaction)
1854
+ end
1855
+ end
1856
+
1857
+ # The response for Datastore.Rollback. (an empty message).
1858
+ class RollbackResponse
1859
+ include Google::Apis::Core::Hashable
1860
+
1861
+ def initialize(**args)
1862
+ update!(**args)
1863
+ end
1864
+
1865
+ # Update properties of this object
1866
+ def update!(**args)
1867
+ end
1868
+ end
1869
+
1870
+ # The request for Datastore.RunQuery.
1871
+ class RunQueryRequest
1872
+ include Google::Apis::Core::Hashable
1873
+
1874
+ # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
1875
+ # Corresponds to the JSON property `gqlQuery`
1876
+ # @return [Google::Apis::DatastoreV1::GqlQuery]
1877
+ attr_accessor :gql_query
1878
+
1879
+ # A partition ID identifies a grouping of entities. The grouping is always by
1880
+ # project and namespace, however the namespace ID may be empty. A partition ID
1881
+ # contains several dimensions: project ID and namespace ID. Partition dimensions:
1882
+ # - May be `""`. - Must be valid UTF-8 bytes. - Must have values that match
1883
+ # regex `[A-Za-z\d\.\-_]`1,100`` If the value of any dimension matches regex `__.
1884
+ # *__`, the partition is reserved/read-only. A reserved/read-only partition ID
1885
+ # is forbidden in certain documented contexts. Foreign partition IDs (in which
1886
+ # the project ID does not match the context project ID ) are discouraged. Reads
1887
+ # and writes of foreign partition IDs may fail if the project is not in an
1888
+ # active state.
1889
+ # Corresponds to the JSON property `partitionId`
1890
+ # @return [Google::Apis::DatastoreV1::PartitionId]
1891
+ attr_accessor :partition_id
1892
+
1893
+ # A query for entities.
1894
+ # Corresponds to the JSON property `query`
1895
+ # @return [Google::Apis::DatastoreV1::Query]
1896
+ attr_accessor :query
1897
+
1898
+ # The options shared by read requests.
1899
+ # Corresponds to the JSON property `readOptions`
1900
+ # @return [Google::Apis::DatastoreV1::ReadOptions]
1901
+ attr_accessor :read_options
1902
+
1903
+ def initialize(**args)
1904
+ update!(**args)
1905
+ end
1906
+
1907
+ # Update properties of this object
1908
+ def update!(**args)
1909
+ @gql_query = args[:gql_query] if args.key?(:gql_query)
1910
+ @partition_id = args[:partition_id] if args.key?(:partition_id)
1911
+ @query = args[:query] if args.key?(:query)
1912
+ @read_options = args[:read_options] if args.key?(:read_options)
1913
+ end
1914
+ end
1915
+
1916
+ # The response for Datastore.RunQuery.
1917
+ class RunQueryResponse
1918
+ include Google::Apis::Core::Hashable
1919
+
1920
+ # A batch of results produced by a query.
1921
+ # Corresponds to the JSON property `batch`
1922
+ # @return [Google::Apis::DatastoreV1::QueryResultBatch]
1923
+ attr_accessor :batch
1924
+
1925
+ # A query for entities.
1926
+ # Corresponds to the JSON property `query`
1927
+ # @return [Google::Apis::DatastoreV1::Query]
1928
+ attr_accessor :query
1929
+
1930
+ def initialize(**args)
1931
+ update!(**args)
1932
+ end
1933
+
1934
+ # Update properties of this object
1935
+ def update!(**args)
1936
+ @batch = args[:batch] if args.key?(:batch)
1937
+ @query = args[:query] if args.key?(:query)
1938
+ end
1939
+ end
1940
+
1941
+ # The `Status` type defines a logical error model that is suitable for different
1942
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1943
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1944
+ # data: error code, error message, and error details. You can find out more
1945
+ # about this error model and how to work with it in the [API Design Guide](https:
1946
+ # //cloud.google.com/apis/design/errors).
1947
+ class Status
1948
+ include Google::Apis::Core::Hashable
1949
+
1950
+ # The status code, which should be an enum value of google.rpc.Code.
1951
+ # Corresponds to the JSON property `code`
1952
+ # @return [Fixnum]
1953
+ attr_accessor :code
1954
+
1955
+ # A list of messages that carry the error details. There is a common set of
1956
+ # message types for APIs to use.
1957
+ # Corresponds to the JSON property `details`
1958
+ # @return [Array<Hash<String,Object>>]
1959
+ attr_accessor :details
1960
+
1961
+ # A developer-facing error message, which should be in English. Any user-facing
1962
+ # error message should be localized and sent in the google.rpc.Status.details
1963
+ # field, or localized by the client.
1964
+ # Corresponds to the JSON property `message`
1965
+ # @return [String]
1966
+ attr_accessor :message
1967
+
1968
+ def initialize(**args)
1969
+ update!(**args)
1970
+ end
1971
+
1972
+ # Update properties of this object
1973
+ def update!(**args)
1974
+ @code = args[:code] if args.key?(:code)
1975
+ @details = args[:details] if args.key?(:details)
1976
+ @message = args[:message] if args.key?(:message)
1977
+ end
1978
+ end
1979
+
1980
+ # Options for beginning a new transaction. Transactions can be created
1981
+ # explicitly with calls to Datastore.BeginTransaction or implicitly by setting
1982
+ # ReadOptions.new_transaction in read requests.
1983
+ class TransactionOptions
1984
+ include Google::Apis::Core::Hashable
1985
+
1986
+ # Options specific to read-only transactions.
1987
+ # Corresponds to the JSON property `readOnly`
1988
+ # @return [Google::Apis::DatastoreV1::ReadOnly]
1989
+ attr_accessor :read_only
1990
+
1991
+ # Options specific to read / write transactions.
1992
+ # Corresponds to the JSON property `readWrite`
1993
+ # @return [Google::Apis::DatastoreV1::ReadWrite]
1994
+ attr_accessor :read_write
1995
+
1996
+ def initialize(**args)
1997
+ update!(**args)
1998
+ end
1999
+
2000
+ # Update properties of this object
2001
+ def update!(**args)
2002
+ @read_only = args[:read_only] if args.key?(:read_only)
2003
+ @read_write = args[:read_write] if args.key?(:read_write)
2004
+ end
2005
+ end
2006
+
2007
+ # A message that can hold any of the supported value types and associated
2008
+ # metadata.
2009
+ class Value
2010
+ include Google::Apis::Core::Hashable
2011
+
2012
+ # An array value.
2013
+ # Corresponds to the JSON property `arrayValue`
2014
+ # @return [Google::Apis::DatastoreV1::ArrayValue]
2015
+ attr_accessor :array_value
2016
+
2017
+ # A blob value. May have at most 1,000,000 bytes. When `exclude_from_indexes` is
2018
+ # false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.
2019
+ # Corresponds to the JSON property `blobValue`
2020
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
2021
+ # @return [String]
2022
+ attr_accessor :blob_value
2023
+
2024
+ # A boolean value.
2025
+ # Corresponds to the JSON property `booleanValue`
2026
+ # @return [Boolean]
2027
+ attr_accessor :boolean_value
2028
+ alias_method :boolean_value?, :boolean_value
2029
+
2030
+ # A double value.
2031
+ # Corresponds to the JSON property `doubleValue`
2032
+ # @return [Float]
2033
+ attr_accessor :double_value
2034
+
2035
+ # A Datastore data object. An entity is limited to 1 megabyte when stored. That
2036
+ # _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this
2037
+ # message.
2038
+ # Corresponds to the JSON property `entityValue`
2039
+ # @return [Google::Apis::DatastoreV1::Entity]
2040
+ attr_accessor :entity_value
2041
+
2042
+ # If the value should be excluded from all indexes including those defined
2043
+ # explicitly.
2044
+ # Corresponds to the JSON property `excludeFromIndexes`
2045
+ # @return [Boolean]
2046
+ attr_accessor :exclude_from_indexes
2047
+ alias_method :exclude_from_indexes?, :exclude_from_indexes
2048
+
2049
+ # An object that represents a latitude/longitude pair. This is expressed as a
2050
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
2051
+ # specified otherwise, this must conform to the WGS84 standard. Values must be
2052
+ # within normalized ranges.
2053
+ # Corresponds to the JSON property `geoPointValue`
2054
+ # @return [Google::Apis::DatastoreV1::LatLng]
2055
+ attr_accessor :geo_point_value
2056
+
2057
+ # An integer value.
2058
+ # Corresponds to the JSON property `integerValue`
2059
+ # @return [Fixnum]
2060
+ attr_accessor :integer_value
2061
+
2062
+ # A unique identifier for an entity. If a key's partition ID or any of its path
2063
+ # kinds or names are reserved/read-only, the key is reserved/read-only. A
2064
+ # reserved/read-only key is forbidden in certain documented contexts.
2065
+ # Corresponds to the JSON property `keyValue`
2066
+ # @return [Google::Apis::DatastoreV1::Key]
2067
+ attr_accessor :key_value
2068
+
2069
+ # The `meaning` field should only be populated for backwards compatibility.
2070
+ # Corresponds to the JSON property `meaning`
2071
+ # @return [Fixnum]
2072
+ attr_accessor :meaning
2073
+
2074
+ # A null value.
2075
+ # Corresponds to the JSON property `nullValue`
2076
+ # @return [String]
2077
+ attr_accessor :null_value
2078
+
2079
+ # A UTF-8 encoded string value. When `exclude_from_indexes` is false (it is
2080
+ # indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,
2081
+ # 000 bytes.
2082
+ # Corresponds to the JSON property `stringValue`
2083
+ # @return [String]
2084
+ attr_accessor :string_value
2085
+
2086
+ # A timestamp value. When stored in the Datastore, precise only to microseconds;
2087
+ # any additional precision is rounded down.
2088
+ # Corresponds to the JSON property `timestampValue`
2089
+ # @return [String]
2090
+ attr_accessor :timestamp_value
2091
+
2092
+ def initialize(**args)
2093
+ update!(**args)
2094
+ end
2095
+
2096
+ # Update properties of this object
2097
+ def update!(**args)
2098
+ @array_value = args[:array_value] if args.key?(:array_value)
2099
+ @blob_value = args[:blob_value] if args.key?(:blob_value)
2100
+ @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
2101
+ @double_value = args[:double_value] if args.key?(:double_value)
2102
+ @entity_value = args[:entity_value] if args.key?(:entity_value)
2103
+ @exclude_from_indexes = args[:exclude_from_indexes] if args.key?(:exclude_from_indexes)
2104
+ @geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value)
2105
+ @integer_value = args[:integer_value] if args.key?(:integer_value)
2106
+ @key_value = args[:key_value] if args.key?(:key_value)
2107
+ @meaning = args[:meaning] if args.key?(:meaning)
2108
+ @null_value = args[:null_value] if args.key?(:null_value)
2109
+ @string_value = args[:string_value] if args.key?(:string_value)
2110
+ @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
2111
+ end
2112
+ end
2113
+ end
2114
+ end
2115
+ end