google-apis-firestore_v1beta1 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: 9feeb737c8256acdf3c1c58960b7328fbdd4c4426f30e0fdfe0f42b63d70f151
4
+ data.tar.gz: 1fbdacc1cdca5b16665a020c7f5e338bf9cb754c28718aace59d99b1e2104787
5
+ SHA512:
6
+ metadata.gz: 8581406a47b955a17970353d29c200955d002af9803df96b02af3f47b45dd43c4998544067a24a13d694d1230d275613fd27bbf96a25c4ba1fe00a14e5dd33a1
7
+ data.tar.gz: 8df7ae16d41b47c9116ecd0bb89b6be6553e97f24feffcf23797e5ab128ebd914bba7e7b633d6cca74b5dffa925e00744d334205bc9631bcc962436d8ce41c3b
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-firestore_v1beta1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/firestore_v1beta1/*.rb
9
+ lib/google/apis/firestore_v1beta1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-firestore_v1beta1
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 V1beta1 of the Cloud Firestore API
2
+
3
+ This is a simple client library for version V1beta1 of the Cloud Firestore 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/firestore.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-firestore_v1beta1', '~> 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-firestore_v1beta1
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/firestore_v1beta1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::FirestoreV1beta1::FirestoreService.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 Firestore service in particular.)
67
+
68
+ For reference information on specific calls in the Cloud Firestore API, see the {Google::Apis::FirestoreV1beta1::FirestoreService 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-firestore_v1beta1`, 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/firestore) 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/firestore_v1beta1"
@@ -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/firestore_v1beta1/service.rb'
16
+ require 'google/apis/firestore_v1beta1/classes.rb'
17
+ require 'google/apis/firestore_v1beta1/representations.rb'
18
+ require 'google/apis/firestore_v1beta1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud Firestore API
23
+ #
24
+ # Accesses the NoSQL document database built for automatic scaling, high
25
+ # performance, and ease of application development.
26
+ #
27
+ # @see https://cloud.google.com/firestore
28
+ module FirestoreV1beta1
29
+ # Version of the Cloud Firestore API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V1beta1'
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,2301 @@
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 FirestoreV1beta1
24
+
25
+ # An array value.
26
+ class ArrayValue
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Values in the array.
30
+ # Corresponds to the JSON property `values`
31
+ # @return [Array<Google::Apis::FirestoreV1beta1::Value>]
32
+ attr_accessor :values
33
+
34
+ def initialize(**args)
35
+ update!(**args)
36
+ end
37
+
38
+ # Update properties of this object
39
+ def update!(**args)
40
+ @values = args[:values] if args.key?(:values)
41
+ end
42
+ end
43
+
44
+ # The request for Firestore.BatchGetDocuments.
45
+ class BatchGetDocumentsRequest
46
+ include Google::Apis::Core::Hashable
47
+
48
+ # The names of the documents to retrieve. In the format: `projects/`project_id`/
49
+ # databases/`database_id`/documents/`document_path``. The request will fail if
50
+ # any of the document is not a child resource of the given `database`. Duplicate
51
+ # names will be elided.
52
+ # Corresponds to the JSON property `documents`
53
+ # @return [Array<String>]
54
+ attr_accessor :documents
55
+
56
+ # A set of field paths on a document. Used to restrict a get or update operation
57
+ # on a document to a subset of its fields. This is different from standard field
58
+ # masks, as this is always scoped to a Document, and takes in account the
59
+ # dynamic nature of Value.
60
+ # Corresponds to the JSON property `mask`
61
+ # @return [Google::Apis::FirestoreV1beta1::DocumentMask]
62
+ attr_accessor :mask
63
+
64
+ # Options for creating a new transaction.
65
+ # Corresponds to the JSON property `newTransaction`
66
+ # @return [Google::Apis::FirestoreV1beta1::TransactionOptions]
67
+ attr_accessor :new_transaction
68
+
69
+ # Reads documents as they were at the given time. This may not be older than 270
70
+ # seconds.
71
+ # Corresponds to the JSON property `readTime`
72
+ # @return [String]
73
+ attr_accessor :read_time
74
+
75
+ # Reads documents in a transaction.
76
+ # Corresponds to the JSON property `transaction`
77
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
78
+ # @return [String]
79
+ attr_accessor :transaction
80
+
81
+ def initialize(**args)
82
+ update!(**args)
83
+ end
84
+
85
+ # Update properties of this object
86
+ def update!(**args)
87
+ @documents = args[:documents] if args.key?(:documents)
88
+ @mask = args[:mask] if args.key?(:mask)
89
+ @new_transaction = args[:new_transaction] if args.key?(:new_transaction)
90
+ @read_time = args[:read_time] if args.key?(:read_time)
91
+ @transaction = args[:transaction] if args.key?(:transaction)
92
+ end
93
+ end
94
+
95
+ # The streamed response for Firestore.BatchGetDocuments.
96
+ class BatchGetDocumentsResponse
97
+ include Google::Apis::Core::Hashable
98
+
99
+ # A Firestore document. Must not exceed 1 MiB - 4 bytes.
100
+ # Corresponds to the JSON property `found`
101
+ # @return [Google::Apis::FirestoreV1beta1::Document]
102
+ attr_accessor :found
103
+
104
+ # A document name that was requested but does not exist. In the format: `
105
+ # projects/`project_id`/databases/`database_id`/documents/`document_path``.
106
+ # Corresponds to the JSON property `missing`
107
+ # @return [String]
108
+ attr_accessor :missing
109
+
110
+ # The time at which the document was read. This may be monotically increasing,
111
+ # in this case the previous documents in the result stream are guaranteed not to
112
+ # have changed between their read_time and this one.
113
+ # Corresponds to the JSON property `readTime`
114
+ # @return [String]
115
+ attr_accessor :read_time
116
+
117
+ # The transaction that was started as part of this request. Will only be set in
118
+ # the first response, and only if BatchGetDocumentsRequest.new_transaction was
119
+ # set in the request.
120
+ # Corresponds to the JSON property `transaction`
121
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
122
+ # @return [String]
123
+ attr_accessor :transaction
124
+
125
+ def initialize(**args)
126
+ update!(**args)
127
+ end
128
+
129
+ # Update properties of this object
130
+ def update!(**args)
131
+ @found = args[:found] if args.key?(:found)
132
+ @missing = args[:missing] if args.key?(:missing)
133
+ @read_time = args[:read_time] if args.key?(:read_time)
134
+ @transaction = args[:transaction] if args.key?(:transaction)
135
+ end
136
+ end
137
+
138
+ # The request for Firestore.BatchWrite.
139
+ class BatchWriteRequest
140
+ include Google::Apis::Core::Hashable
141
+
142
+ # Labels associated with this batch write.
143
+ # Corresponds to the JSON property `labels`
144
+ # @return [Hash<String,String>]
145
+ attr_accessor :labels
146
+
147
+ # The writes to apply. Method does not apply writes atomically and does not
148
+ # guarantee ordering. Each write succeeds or fails independently. You cannot
149
+ # write to the same document more than once per request.
150
+ # Corresponds to the JSON property `writes`
151
+ # @return [Array<Google::Apis::FirestoreV1beta1::Write>]
152
+ attr_accessor :writes
153
+
154
+ def initialize(**args)
155
+ update!(**args)
156
+ end
157
+
158
+ # Update properties of this object
159
+ def update!(**args)
160
+ @labels = args[:labels] if args.key?(:labels)
161
+ @writes = args[:writes] if args.key?(:writes)
162
+ end
163
+ end
164
+
165
+ # The response from Firestore.BatchWrite.
166
+ class BatchWriteResponse
167
+ include Google::Apis::Core::Hashable
168
+
169
+ # The status of applying the writes. This i-th write status corresponds to the i-
170
+ # th write in the request.
171
+ # Corresponds to the JSON property `status`
172
+ # @return [Array<Google::Apis::FirestoreV1beta1::Status>]
173
+ attr_accessor :status
174
+
175
+ # The result of applying the writes. This i-th write result corresponds to the i-
176
+ # th write in the request.
177
+ # Corresponds to the JSON property `writeResults`
178
+ # @return [Array<Google::Apis::FirestoreV1beta1::WriteResult>]
179
+ attr_accessor :write_results
180
+
181
+ def initialize(**args)
182
+ update!(**args)
183
+ end
184
+
185
+ # Update properties of this object
186
+ def update!(**args)
187
+ @status = args[:status] if args.key?(:status)
188
+ @write_results = args[:write_results] if args.key?(:write_results)
189
+ end
190
+ end
191
+
192
+ # The request for Firestore.BeginTransaction.
193
+ class BeginTransactionRequest
194
+ include Google::Apis::Core::Hashable
195
+
196
+ # Options for creating a new transaction.
197
+ # Corresponds to the JSON property `options`
198
+ # @return [Google::Apis::FirestoreV1beta1::TransactionOptions]
199
+ attr_accessor :options
200
+
201
+ def initialize(**args)
202
+ update!(**args)
203
+ end
204
+
205
+ # Update properties of this object
206
+ def update!(**args)
207
+ @options = args[:options] if args.key?(:options)
208
+ end
209
+ end
210
+
211
+ # The response for Firestore.BeginTransaction.
212
+ class BeginTransactionResponse
213
+ include Google::Apis::Core::Hashable
214
+
215
+ # The transaction that was started.
216
+ # Corresponds to the JSON property `transaction`
217
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
218
+ # @return [String]
219
+ attr_accessor :transaction
220
+
221
+ def initialize(**args)
222
+ update!(**args)
223
+ end
224
+
225
+ # Update properties of this object
226
+ def update!(**args)
227
+ @transaction = args[:transaction] if args.key?(:transaction)
228
+ end
229
+ end
230
+
231
+ # A selection of a collection, such as `messages as m1`.
232
+ class CollectionSelector
233
+ include Google::Apis::Core::Hashable
234
+
235
+ # When false, selects only collections that are immediate children of the `
236
+ # parent` specified in the containing `RunQueryRequest`. When true, selects all
237
+ # descendant collections.
238
+ # Corresponds to the JSON property `allDescendants`
239
+ # @return [Boolean]
240
+ attr_accessor :all_descendants
241
+ alias_method :all_descendants?, :all_descendants
242
+
243
+ # The collection ID. When set, selects only collections with this ID.
244
+ # Corresponds to the JSON property `collectionId`
245
+ # @return [String]
246
+ attr_accessor :collection_id
247
+
248
+ def initialize(**args)
249
+ update!(**args)
250
+ end
251
+
252
+ # Update properties of this object
253
+ def update!(**args)
254
+ @all_descendants = args[:all_descendants] if args.key?(:all_descendants)
255
+ @collection_id = args[:collection_id] if args.key?(:collection_id)
256
+ end
257
+ end
258
+
259
+ # The request for Firestore.Commit.
260
+ class CommitRequest
261
+ include Google::Apis::Core::Hashable
262
+
263
+ # If set, applies all writes in this transaction, and commits it.
264
+ # Corresponds to the JSON property `transaction`
265
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
266
+ # @return [String]
267
+ attr_accessor :transaction
268
+
269
+ # The writes to apply. Always executed atomically and in order.
270
+ # Corresponds to the JSON property `writes`
271
+ # @return [Array<Google::Apis::FirestoreV1beta1::Write>]
272
+ attr_accessor :writes
273
+
274
+ def initialize(**args)
275
+ update!(**args)
276
+ end
277
+
278
+ # Update properties of this object
279
+ def update!(**args)
280
+ @transaction = args[:transaction] if args.key?(:transaction)
281
+ @writes = args[:writes] if args.key?(:writes)
282
+ end
283
+ end
284
+
285
+ # The response for Firestore.Commit.
286
+ class CommitResponse
287
+ include Google::Apis::Core::Hashable
288
+
289
+ # The time at which the commit occurred. Any read with an equal or greater `
290
+ # read_time` is guaranteed to see the effects of the commit.
291
+ # Corresponds to the JSON property `commitTime`
292
+ # @return [String]
293
+ attr_accessor :commit_time
294
+
295
+ # The result of applying the writes. This i-th write result corresponds to the i-
296
+ # th write in the request.
297
+ # Corresponds to the JSON property `writeResults`
298
+ # @return [Array<Google::Apis::FirestoreV1beta1::WriteResult>]
299
+ attr_accessor :write_results
300
+
301
+ def initialize(**args)
302
+ update!(**args)
303
+ end
304
+
305
+ # Update properties of this object
306
+ def update!(**args)
307
+ @commit_time = args[:commit_time] if args.key?(:commit_time)
308
+ @write_results = args[:write_results] if args.key?(:write_results)
309
+ end
310
+ end
311
+
312
+ # A filter that merges multiple other filters using the given operator.
313
+ class CompositeFilter
314
+ include Google::Apis::Core::Hashable
315
+
316
+ # The list of filters to combine. Must contain at least one filter.
317
+ # Corresponds to the JSON property `filters`
318
+ # @return [Array<Google::Apis::FirestoreV1beta1::Filter>]
319
+ attr_accessor :filters
320
+
321
+ # The operator for combining multiple filters.
322
+ # Corresponds to the JSON property `op`
323
+ # @return [String]
324
+ attr_accessor :op
325
+
326
+ def initialize(**args)
327
+ update!(**args)
328
+ end
329
+
330
+ # Update properties of this object
331
+ def update!(**args)
332
+ @filters = args[:filters] if args.key?(:filters)
333
+ @op = args[:op] if args.key?(:op)
334
+ end
335
+ end
336
+
337
+ # A position in a query result set.
338
+ class Cursor
339
+ include Google::Apis::Core::Hashable
340
+
341
+ # If the position is just before or just after the given values, relative to the
342
+ # sort order defined by the query.
343
+ # Corresponds to the JSON property `before`
344
+ # @return [Boolean]
345
+ attr_accessor :before
346
+ alias_method :before?, :before
347
+
348
+ # The values that represent a position, in the order they appear in the order by
349
+ # clause of a query. Can contain fewer values than specified in the order by
350
+ # clause.
351
+ # Corresponds to the JSON property `values`
352
+ # @return [Array<Google::Apis::FirestoreV1beta1::Value>]
353
+ attr_accessor :values
354
+
355
+ def initialize(**args)
356
+ update!(**args)
357
+ end
358
+
359
+ # Update properties of this object
360
+ def update!(**args)
361
+ @before = args[:before] if args.key?(:before)
362
+ @values = args[:values] if args.key?(:values)
363
+ end
364
+ end
365
+
366
+ # A Firestore document. Must not exceed 1 MiB - 4 bytes.
367
+ class Document
368
+ include Google::Apis::Core::Hashable
369
+
370
+ # Output only. The time at which the document was created. This value increases
371
+ # monotonically when a document is deleted then recreated. It can also be
372
+ # compared to values from other documents and the `read_time` of a query.
373
+ # Corresponds to the JSON property `createTime`
374
+ # @return [String]
375
+ attr_accessor :create_time
376
+
377
+ # The document's fields. The map keys represent field names. A simple field name
378
+ # contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must
379
+ # not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the
380
+ # regular expression `__.*__` are reserved. Reserved field names are forbidden
381
+ # except in certain documented contexts. The map keys, represented as UTF-8,
382
+ # must not exceed 1,500 bytes and cannot be empty. Field paths may be used in
383
+ # other contexts to refer to structured fields defined here. For `map_value`,
384
+ # the field path is represented by the simple or quoted field names of the
385
+ # containing fields, delimited by `.`. For example, the structured field `"foo" :
386
+ # ` map_value: ` "x&y" : ` string_value: "hello" ```` would be represented by
387
+ # the field path `foo.x&y`. Within a field path, a quoted field name starts and
388
+ # ends with `` ` `` and may contain any character. Some characters, including ``
389
+ # ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y`
390
+ # and `` `bak\`tik` `` represents `` bak`tik ``.
391
+ # Corresponds to the JSON property `fields`
392
+ # @return [Hash<String,Google::Apis::FirestoreV1beta1::Value>]
393
+ attr_accessor :fields
394
+
395
+ # The resource name of the document, for example `projects/`project_id`/
396
+ # databases/`database_id`/documents/`document_path``.
397
+ # Corresponds to the JSON property `name`
398
+ # @return [String]
399
+ attr_accessor :name
400
+
401
+ # Output only. The time at which the document was last changed. This value is
402
+ # initially set to the `create_time` then increases monotonically with each
403
+ # change to the document. It can also be compared to values from other documents
404
+ # and the `read_time` of a query.
405
+ # Corresponds to the JSON property `updateTime`
406
+ # @return [String]
407
+ attr_accessor :update_time
408
+
409
+ def initialize(**args)
410
+ update!(**args)
411
+ end
412
+
413
+ # Update properties of this object
414
+ def update!(**args)
415
+ @create_time = args[:create_time] if args.key?(:create_time)
416
+ @fields = args[:fields] if args.key?(:fields)
417
+ @name = args[:name] if args.key?(:name)
418
+ @update_time = args[:update_time] if args.key?(:update_time)
419
+ end
420
+ end
421
+
422
+ # A Document has changed. May be the result of multiple writes, including
423
+ # deletes, that ultimately resulted in a new value for the Document. Multiple
424
+ # DocumentChange messages may be returned for the same logical change, if
425
+ # multiple targets are affected.
426
+ class DocumentChange
427
+ include Google::Apis::Core::Hashable
428
+
429
+ # A Firestore document. Must not exceed 1 MiB - 4 bytes.
430
+ # Corresponds to the JSON property `document`
431
+ # @return [Google::Apis::FirestoreV1beta1::Document]
432
+ attr_accessor :document
433
+
434
+ # A set of target IDs for targets that no longer match this document.
435
+ # Corresponds to the JSON property `removedTargetIds`
436
+ # @return [Array<Fixnum>]
437
+ attr_accessor :removed_target_ids
438
+
439
+ # A set of target IDs of targets that match this document.
440
+ # Corresponds to the JSON property `targetIds`
441
+ # @return [Array<Fixnum>]
442
+ attr_accessor :target_ids
443
+
444
+ def initialize(**args)
445
+ update!(**args)
446
+ end
447
+
448
+ # Update properties of this object
449
+ def update!(**args)
450
+ @document = args[:document] if args.key?(:document)
451
+ @removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids)
452
+ @target_ids = args[:target_ids] if args.key?(:target_ids)
453
+ end
454
+ end
455
+
456
+ # A Document has been deleted. May be the result of multiple writes, including
457
+ # updates, the last of which deleted the Document. Multiple DocumentDelete
458
+ # messages may be returned for the same logical delete, if multiple targets are
459
+ # affected.
460
+ class DocumentDelete
461
+ include Google::Apis::Core::Hashable
462
+
463
+ # The resource name of the Document that was deleted.
464
+ # Corresponds to the JSON property `document`
465
+ # @return [String]
466
+ attr_accessor :document
467
+
468
+ # The read timestamp at which the delete was observed. Greater or equal to the `
469
+ # commit_time` of the delete.
470
+ # Corresponds to the JSON property `readTime`
471
+ # @return [String]
472
+ attr_accessor :read_time
473
+
474
+ # A set of target IDs for targets that previously matched this entity.
475
+ # Corresponds to the JSON property `removedTargetIds`
476
+ # @return [Array<Fixnum>]
477
+ attr_accessor :removed_target_ids
478
+
479
+ def initialize(**args)
480
+ update!(**args)
481
+ end
482
+
483
+ # Update properties of this object
484
+ def update!(**args)
485
+ @document = args[:document] if args.key?(:document)
486
+ @read_time = args[:read_time] if args.key?(:read_time)
487
+ @removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids)
488
+ end
489
+ end
490
+
491
+ # A set of field paths on a document. Used to restrict a get or update operation
492
+ # on a document to a subset of its fields. This is different from standard field
493
+ # masks, as this is always scoped to a Document, and takes in account the
494
+ # dynamic nature of Value.
495
+ class DocumentMask
496
+ include Google::Apis::Core::Hashable
497
+
498
+ # The list of field paths in the mask. See Document.fields for a field path
499
+ # syntax reference.
500
+ # Corresponds to the JSON property `fieldPaths`
501
+ # @return [Array<String>]
502
+ attr_accessor :field_paths
503
+
504
+ def initialize(**args)
505
+ update!(**args)
506
+ end
507
+
508
+ # Update properties of this object
509
+ def update!(**args)
510
+ @field_paths = args[:field_paths] if args.key?(:field_paths)
511
+ end
512
+ end
513
+
514
+ # A Document has been removed from the view of the targets. Sent if the document
515
+ # is no longer relevant to a target and is out of view. Can be sent instead of a
516
+ # DocumentDelete or a DocumentChange if the server can not send the new value of
517
+ # the document. Multiple DocumentRemove messages may be returned for the same
518
+ # logical write or delete, if multiple targets are affected.
519
+ class DocumentRemove
520
+ include Google::Apis::Core::Hashable
521
+
522
+ # The resource name of the Document that has gone out of view.
523
+ # Corresponds to the JSON property `document`
524
+ # @return [String]
525
+ attr_accessor :document
526
+
527
+ # The read timestamp at which the remove was observed. Greater or equal to the `
528
+ # commit_time` of the change/delete/remove.
529
+ # Corresponds to the JSON property `readTime`
530
+ # @return [String]
531
+ attr_accessor :read_time
532
+
533
+ # A set of target IDs for targets that previously matched this document.
534
+ # Corresponds to the JSON property `removedTargetIds`
535
+ # @return [Array<Fixnum>]
536
+ attr_accessor :removed_target_ids
537
+
538
+ def initialize(**args)
539
+ update!(**args)
540
+ end
541
+
542
+ # Update properties of this object
543
+ def update!(**args)
544
+ @document = args[:document] if args.key?(:document)
545
+ @read_time = args[:read_time] if args.key?(:read_time)
546
+ @removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids)
547
+ end
548
+ end
549
+
550
+ # A transformation of a document.
551
+ class DocumentTransform
552
+ include Google::Apis::Core::Hashable
553
+
554
+ # The name of the document to transform.
555
+ # Corresponds to the JSON property `document`
556
+ # @return [String]
557
+ attr_accessor :document
558
+
559
+ # The list of transformations to apply to the fields of the document, in order.
560
+ # This must not be empty.
561
+ # Corresponds to the JSON property `fieldTransforms`
562
+ # @return [Array<Google::Apis::FirestoreV1beta1::FieldTransform>]
563
+ attr_accessor :field_transforms
564
+
565
+ def initialize(**args)
566
+ update!(**args)
567
+ end
568
+
569
+ # Update properties of this object
570
+ def update!(**args)
571
+ @document = args[:document] if args.key?(:document)
572
+ @field_transforms = args[:field_transforms] if args.key?(:field_transforms)
573
+ end
574
+ end
575
+
576
+ # A target specified by a set of documents names.
577
+ class DocumentsTarget
578
+ include Google::Apis::Core::Hashable
579
+
580
+ # The names of the documents to retrieve. In the format: `projects/`project_id`/
581
+ # databases/`database_id`/documents/`document_path``. The request will fail if
582
+ # any of the document is not a child resource of the given `database`. Duplicate
583
+ # names will be elided.
584
+ # Corresponds to the JSON property `documents`
585
+ # @return [Array<String>]
586
+ attr_accessor :documents
587
+
588
+ def initialize(**args)
589
+ update!(**args)
590
+ end
591
+
592
+ # Update properties of this object
593
+ def update!(**args)
594
+ @documents = args[:documents] if args.key?(:documents)
595
+ end
596
+ end
597
+
598
+ # A generic empty message that you can re-use to avoid defining duplicated empty
599
+ # messages in your APIs. A typical example is to use it as the request or the
600
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
601
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
602
+ # `Empty` is empty JSON object ````.
603
+ class Empty
604
+ include Google::Apis::Core::Hashable
605
+
606
+ def initialize(**args)
607
+ update!(**args)
608
+ end
609
+
610
+ # Update properties of this object
611
+ def update!(**args)
612
+ end
613
+ end
614
+
615
+ # A digest of all the documents that match a given target.
616
+ class ExistenceFilter
617
+ include Google::Apis::Core::Hashable
618
+
619
+ # The total count of documents that match target_id. If different from the count
620
+ # of documents in the client that match, the client must manually determine
621
+ # which documents no longer match the target.
622
+ # Corresponds to the JSON property `count`
623
+ # @return [Fixnum]
624
+ attr_accessor :count
625
+
626
+ # The target ID to which this filter applies.
627
+ # Corresponds to the JSON property `targetId`
628
+ # @return [Fixnum]
629
+ attr_accessor :target_id
630
+
631
+ def initialize(**args)
632
+ update!(**args)
633
+ end
634
+
635
+ # Update properties of this object
636
+ def update!(**args)
637
+ @count = args[:count] if args.key?(:count)
638
+ @target_id = args[:target_id] if args.key?(:target_id)
639
+ end
640
+ end
641
+
642
+ # A filter on a specific field.
643
+ class FieldFilter
644
+ include Google::Apis::Core::Hashable
645
+
646
+ # A reference to a field, such as `max(messages.time) as max_time`.
647
+ # Corresponds to the JSON property `field`
648
+ # @return [Google::Apis::FirestoreV1beta1::FieldReference]
649
+ attr_accessor :field
650
+
651
+ # The operator to filter by.
652
+ # Corresponds to the JSON property `op`
653
+ # @return [String]
654
+ attr_accessor :op
655
+
656
+ # A message that can hold any of the supported value types.
657
+ # Corresponds to the JSON property `value`
658
+ # @return [Google::Apis::FirestoreV1beta1::Value]
659
+ attr_accessor :value
660
+
661
+ def initialize(**args)
662
+ update!(**args)
663
+ end
664
+
665
+ # Update properties of this object
666
+ def update!(**args)
667
+ @field = args[:field] if args.key?(:field)
668
+ @op = args[:op] if args.key?(:op)
669
+ @value = args[:value] if args.key?(:value)
670
+ end
671
+ end
672
+
673
+ # A reference to a field, such as `max(messages.time) as max_time`.
674
+ class FieldReference
675
+ include Google::Apis::Core::Hashable
676
+
677
+ #
678
+ # Corresponds to the JSON property `fieldPath`
679
+ # @return [String]
680
+ attr_accessor :field_path
681
+
682
+ def initialize(**args)
683
+ update!(**args)
684
+ end
685
+
686
+ # Update properties of this object
687
+ def update!(**args)
688
+ @field_path = args[:field_path] if args.key?(:field_path)
689
+ end
690
+ end
691
+
692
+ # A transformation of a field of the document.
693
+ class FieldTransform
694
+ include Google::Apis::Core::Hashable
695
+
696
+ # An array value.
697
+ # Corresponds to the JSON property `appendMissingElements`
698
+ # @return [Google::Apis::FirestoreV1beta1::ArrayValue]
699
+ attr_accessor :append_missing_elements
700
+
701
+ # The path of the field. See Document.fields for the field path syntax reference.
702
+ # Corresponds to the JSON property `fieldPath`
703
+ # @return [String]
704
+ attr_accessor :field_path
705
+
706
+ # A message that can hold any of the supported value types.
707
+ # Corresponds to the JSON property `increment`
708
+ # @return [Google::Apis::FirestoreV1beta1::Value]
709
+ attr_accessor :increment
710
+
711
+ # A message that can hold any of the supported value types.
712
+ # Corresponds to the JSON property `maximum`
713
+ # @return [Google::Apis::FirestoreV1beta1::Value]
714
+ attr_accessor :maximum
715
+
716
+ # A message that can hold any of the supported value types.
717
+ # Corresponds to the JSON property `minimum`
718
+ # @return [Google::Apis::FirestoreV1beta1::Value]
719
+ attr_accessor :minimum
720
+
721
+ # An array value.
722
+ # Corresponds to the JSON property `removeAllFromArray`
723
+ # @return [Google::Apis::FirestoreV1beta1::ArrayValue]
724
+ attr_accessor :remove_all_from_array
725
+
726
+ # Sets the field to the given server value.
727
+ # Corresponds to the JSON property `setToServerValue`
728
+ # @return [String]
729
+ attr_accessor :set_to_server_value
730
+
731
+ def initialize(**args)
732
+ update!(**args)
733
+ end
734
+
735
+ # Update properties of this object
736
+ def update!(**args)
737
+ @append_missing_elements = args[:append_missing_elements] if args.key?(:append_missing_elements)
738
+ @field_path = args[:field_path] if args.key?(:field_path)
739
+ @increment = args[:increment] if args.key?(:increment)
740
+ @maximum = args[:maximum] if args.key?(:maximum)
741
+ @minimum = args[:minimum] if args.key?(:minimum)
742
+ @remove_all_from_array = args[:remove_all_from_array] if args.key?(:remove_all_from_array)
743
+ @set_to_server_value = args[:set_to_server_value] if args.key?(:set_to_server_value)
744
+ end
745
+ end
746
+
747
+ # A filter.
748
+ class Filter
749
+ include Google::Apis::Core::Hashable
750
+
751
+ # A filter that merges multiple other filters using the given operator.
752
+ # Corresponds to the JSON property `compositeFilter`
753
+ # @return [Google::Apis::FirestoreV1beta1::CompositeFilter]
754
+ attr_accessor :composite_filter
755
+
756
+ # A filter on a specific field.
757
+ # Corresponds to the JSON property `fieldFilter`
758
+ # @return [Google::Apis::FirestoreV1beta1::FieldFilter]
759
+ attr_accessor :field_filter
760
+
761
+ # A filter with a single operand.
762
+ # Corresponds to the JSON property `unaryFilter`
763
+ # @return [Google::Apis::FirestoreV1beta1::UnaryFilter]
764
+ attr_accessor :unary_filter
765
+
766
+ def initialize(**args)
767
+ update!(**args)
768
+ end
769
+
770
+ # Update properties of this object
771
+ def update!(**args)
772
+ @composite_filter = args[:composite_filter] if args.key?(:composite_filter)
773
+ @field_filter = args[:field_filter] if args.key?(:field_filter)
774
+ @unary_filter = args[:unary_filter] if args.key?(:unary_filter)
775
+ end
776
+ end
777
+
778
+ # Metadata for ExportDocuments operations.
779
+ class GoogleFirestoreAdminV1beta1ExportDocumentsMetadata
780
+ include Google::Apis::Core::Hashable
781
+
782
+ # Which collection ids are being exported.
783
+ # Corresponds to the JSON property `collectionIds`
784
+ # @return [Array<String>]
785
+ attr_accessor :collection_ids
786
+
787
+ # The time the operation ended, either successfully or otherwise. Unset if the
788
+ # operation is still active.
789
+ # Corresponds to the JSON property `endTime`
790
+ # @return [String]
791
+ attr_accessor :end_time
792
+
793
+ # The state of the export operation.
794
+ # Corresponds to the JSON property `operationState`
795
+ # @return [String]
796
+ attr_accessor :operation_state
797
+
798
+ # Where the entities are being exported to.
799
+ # Corresponds to the JSON property `outputUriPrefix`
800
+ # @return [String]
801
+ attr_accessor :output_uri_prefix
802
+
803
+ # Measures the progress of a particular metric.
804
+ # Corresponds to the JSON property `progressBytes`
805
+ # @return [Google::Apis::FirestoreV1beta1::GoogleFirestoreAdminV1beta1Progress]
806
+ attr_accessor :progress_bytes
807
+
808
+ # Measures the progress of a particular metric.
809
+ # Corresponds to the JSON property `progressDocuments`
810
+ # @return [Google::Apis::FirestoreV1beta1::GoogleFirestoreAdminV1beta1Progress]
811
+ attr_accessor :progress_documents
812
+
813
+ # The time that work began on the operation.
814
+ # Corresponds to the JSON property `startTime`
815
+ # @return [String]
816
+ attr_accessor :start_time
817
+
818
+ def initialize(**args)
819
+ update!(**args)
820
+ end
821
+
822
+ # Update properties of this object
823
+ def update!(**args)
824
+ @collection_ids = args[:collection_ids] if args.key?(:collection_ids)
825
+ @end_time = args[:end_time] if args.key?(:end_time)
826
+ @operation_state = args[:operation_state] if args.key?(:operation_state)
827
+ @output_uri_prefix = args[:output_uri_prefix] if args.key?(:output_uri_prefix)
828
+ @progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
829
+ @progress_documents = args[:progress_documents] if args.key?(:progress_documents)
830
+ @start_time = args[:start_time] if args.key?(:start_time)
831
+ end
832
+ end
833
+
834
+ # The request for FirestoreAdmin.ExportDocuments.
835
+ class GoogleFirestoreAdminV1beta1ExportDocumentsRequest
836
+ include Google::Apis::Core::Hashable
837
+
838
+ # Which collection ids to export. Unspecified means all collections.
839
+ # Corresponds to the JSON property `collectionIds`
840
+ # @return [Array<String>]
841
+ attr_accessor :collection_ids
842
+
843
+ # The output URI. Currently only supports Google Cloud Storage URIs of the form:
844
+ # `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the
845
+ # Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional Google Cloud
846
+ # Storage namespace path. When choosing a name, be sure to consider Google Cloud
847
+ # Storage naming guidelines: https://cloud.google.com/storage/docs/naming. If
848
+ # the URI is a bucket (without a namespace path), a prefix will be generated
849
+ # based on the start time.
850
+ # Corresponds to the JSON property `outputUriPrefix`
851
+ # @return [String]
852
+ attr_accessor :output_uri_prefix
853
+
854
+ def initialize(**args)
855
+ update!(**args)
856
+ end
857
+
858
+ # Update properties of this object
859
+ def update!(**args)
860
+ @collection_ids = args[:collection_ids] if args.key?(:collection_ids)
861
+ @output_uri_prefix = args[:output_uri_prefix] if args.key?(:output_uri_prefix)
862
+ end
863
+ end
864
+
865
+ # Returned in the google.longrunning.Operation response field.
866
+ class GoogleFirestoreAdminV1beta1ExportDocumentsResponse
867
+ include Google::Apis::Core::Hashable
868
+
869
+ # Location of the output files. This can be used to begin an import into Cloud
870
+ # Firestore (this project or another project) after the operation completes
871
+ # successfully.
872
+ # Corresponds to the JSON property `outputUriPrefix`
873
+ # @return [String]
874
+ attr_accessor :output_uri_prefix
875
+
876
+ def initialize(**args)
877
+ update!(**args)
878
+ end
879
+
880
+ # Update properties of this object
881
+ def update!(**args)
882
+ @output_uri_prefix = args[:output_uri_prefix] if args.key?(:output_uri_prefix)
883
+ end
884
+ end
885
+
886
+ # Metadata for ImportDocuments operations.
887
+ class GoogleFirestoreAdminV1beta1ImportDocumentsMetadata
888
+ include Google::Apis::Core::Hashable
889
+
890
+ # Which collection ids are being imported.
891
+ # Corresponds to the JSON property `collectionIds`
892
+ # @return [Array<String>]
893
+ attr_accessor :collection_ids
894
+
895
+ # The time the operation ended, either successfully or otherwise. Unset if the
896
+ # operation is still active.
897
+ # Corresponds to the JSON property `endTime`
898
+ # @return [String]
899
+ attr_accessor :end_time
900
+
901
+ # The location of the documents being imported.
902
+ # Corresponds to the JSON property `inputUriPrefix`
903
+ # @return [String]
904
+ attr_accessor :input_uri_prefix
905
+
906
+ # The state of the import operation.
907
+ # Corresponds to the JSON property `operationState`
908
+ # @return [String]
909
+ attr_accessor :operation_state
910
+
911
+ # Measures the progress of a particular metric.
912
+ # Corresponds to the JSON property `progressBytes`
913
+ # @return [Google::Apis::FirestoreV1beta1::GoogleFirestoreAdminV1beta1Progress]
914
+ attr_accessor :progress_bytes
915
+
916
+ # Measures the progress of a particular metric.
917
+ # Corresponds to the JSON property `progressDocuments`
918
+ # @return [Google::Apis::FirestoreV1beta1::GoogleFirestoreAdminV1beta1Progress]
919
+ attr_accessor :progress_documents
920
+
921
+ # The time that work began on the operation.
922
+ # Corresponds to the JSON property `startTime`
923
+ # @return [String]
924
+ attr_accessor :start_time
925
+
926
+ def initialize(**args)
927
+ update!(**args)
928
+ end
929
+
930
+ # Update properties of this object
931
+ def update!(**args)
932
+ @collection_ids = args[:collection_ids] if args.key?(:collection_ids)
933
+ @end_time = args[:end_time] if args.key?(:end_time)
934
+ @input_uri_prefix = args[:input_uri_prefix] if args.key?(:input_uri_prefix)
935
+ @operation_state = args[:operation_state] if args.key?(:operation_state)
936
+ @progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
937
+ @progress_documents = args[:progress_documents] if args.key?(:progress_documents)
938
+ @start_time = args[:start_time] if args.key?(:start_time)
939
+ end
940
+ end
941
+
942
+ # The request for FirestoreAdmin.ImportDocuments.
943
+ class GoogleFirestoreAdminV1beta1ImportDocumentsRequest
944
+ include Google::Apis::Core::Hashable
945
+
946
+ # Which collection ids to import. Unspecified means all collections included in
947
+ # the import.
948
+ # Corresponds to the JSON property `collectionIds`
949
+ # @return [Array<String>]
950
+ attr_accessor :collection_ids
951
+
952
+ # Location of the exported files. This must match the output_uri_prefix of an
953
+ # ExportDocumentsResponse from an export that has completed successfully. See:
954
+ # google.firestore.admin.v1beta1.ExportDocumentsResponse.output_uri_prefix.
955
+ # Corresponds to the JSON property `inputUriPrefix`
956
+ # @return [String]
957
+ attr_accessor :input_uri_prefix
958
+
959
+ def initialize(**args)
960
+ update!(**args)
961
+ end
962
+
963
+ # Update properties of this object
964
+ def update!(**args)
965
+ @collection_ids = args[:collection_ids] if args.key?(:collection_ids)
966
+ @input_uri_prefix = args[:input_uri_prefix] if args.key?(:input_uri_prefix)
967
+ end
968
+ end
969
+
970
+ # An index definition.
971
+ class GoogleFirestoreAdminV1beta1Index
972
+ include Google::Apis::Core::Hashable
973
+
974
+ # The collection ID to which this index applies. Required.
975
+ # Corresponds to the JSON property `collectionId`
976
+ # @return [String]
977
+ attr_accessor :collection_id
978
+
979
+ # The fields to index.
980
+ # Corresponds to the JSON property `fields`
981
+ # @return [Array<Google::Apis::FirestoreV1beta1::GoogleFirestoreAdminV1beta1IndexField>]
982
+ attr_accessor :fields
983
+
984
+ # The resource name of the index. Output only.
985
+ # Corresponds to the JSON property `name`
986
+ # @return [String]
987
+ attr_accessor :name
988
+
989
+ # The state of the index. Output only.
990
+ # Corresponds to the JSON property `state`
991
+ # @return [String]
992
+ attr_accessor :state
993
+
994
+ def initialize(**args)
995
+ update!(**args)
996
+ end
997
+
998
+ # Update properties of this object
999
+ def update!(**args)
1000
+ @collection_id = args[:collection_id] if args.key?(:collection_id)
1001
+ @fields = args[:fields] if args.key?(:fields)
1002
+ @name = args[:name] if args.key?(:name)
1003
+ @state = args[:state] if args.key?(:state)
1004
+ end
1005
+ end
1006
+
1007
+ # A field of an index.
1008
+ class GoogleFirestoreAdminV1beta1IndexField
1009
+ include Google::Apis::Core::Hashable
1010
+
1011
+ # The path of the field. Must match the field path specification described by
1012
+ # google.firestore.v1beta1.Document.fields. Special field path `__name__` may be
1013
+ # used by itself or at the end of a path. `__type__` may be used only at the end
1014
+ # of path.
1015
+ # Corresponds to the JSON property `fieldPath`
1016
+ # @return [String]
1017
+ attr_accessor :field_path
1018
+
1019
+ # The field's mode.
1020
+ # Corresponds to the JSON property `mode`
1021
+ # @return [String]
1022
+ attr_accessor :mode
1023
+
1024
+ def initialize(**args)
1025
+ update!(**args)
1026
+ end
1027
+
1028
+ # Update properties of this object
1029
+ def update!(**args)
1030
+ @field_path = args[:field_path] if args.key?(:field_path)
1031
+ @mode = args[:mode] if args.key?(:mode)
1032
+ end
1033
+ end
1034
+
1035
+ # Metadata for index operations. This metadata populates the metadata field of
1036
+ # google.longrunning.Operation.
1037
+ class GoogleFirestoreAdminV1beta1IndexOperationMetadata
1038
+ include Google::Apis::Core::Hashable
1039
+
1040
+ # True if the [google.longrunning.Operation] was cancelled. If the cancellation
1041
+ # is in progress, cancelled will be true but google.longrunning.Operation.done
1042
+ # will be false.
1043
+ # Corresponds to the JSON property `cancelled`
1044
+ # @return [Boolean]
1045
+ attr_accessor :cancelled
1046
+ alias_method :cancelled?, :cancelled
1047
+
1048
+ # Measures the progress of a particular metric.
1049
+ # Corresponds to the JSON property `documentProgress`
1050
+ # @return [Google::Apis::FirestoreV1beta1::GoogleFirestoreAdminV1beta1Progress]
1051
+ attr_accessor :document_progress
1052
+
1053
+ # The time the operation ended, either successfully or otherwise. Unset if the
1054
+ # operation is still active.
1055
+ # Corresponds to the JSON property `endTime`
1056
+ # @return [String]
1057
+ attr_accessor :end_time
1058
+
1059
+ # The index resource that this operation is acting on. For example: `projects/`
1060
+ # project_id`/databases/`database_id`/indexes/`index_id``
1061
+ # Corresponds to the JSON property `index`
1062
+ # @return [String]
1063
+ attr_accessor :index
1064
+
1065
+ # The type of index operation.
1066
+ # Corresponds to the JSON property `operationType`
1067
+ # @return [String]
1068
+ attr_accessor :operation_type
1069
+
1070
+ # The time that work began on the operation.
1071
+ # Corresponds to the JSON property `startTime`
1072
+ # @return [String]
1073
+ attr_accessor :start_time
1074
+
1075
+ def initialize(**args)
1076
+ update!(**args)
1077
+ end
1078
+
1079
+ # Update properties of this object
1080
+ def update!(**args)
1081
+ @cancelled = args[:cancelled] if args.key?(:cancelled)
1082
+ @document_progress = args[:document_progress] if args.key?(:document_progress)
1083
+ @end_time = args[:end_time] if args.key?(:end_time)
1084
+ @index = args[:index] if args.key?(:index)
1085
+ @operation_type = args[:operation_type] if args.key?(:operation_type)
1086
+ @start_time = args[:start_time] if args.key?(:start_time)
1087
+ end
1088
+ end
1089
+
1090
+ # The response for FirestoreAdmin.ListIndexes.
1091
+ class GoogleFirestoreAdminV1beta1ListIndexesResponse
1092
+ include Google::Apis::Core::Hashable
1093
+
1094
+ # The indexes.
1095
+ # Corresponds to the JSON property `indexes`
1096
+ # @return [Array<Google::Apis::FirestoreV1beta1::GoogleFirestoreAdminV1beta1Index>]
1097
+ attr_accessor :indexes
1098
+
1099
+ # The standard List next-page token.
1100
+ # Corresponds to the JSON property `nextPageToken`
1101
+ # @return [String]
1102
+ attr_accessor :next_page_token
1103
+
1104
+ def initialize(**args)
1105
+ update!(**args)
1106
+ end
1107
+
1108
+ # Update properties of this object
1109
+ def update!(**args)
1110
+ @indexes = args[:indexes] if args.key?(:indexes)
1111
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1112
+ end
1113
+ end
1114
+
1115
+ # The metadata message for google.cloud.location.Location.metadata.
1116
+ class GoogleFirestoreAdminV1beta1LocationMetadata
1117
+ include Google::Apis::Core::Hashable
1118
+
1119
+ def initialize(**args)
1120
+ update!(**args)
1121
+ end
1122
+
1123
+ # Update properties of this object
1124
+ def update!(**args)
1125
+ end
1126
+ end
1127
+
1128
+ # Measures the progress of a particular metric.
1129
+ class GoogleFirestoreAdminV1beta1Progress
1130
+ include Google::Apis::Core::Hashable
1131
+
1132
+ # An estimate of how much work has been completed. Note that this may be greater
1133
+ # than `work_estimated`.
1134
+ # Corresponds to the JSON property `workCompleted`
1135
+ # @return [Fixnum]
1136
+ attr_accessor :work_completed
1137
+
1138
+ # An estimate of how much work needs to be performed. Zero if the work estimate
1139
+ # is unavailable. May change as work progresses.
1140
+ # Corresponds to the JSON property `workEstimated`
1141
+ # @return [Fixnum]
1142
+ attr_accessor :work_estimated
1143
+
1144
+ def initialize(**args)
1145
+ update!(**args)
1146
+ end
1147
+
1148
+ # Update properties of this object
1149
+ def update!(**args)
1150
+ @work_completed = args[:work_completed] if args.key?(:work_completed)
1151
+ @work_estimated = args[:work_estimated] if args.key?(:work_estimated)
1152
+ end
1153
+ end
1154
+
1155
+ # This resource represents a long-running operation that is the result of a
1156
+ # network API call.
1157
+ class GoogleLongrunningOperation
1158
+ include Google::Apis::Core::Hashable
1159
+
1160
+ # If the value is `false`, it means the operation is still in progress. If `true`
1161
+ # , the operation is completed, and either `error` or `response` is available.
1162
+ # Corresponds to the JSON property `done`
1163
+ # @return [Boolean]
1164
+ attr_accessor :done
1165
+ alias_method :done?, :done
1166
+
1167
+ # The `Status` type defines a logical error model that is suitable for different
1168
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1169
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1170
+ # data: error code, error message, and error details. You can find out more
1171
+ # about this error model and how to work with it in the [API Design Guide](https:
1172
+ # //cloud.google.com/apis/design/errors).
1173
+ # Corresponds to the JSON property `error`
1174
+ # @return [Google::Apis::FirestoreV1beta1::Status]
1175
+ attr_accessor :error
1176
+
1177
+ # Service-specific metadata associated with the operation. It typically contains
1178
+ # progress information and common metadata such as create time. Some services
1179
+ # might not provide such metadata. Any method that returns a long-running
1180
+ # operation should document the metadata type, if any.
1181
+ # Corresponds to the JSON property `metadata`
1182
+ # @return [Hash<String,Object>]
1183
+ attr_accessor :metadata
1184
+
1185
+ # The server-assigned name, which is only unique within the same service that
1186
+ # originally returns it. If you use the default HTTP mapping, the `name` should
1187
+ # be a resource name ending with `operations/`unique_id``.
1188
+ # Corresponds to the JSON property `name`
1189
+ # @return [String]
1190
+ attr_accessor :name
1191
+
1192
+ # The normal response of the operation in case of success. If the original
1193
+ # method returns no data on success, such as `Delete`, the response is `google.
1194
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
1195
+ # the response should be the resource. For other methods, the response should
1196
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
1197
+ # example, if the original method name is `TakeSnapshot()`, the inferred
1198
+ # response type is `TakeSnapshotResponse`.
1199
+ # Corresponds to the JSON property `response`
1200
+ # @return [Hash<String,Object>]
1201
+ attr_accessor :response
1202
+
1203
+ def initialize(**args)
1204
+ update!(**args)
1205
+ end
1206
+
1207
+ # Update properties of this object
1208
+ def update!(**args)
1209
+ @done = args[:done] if args.key?(:done)
1210
+ @error = args[:error] if args.key?(:error)
1211
+ @metadata = args[:metadata] if args.key?(:metadata)
1212
+ @name = args[:name] if args.key?(:name)
1213
+ @response = args[:response] if args.key?(:response)
1214
+ end
1215
+ end
1216
+
1217
+ # An object that represents a latitude/longitude pair. This is expressed as a
1218
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
1219
+ # specified otherwise, this must conform to the WGS84 standard. Values must be
1220
+ # within normalized ranges.
1221
+ class LatLng
1222
+ include Google::Apis::Core::Hashable
1223
+
1224
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1225
+ # Corresponds to the JSON property `latitude`
1226
+ # @return [Float]
1227
+ attr_accessor :latitude
1228
+
1229
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1230
+ # Corresponds to the JSON property `longitude`
1231
+ # @return [Float]
1232
+ attr_accessor :longitude
1233
+
1234
+ def initialize(**args)
1235
+ update!(**args)
1236
+ end
1237
+
1238
+ # Update properties of this object
1239
+ def update!(**args)
1240
+ @latitude = args[:latitude] if args.key?(:latitude)
1241
+ @longitude = args[:longitude] if args.key?(:longitude)
1242
+ end
1243
+ end
1244
+
1245
+ # The request for Firestore.ListCollectionIds.
1246
+ class ListCollectionIdsRequest
1247
+ include Google::Apis::Core::Hashable
1248
+
1249
+ # The maximum number of results to return.
1250
+ # Corresponds to the JSON property `pageSize`
1251
+ # @return [Fixnum]
1252
+ attr_accessor :page_size
1253
+
1254
+ # A page token. Must be a value from ListCollectionIdsResponse.
1255
+ # Corresponds to the JSON property `pageToken`
1256
+ # @return [String]
1257
+ attr_accessor :page_token
1258
+
1259
+ def initialize(**args)
1260
+ update!(**args)
1261
+ end
1262
+
1263
+ # Update properties of this object
1264
+ def update!(**args)
1265
+ @page_size = args[:page_size] if args.key?(:page_size)
1266
+ @page_token = args[:page_token] if args.key?(:page_token)
1267
+ end
1268
+ end
1269
+
1270
+ # The response from Firestore.ListCollectionIds.
1271
+ class ListCollectionIdsResponse
1272
+ include Google::Apis::Core::Hashable
1273
+
1274
+ # The collection ids.
1275
+ # Corresponds to the JSON property `collectionIds`
1276
+ # @return [Array<String>]
1277
+ attr_accessor :collection_ids
1278
+
1279
+ # A page token that may be used to continue the list.
1280
+ # Corresponds to the JSON property `nextPageToken`
1281
+ # @return [String]
1282
+ attr_accessor :next_page_token
1283
+
1284
+ def initialize(**args)
1285
+ update!(**args)
1286
+ end
1287
+
1288
+ # Update properties of this object
1289
+ def update!(**args)
1290
+ @collection_ids = args[:collection_ids] if args.key?(:collection_ids)
1291
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1292
+ end
1293
+ end
1294
+
1295
+ # The response for Firestore.ListDocuments.
1296
+ class ListDocumentsResponse
1297
+ include Google::Apis::Core::Hashable
1298
+
1299
+ # The Documents found.
1300
+ # Corresponds to the JSON property `documents`
1301
+ # @return [Array<Google::Apis::FirestoreV1beta1::Document>]
1302
+ attr_accessor :documents
1303
+
1304
+ # The next page token.
1305
+ # Corresponds to the JSON property `nextPageToken`
1306
+ # @return [String]
1307
+ attr_accessor :next_page_token
1308
+
1309
+ def initialize(**args)
1310
+ update!(**args)
1311
+ end
1312
+
1313
+ # Update properties of this object
1314
+ def update!(**args)
1315
+ @documents = args[:documents] if args.key?(:documents)
1316
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1317
+ end
1318
+ end
1319
+
1320
+ # A request for Firestore.Listen
1321
+ class ListenRequest
1322
+ include Google::Apis::Core::Hashable
1323
+
1324
+ # A specification of a set of documents to listen to.
1325
+ # Corresponds to the JSON property `addTarget`
1326
+ # @return [Google::Apis::FirestoreV1beta1::Target]
1327
+ attr_accessor :add_target
1328
+
1329
+ # Labels associated with this target change.
1330
+ # Corresponds to the JSON property `labels`
1331
+ # @return [Hash<String,String>]
1332
+ attr_accessor :labels
1333
+
1334
+ # The ID of a target to remove from this stream.
1335
+ # Corresponds to the JSON property `removeTarget`
1336
+ # @return [Fixnum]
1337
+ attr_accessor :remove_target
1338
+
1339
+ def initialize(**args)
1340
+ update!(**args)
1341
+ end
1342
+
1343
+ # Update properties of this object
1344
+ def update!(**args)
1345
+ @add_target = args[:add_target] if args.key?(:add_target)
1346
+ @labels = args[:labels] if args.key?(:labels)
1347
+ @remove_target = args[:remove_target] if args.key?(:remove_target)
1348
+ end
1349
+ end
1350
+
1351
+ # The response for Firestore.Listen.
1352
+ class ListenResponse
1353
+ include Google::Apis::Core::Hashable
1354
+
1355
+ # A Document has changed. May be the result of multiple writes, including
1356
+ # deletes, that ultimately resulted in a new value for the Document. Multiple
1357
+ # DocumentChange messages may be returned for the same logical change, if
1358
+ # multiple targets are affected.
1359
+ # Corresponds to the JSON property `documentChange`
1360
+ # @return [Google::Apis::FirestoreV1beta1::DocumentChange]
1361
+ attr_accessor :document_change
1362
+
1363
+ # A Document has been deleted. May be the result of multiple writes, including
1364
+ # updates, the last of which deleted the Document. Multiple DocumentDelete
1365
+ # messages may be returned for the same logical delete, if multiple targets are
1366
+ # affected.
1367
+ # Corresponds to the JSON property `documentDelete`
1368
+ # @return [Google::Apis::FirestoreV1beta1::DocumentDelete]
1369
+ attr_accessor :document_delete
1370
+
1371
+ # A Document has been removed from the view of the targets. Sent if the document
1372
+ # is no longer relevant to a target and is out of view. Can be sent instead of a
1373
+ # DocumentDelete or a DocumentChange if the server can not send the new value of
1374
+ # the document. Multiple DocumentRemove messages may be returned for the same
1375
+ # logical write or delete, if multiple targets are affected.
1376
+ # Corresponds to the JSON property `documentRemove`
1377
+ # @return [Google::Apis::FirestoreV1beta1::DocumentRemove]
1378
+ attr_accessor :document_remove
1379
+
1380
+ # A digest of all the documents that match a given target.
1381
+ # Corresponds to the JSON property `filter`
1382
+ # @return [Google::Apis::FirestoreV1beta1::ExistenceFilter]
1383
+ attr_accessor :filter
1384
+
1385
+ # Targets being watched have changed.
1386
+ # Corresponds to the JSON property `targetChange`
1387
+ # @return [Google::Apis::FirestoreV1beta1::TargetChange]
1388
+ attr_accessor :target_change
1389
+
1390
+ def initialize(**args)
1391
+ update!(**args)
1392
+ end
1393
+
1394
+ # Update properties of this object
1395
+ def update!(**args)
1396
+ @document_change = args[:document_change] if args.key?(:document_change)
1397
+ @document_delete = args[:document_delete] if args.key?(:document_delete)
1398
+ @document_remove = args[:document_remove] if args.key?(:document_remove)
1399
+ @filter = args[:filter] if args.key?(:filter)
1400
+ @target_change = args[:target_change] if args.key?(:target_change)
1401
+ end
1402
+ end
1403
+
1404
+ # A map value.
1405
+ class MapValue
1406
+ include Google::Apis::Core::Hashable
1407
+
1408
+ # The map's fields. The map keys represent field names. Field names matching the
1409
+ # regular expression `__.*__` are reserved. Reserved field names are forbidden
1410
+ # except in certain documented contexts. The map keys, represented as UTF-8,
1411
+ # must not exceed 1,500 bytes and cannot be empty.
1412
+ # Corresponds to the JSON property `fields`
1413
+ # @return [Hash<String,Google::Apis::FirestoreV1beta1::Value>]
1414
+ attr_accessor :fields
1415
+
1416
+ def initialize(**args)
1417
+ update!(**args)
1418
+ end
1419
+
1420
+ # Update properties of this object
1421
+ def update!(**args)
1422
+ @fields = args[:fields] if args.key?(:fields)
1423
+ end
1424
+ end
1425
+
1426
+ # An order on a field.
1427
+ class Order
1428
+ include Google::Apis::Core::Hashable
1429
+
1430
+ # The direction to order by. Defaults to `ASCENDING`.
1431
+ # Corresponds to the JSON property `direction`
1432
+ # @return [String]
1433
+ attr_accessor :direction
1434
+
1435
+ # A reference to a field, such as `max(messages.time) as max_time`.
1436
+ # Corresponds to the JSON property `field`
1437
+ # @return [Google::Apis::FirestoreV1beta1::FieldReference]
1438
+ attr_accessor :field
1439
+
1440
+ def initialize(**args)
1441
+ update!(**args)
1442
+ end
1443
+
1444
+ # Update properties of this object
1445
+ def update!(**args)
1446
+ @direction = args[:direction] if args.key?(:direction)
1447
+ @field = args[:field] if args.key?(:field)
1448
+ end
1449
+ end
1450
+
1451
+ # The request for Firestore.PartitionQuery.
1452
+ class PartitionQueryRequest
1453
+ include Google::Apis::Core::Hashable
1454
+
1455
+ # The maximum number of partitions to return in this call, subject to `
1456
+ # partition_count`. For example, if `partition_count` = 10 and `page_size` = 8,
1457
+ # the first call to PartitionQuery will return up to 8 partitions and a `
1458
+ # next_page_token` if more results exist. A second call to PartitionQuery will
1459
+ # return up to 2 partitions, to complete the total of 10 specified in `
1460
+ # partition_count`.
1461
+ # Corresponds to the JSON property `pageSize`
1462
+ # @return [Fixnum]
1463
+ attr_accessor :page_size
1464
+
1465
+ # The `next_page_token` value returned from a previous call to PartitionQuery
1466
+ # that may be used to get an additional set of results. There are no ordering
1467
+ # guarantees between sets of results. Thus, using multiple sets of results will
1468
+ # require merging the different result sets. For example, two subsequent calls
1469
+ # using a page_token may return: * cursor B, cursor M, cursor Q * cursor A,
1470
+ # cursor U, cursor W To obtain a complete result set ordered with respect to the
1471
+ # results of the query supplied to PartitionQuery, the results sets should be
1472
+ # merged: cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
1473
+ # Corresponds to the JSON property `pageToken`
1474
+ # @return [String]
1475
+ attr_accessor :page_token
1476
+
1477
+ # The desired maximum number of partition points. The partitions may be returned
1478
+ # across multiple pages of results. The number must be positive. The actual
1479
+ # number of partitions returned may be fewer. For example, this may be set to
1480
+ # one fewer than the number of parallel queries to be run, or in running a data
1481
+ # pipeline job, one fewer than the number of workers or compute instances
1482
+ # available.
1483
+ # Corresponds to the JSON property `partitionCount`
1484
+ # @return [Fixnum]
1485
+ attr_accessor :partition_count
1486
+
1487
+ # A Firestore query.
1488
+ # Corresponds to the JSON property `structuredQuery`
1489
+ # @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
1490
+ attr_accessor :structured_query
1491
+
1492
+ def initialize(**args)
1493
+ update!(**args)
1494
+ end
1495
+
1496
+ # Update properties of this object
1497
+ def update!(**args)
1498
+ @page_size = args[:page_size] if args.key?(:page_size)
1499
+ @page_token = args[:page_token] if args.key?(:page_token)
1500
+ @partition_count = args[:partition_count] if args.key?(:partition_count)
1501
+ @structured_query = args[:structured_query] if args.key?(:structured_query)
1502
+ end
1503
+ end
1504
+
1505
+ # The response for Firestore.PartitionQuery.
1506
+ class PartitionQueryResponse
1507
+ include Google::Apis::Core::Hashable
1508
+
1509
+ # A page token that may be used to request an additional set of results, up to
1510
+ # the number specified by `partition_count` in the PartitionQuery request. If
1511
+ # blank, there are no more results.
1512
+ # Corresponds to the JSON property `nextPageToken`
1513
+ # @return [String]
1514
+ attr_accessor :next_page_token
1515
+
1516
+ # Partition results. Each partition is a split point that can be used by
1517
+ # RunQuery as a starting or end point for the query results. The RunQuery
1518
+ # requests must be made with the same query supplied to this PartitionQuery
1519
+ # request. The partition cursors will be ordered according to same ordering as
1520
+ # the results of the query supplied to PartitionQuery. For example, if a
1521
+ # PartitionQuery request returns partition cursors A and B, running the
1522
+ # following three queries will return the entire result set of the original
1523
+ # query: * query, end_at A * query, start_at A, end_at B * query, start_at B An
1524
+ # empty result may indicate that the query has too few results to be partitioned.
1525
+ # Corresponds to the JSON property `partitions`
1526
+ # @return [Array<Google::Apis::FirestoreV1beta1::Cursor>]
1527
+ attr_accessor :partitions
1528
+
1529
+ def initialize(**args)
1530
+ update!(**args)
1531
+ end
1532
+
1533
+ # Update properties of this object
1534
+ def update!(**args)
1535
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1536
+ @partitions = args[:partitions] if args.key?(:partitions)
1537
+ end
1538
+ end
1539
+
1540
+ # A precondition on a document, used for conditional operations.
1541
+ class Precondition
1542
+ include Google::Apis::Core::Hashable
1543
+
1544
+ # When set to `true`, the target document must exist. When set to `false`, the
1545
+ # target document must not exist.
1546
+ # Corresponds to the JSON property `exists`
1547
+ # @return [Boolean]
1548
+ attr_accessor :exists
1549
+ alias_method :exists?, :exists
1550
+
1551
+ # When set, the target document must exist and have been last updated at that
1552
+ # time.
1553
+ # Corresponds to the JSON property `updateTime`
1554
+ # @return [String]
1555
+ attr_accessor :update_time
1556
+
1557
+ def initialize(**args)
1558
+ update!(**args)
1559
+ end
1560
+
1561
+ # Update properties of this object
1562
+ def update!(**args)
1563
+ @exists = args[:exists] if args.key?(:exists)
1564
+ @update_time = args[:update_time] if args.key?(:update_time)
1565
+ end
1566
+ end
1567
+
1568
+ # The projection of document's fields to return.
1569
+ class Projection
1570
+ include Google::Apis::Core::Hashable
1571
+
1572
+ # The fields to return. If empty, all fields are returned. To only return the
1573
+ # name of the document, use `['__name__']`.
1574
+ # Corresponds to the JSON property `fields`
1575
+ # @return [Array<Google::Apis::FirestoreV1beta1::FieldReference>]
1576
+ attr_accessor :fields
1577
+
1578
+ def initialize(**args)
1579
+ update!(**args)
1580
+ end
1581
+
1582
+ # Update properties of this object
1583
+ def update!(**args)
1584
+ @fields = args[:fields] if args.key?(:fields)
1585
+ end
1586
+ end
1587
+
1588
+ # A target specified by a query.
1589
+ class QueryTarget
1590
+ include Google::Apis::Core::Hashable
1591
+
1592
+ # The parent resource name. In the format: `projects/`project_id`/databases/`
1593
+ # database_id`/documents` or `projects/`project_id`/databases/`database_id`/
1594
+ # documents/`document_path``. For example: `projects/my-project/databases/my-
1595
+ # database/documents` or `projects/my-project/databases/my-database/documents/
1596
+ # chatrooms/my-chatroom`
1597
+ # Corresponds to the JSON property `parent`
1598
+ # @return [String]
1599
+ attr_accessor :parent
1600
+
1601
+ # A Firestore query.
1602
+ # Corresponds to the JSON property `structuredQuery`
1603
+ # @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
1604
+ attr_accessor :structured_query
1605
+
1606
+ def initialize(**args)
1607
+ update!(**args)
1608
+ end
1609
+
1610
+ # Update properties of this object
1611
+ def update!(**args)
1612
+ @parent = args[:parent] if args.key?(:parent)
1613
+ @structured_query = args[:structured_query] if args.key?(:structured_query)
1614
+ end
1615
+ end
1616
+
1617
+ # Options for a transaction that can only be used to read documents.
1618
+ class ReadOnly
1619
+ include Google::Apis::Core::Hashable
1620
+
1621
+ # Reads documents at the given time. This may not be older than 60 seconds.
1622
+ # Corresponds to the JSON property `readTime`
1623
+ # @return [String]
1624
+ attr_accessor :read_time
1625
+
1626
+ def initialize(**args)
1627
+ update!(**args)
1628
+ end
1629
+
1630
+ # Update properties of this object
1631
+ def update!(**args)
1632
+ @read_time = args[:read_time] if args.key?(:read_time)
1633
+ end
1634
+ end
1635
+
1636
+ # Options for a transaction that can be used to read and write documents.
1637
+ class ReadWrite
1638
+ include Google::Apis::Core::Hashable
1639
+
1640
+ # An optional transaction to retry.
1641
+ # Corresponds to the JSON property `retryTransaction`
1642
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1643
+ # @return [String]
1644
+ attr_accessor :retry_transaction
1645
+
1646
+ def initialize(**args)
1647
+ update!(**args)
1648
+ end
1649
+
1650
+ # Update properties of this object
1651
+ def update!(**args)
1652
+ @retry_transaction = args[:retry_transaction] if args.key?(:retry_transaction)
1653
+ end
1654
+ end
1655
+
1656
+ # The request for Firestore.Rollback.
1657
+ class RollbackRequest
1658
+ include Google::Apis::Core::Hashable
1659
+
1660
+ # Required. The transaction to roll back.
1661
+ # Corresponds to the JSON property `transaction`
1662
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1663
+ # @return [String]
1664
+ attr_accessor :transaction
1665
+
1666
+ def initialize(**args)
1667
+ update!(**args)
1668
+ end
1669
+
1670
+ # Update properties of this object
1671
+ def update!(**args)
1672
+ @transaction = args[:transaction] if args.key?(:transaction)
1673
+ end
1674
+ end
1675
+
1676
+ # The request for Firestore.RunQuery.
1677
+ class RunQueryRequest
1678
+ include Google::Apis::Core::Hashable
1679
+
1680
+ # Options for creating a new transaction.
1681
+ # Corresponds to the JSON property `newTransaction`
1682
+ # @return [Google::Apis::FirestoreV1beta1::TransactionOptions]
1683
+ attr_accessor :new_transaction
1684
+
1685
+ # Reads documents as they were at the given time. This may not be older than 270
1686
+ # seconds.
1687
+ # Corresponds to the JSON property `readTime`
1688
+ # @return [String]
1689
+ attr_accessor :read_time
1690
+
1691
+ # A Firestore query.
1692
+ # Corresponds to the JSON property `structuredQuery`
1693
+ # @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
1694
+ attr_accessor :structured_query
1695
+
1696
+ # Reads documents in a transaction.
1697
+ # Corresponds to the JSON property `transaction`
1698
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1699
+ # @return [String]
1700
+ attr_accessor :transaction
1701
+
1702
+ def initialize(**args)
1703
+ update!(**args)
1704
+ end
1705
+
1706
+ # Update properties of this object
1707
+ def update!(**args)
1708
+ @new_transaction = args[:new_transaction] if args.key?(:new_transaction)
1709
+ @read_time = args[:read_time] if args.key?(:read_time)
1710
+ @structured_query = args[:structured_query] if args.key?(:structured_query)
1711
+ @transaction = args[:transaction] if args.key?(:transaction)
1712
+ end
1713
+ end
1714
+
1715
+ # The response for Firestore.RunQuery.
1716
+ class RunQueryResponse
1717
+ include Google::Apis::Core::Hashable
1718
+
1719
+ # A Firestore document. Must not exceed 1 MiB - 4 bytes.
1720
+ # Corresponds to the JSON property `document`
1721
+ # @return [Google::Apis::FirestoreV1beta1::Document]
1722
+ attr_accessor :document
1723
+
1724
+ # The time at which the document was read. This may be monotonically increasing;
1725
+ # in this case, the previous documents in the result stream are guaranteed not
1726
+ # to have changed between their `read_time` and this one. If the query returns
1727
+ # no results, a response with `read_time` and no `document` will be sent, and
1728
+ # this represents the time at which the query was run.
1729
+ # Corresponds to the JSON property `readTime`
1730
+ # @return [String]
1731
+ attr_accessor :read_time
1732
+
1733
+ # The number of results that have been skipped due to an offset between the last
1734
+ # response and the current response.
1735
+ # Corresponds to the JSON property `skippedResults`
1736
+ # @return [Fixnum]
1737
+ attr_accessor :skipped_results
1738
+
1739
+ # The transaction that was started as part of this request. Can only be set in
1740
+ # the first response, and only if RunQueryRequest.new_transaction was set in the
1741
+ # request. If set, no other fields will be set in this response.
1742
+ # Corresponds to the JSON property `transaction`
1743
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1744
+ # @return [String]
1745
+ attr_accessor :transaction
1746
+
1747
+ def initialize(**args)
1748
+ update!(**args)
1749
+ end
1750
+
1751
+ # Update properties of this object
1752
+ def update!(**args)
1753
+ @document = args[:document] if args.key?(:document)
1754
+ @read_time = args[:read_time] if args.key?(:read_time)
1755
+ @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
1756
+ @transaction = args[:transaction] if args.key?(:transaction)
1757
+ end
1758
+ end
1759
+
1760
+ # The `Status` type defines a logical error model that is suitable for different
1761
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1762
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1763
+ # data: error code, error message, and error details. You can find out more
1764
+ # about this error model and how to work with it in the [API Design Guide](https:
1765
+ # //cloud.google.com/apis/design/errors).
1766
+ class Status
1767
+ include Google::Apis::Core::Hashable
1768
+
1769
+ # The status code, which should be an enum value of google.rpc.Code.
1770
+ # Corresponds to the JSON property `code`
1771
+ # @return [Fixnum]
1772
+ attr_accessor :code
1773
+
1774
+ # A list of messages that carry the error details. There is a common set of
1775
+ # message types for APIs to use.
1776
+ # Corresponds to the JSON property `details`
1777
+ # @return [Array<Hash<String,Object>>]
1778
+ attr_accessor :details
1779
+
1780
+ # A developer-facing error message, which should be in English. Any user-facing
1781
+ # error message should be localized and sent in the google.rpc.Status.details
1782
+ # field, or localized by the client.
1783
+ # Corresponds to the JSON property `message`
1784
+ # @return [String]
1785
+ attr_accessor :message
1786
+
1787
+ def initialize(**args)
1788
+ update!(**args)
1789
+ end
1790
+
1791
+ # Update properties of this object
1792
+ def update!(**args)
1793
+ @code = args[:code] if args.key?(:code)
1794
+ @details = args[:details] if args.key?(:details)
1795
+ @message = args[:message] if args.key?(:message)
1796
+ end
1797
+ end
1798
+
1799
+ # A Firestore query.
1800
+ class StructuredQuery
1801
+ include Google::Apis::Core::Hashable
1802
+
1803
+ # A position in a query result set.
1804
+ # Corresponds to the JSON property `endAt`
1805
+ # @return [Google::Apis::FirestoreV1beta1::Cursor]
1806
+ attr_accessor :end_at
1807
+
1808
+ # The collections to query.
1809
+ # Corresponds to the JSON property `from`
1810
+ # @return [Array<Google::Apis::FirestoreV1beta1::CollectionSelector>]
1811
+ attr_accessor :from
1812
+
1813
+ # The maximum number of results to return. Applies after all other constraints.
1814
+ # Must be >= 0 if specified.
1815
+ # Corresponds to the JSON property `limit`
1816
+ # @return [Fixnum]
1817
+ attr_accessor :limit
1818
+
1819
+ # The number of results to skip. Applies before limit, but after all other
1820
+ # constraints. Must be >= 0 if specified.
1821
+ # Corresponds to the JSON property `offset`
1822
+ # @return [Fixnum]
1823
+ attr_accessor :offset
1824
+
1825
+ # The order to apply to the query results. Firestore guarantees a stable
1826
+ # ordering through the following rules: * Any field required to appear in `
1827
+ # order_by`, that is not already specified in `order_by`, is appended to the
1828
+ # order in field name order by default. * If an order on `__name__` is not
1829
+ # specified, it is appended by default. Fields are appended with the same sort
1830
+ # direction as the last order specified, or 'ASCENDING' if no order was
1831
+ # specified. For example: * `SELECT * FROM Foo ORDER BY A` becomes `SELECT *
1832
+ # FROM Foo ORDER BY A, __name__` * `SELECT * FROM Foo ORDER BY A DESC` becomes `
1833
+ # SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` * `SELECT * FROM Foo WHERE A
1834
+ # > 1` becomes `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
1835
+ # Corresponds to the JSON property `orderBy`
1836
+ # @return [Array<Google::Apis::FirestoreV1beta1::Order>]
1837
+ attr_accessor :order_by
1838
+
1839
+ # The projection of document's fields to return.
1840
+ # Corresponds to the JSON property `select`
1841
+ # @return [Google::Apis::FirestoreV1beta1::Projection]
1842
+ attr_accessor :select
1843
+
1844
+ # A position in a query result set.
1845
+ # Corresponds to the JSON property `startAt`
1846
+ # @return [Google::Apis::FirestoreV1beta1::Cursor]
1847
+ attr_accessor :start_at
1848
+
1849
+ # A filter.
1850
+ # Corresponds to the JSON property `where`
1851
+ # @return [Google::Apis::FirestoreV1beta1::Filter]
1852
+ attr_accessor :where
1853
+
1854
+ def initialize(**args)
1855
+ update!(**args)
1856
+ end
1857
+
1858
+ # Update properties of this object
1859
+ def update!(**args)
1860
+ @end_at = args[:end_at] if args.key?(:end_at)
1861
+ @from = args[:from] if args.key?(:from)
1862
+ @limit = args[:limit] if args.key?(:limit)
1863
+ @offset = args[:offset] if args.key?(:offset)
1864
+ @order_by = args[:order_by] if args.key?(:order_by)
1865
+ @select = args[:select] if args.key?(:select)
1866
+ @start_at = args[:start_at] if args.key?(:start_at)
1867
+ @where = args[:where] if args.key?(:where)
1868
+ end
1869
+ end
1870
+
1871
+ # A specification of a set of documents to listen to.
1872
+ class Target
1873
+ include Google::Apis::Core::Hashable
1874
+
1875
+ # A target specified by a set of documents names.
1876
+ # Corresponds to the JSON property `documents`
1877
+ # @return [Google::Apis::FirestoreV1beta1::DocumentsTarget]
1878
+ attr_accessor :documents
1879
+
1880
+ # If the target should be removed once it is current and consistent.
1881
+ # Corresponds to the JSON property `once`
1882
+ # @return [Boolean]
1883
+ attr_accessor :once
1884
+ alias_method :once?, :once
1885
+
1886
+ # A target specified by a query.
1887
+ # Corresponds to the JSON property `query`
1888
+ # @return [Google::Apis::FirestoreV1beta1::QueryTarget]
1889
+ attr_accessor :query
1890
+
1891
+ # Start listening after a specific `read_time`. The client must know the state
1892
+ # of matching documents at this time.
1893
+ # Corresponds to the JSON property `readTime`
1894
+ # @return [String]
1895
+ attr_accessor :read_time
1896
+
1897
+ # A resume token from a prior TargetChange for an identical target. Using a
1898
+ # resume token with a different target is unsupported and may fail.
1899
+ # Corresponds to the JSON property `resumeToken`
1900
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1901
+ # @return [String]
1902
+ attr_accessor :resume_token
1903
+
1904
+ # The target ID that identifies the target on the stream. Must be a positive
1905
+ # number and non-zero.
1906
+ # Corresponds to the JSON property `targetId`
1907
+ # @return [Fixnum]
1908
+ attr_accessor :target_id
1909
+
1910
+ def initialize(**args)
1911
+ update!(**args)
1912
+ end
1913
+
1914
+ # Update properties of this object
1915
+ def update!(**args)
1916
+ @documents = args[:documents] if args.key?(:documents)
1917
+ @once = args[:once] if args.key?(:once)
1918
+ @query = args[:query] if args.key?(:query)
1919
+ @read_time = args[:read_time] if args.key?(:read_time)
1920
+ @resume_token = args[:resume_token] if args.key?(:resume_token)
1921
+ @target_id = args[:target_id] if args.key?(:target_id)
1922
+ end
1923
+ end
1924
+
1925
+ # Targets being watched have changed.
1926
+ class TargetChange
1927
+ include Google::Apis::Core::Hashable
1928
+
1929
+ # The `Status` type defines a logical error model that is suitable for different
1930
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1931
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1932
+ # data: error code, error message, and error details. You can find out more
1933
+ # about this error model and how to work with it in the [API Design Guide](https:
1934
+ # //cloud.google.com/apis/design/errors).
1935
+ # Corresponds to the JSON property `cause`
1936
+ # @return [Google::Apis::FirestoreV1beta1::Status]
1937
+ attr_accessor :cause
1938
+
1939
+ # The consistent `read_time` for the given `target_ids` (omitted when the
1940
+ # target_ids are not at a consistent snapshot). The stream is guaranteed to send
1941
+ # a `read_time` with `target_ids` empty whenever the entire stream reaches a new
1942
+ # consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (
1943
+ # eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE
1944
+ # messages are not). For a given stream, `read_time` is guaranteed to be
1945
+ # monotonically increasing.
1946
+ # Corresponds to the JSON property `readTime`
1947
+ # @return [String]
1948
+ attr_accessor :read_time
1949
+
1950
+ # A token that can be used to resume the stream for the given `target_ids`, or
1951
+ # all targets if `target_ids` is empty. Not set on every target change.
1952
+ # Corresponds to the JSON property `resumeToken`
1953
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1954
+ # @return [String]
1955
+ attr_accessor :resume_token
1956
+
1957
+ # The type of change that occurred.
1958
+ # Corresponds to the JSON property `targetChangeType`
1959
+ # @return [String]
1960
+ attr_accessor :target_change_type
1961
+
1962
+ # The target IDs of targets that have changed. If empty, the change applies to
1963
+ # all targets. The order of the target IDs is not defined.
1964
+ # Corresponds to the JSON property `targetIds`
1965
+ # @return [Array<Fixnum>]
1966
+ attr_accessor :target_ids
1967
+
1968
+ def initialize(**args)
1969
+ update!(**args)
1970
+ end
1971
+
1972
+ # Update properties of this object
1973
+ def update!(**args)
1974
+ @cause = args[:cause] if args.key?(:cause)
1975
+ @read_time = args[:read_time] if args.key?(:read_time)
1976
+ @resume_token = args[:resume_token] if args.key?(:resume_token)
1977
+ @target_change_type = args[:target_change_type] if args.key?(:target_change_type)
1978
+ @target_ids = args[:target_ids] if args.key?(:target_ids)
1979
+ end
1980
+ end
1981
+
1982
+ # Options for creating a new transaction.
1983
+ class TransactionOptions
1984
+ include Google::Apis::Core::Hashable
1985
+
1986
+ # Options for a transaction that can only be used to read documents.
1987
+ # Corresponds to the JSON property `readOnly`
1988
+ # @return [Google::Apis::FirestoreV1beta1::ReadOnly]
1989
+ attr_accessor :read_only
1990
+
1991
+ # Options for a transaction that can be used to read and write documents.
1992
+ # Corresponds to the JSON property `readWrite`
1993
+ # @return [Google::Apis::FirestoreV1beta1::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 filter with a single operand.
2008
+ class UnaryFilter
2009
+ include Google::Apis::Core::Hashable
2010
+
2011
+ # A reference to a field, such as `max(messages.time) as max_time`.
2012
+ # Corresponds to the JSON property `field`
2013
+ # @return [Google::Apis::FirestoreV1beta1::FieldReference]
2014
+ attr_accessor :field
2015
+
2016
+ # The unary operator to apply.
2017
+ # Corresponds to the JSON property `op`
2018
+ # @return [String]
2019
+ attr_accessor :op
2020
+
2021
+ def initialize(**args)
2022
+ update!(**args)
2023
+ end
2024
+
2025
+ # Update properties of this object
2026
+ def update!(**args)
2027
+ @field = args[:field] if args.key?(:field)
2028
+ @op = args[:op] if args.key?(:op)
2029
+ end
2030
+ end
2031
+
2032
+ # A message that can hold any of the supported value types.
2033
+ class Value
2034
+ include Google::Apis::Core::Hashable
2035
+
2036
+ # An array value.
2037
+ # Corresponds to the JSON property `arrayValue`
2038
+ # @return [Google::Apis::FirestoreV1beta1::ArrayValue]
2039
+ attr_accessor :array_value
2040
+
2041
+ # A boolean value.
2042
+ # Corresponds to the JSON property `booleanValue`
2043
+ # @return [Boolean]
2044
+ attr_accessor :boolean_value
2045
+ alias_method :boolean_value?, :boolean_value
2046
+
2047
+ # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes
2048
+ # are considered by queries.
2049
+ # Corresponds to the JSON property `bytesValue`
2050
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
2051
+ # @return [String]
2052
+ attr_accessor :bytes_value
2053
+
2054
+ # A double value.
2055
+ # Corresponds to the JSON property `doubleValue`
2056
+ # @return [Float]
2057
+ attr_accessor :double_value
2058
+
2059
+ # An object that represents a latitude/longitude pair. This is expressed as a
2060
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
2061
+ # specified otherwise, this must conform to the WGS84 standard. Values must be
2062
+ # within normalized ranges.
2063
+ # Corresponds to the JSON property `geoPointValue`
2064
+ # @return [Google::Apis::FirestoreV1beta1::LatLng]
2065
+ attr_accessor :geo_point_value
2066
+
2067
+ # An integer value.
2068
+ # Corresponds to the JSON property `integerValue`
2069
+ # @return [Fixnum]
2070
+ attr_accessor :integer_value
2071
+
2072
+ # A map value.
2073
+ # Corresponds to the JSON property `mapValue`
2074
+ # @return [Google::Apis::FirestoreV1beta1::MapValue]
2075
+ attr_accessor :map_value
2076
+
2077
+ # A null value.
2078
+ # Corresponds to the JSON property `nullValue`
2079
+ # @return [String]
2080
+ attr_accessor :null_value
2081
+
2082
+ # A reference to a document. For example: `projects/`project_id`/databases/`
2083
+ # database_id`/documents/`document_path``.
2084
+ # Corresponds to the JSON property `referenceValue`
2085
+ # @return [String]
2086
+ attr_accessor :reference_value
2087
+
2088
+ # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89
2089
+ # bytes. Only the first 1,500 bytes of the UTF-8 representation are considered
2090
+ # by queries.
2091
+ # Corresponds to the JSON property `stringValue`
2092
+ # @return [String]
2093
+ attr_accessor :string_value
2094
+
2095
+ # A timestamp value. Precise only to microseconds. When stored, any additional
2096
+ # precision is rounded down.
2097
+ # Corresponds to the JSON property `timestampValue`
2098
+ # @return [String]
2099
+ attr_accessor :timestamp_value
2100
+
2101
+ def initialize(**args)
2102
+ update!(**args)
2103
+ end
2104
+
2105
+ # Update properties of this object
2106
+ def update!(**args)
2107
+ @array_value = args[:array_value] if args.key?(:array_value)
2108
+ @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
2109
+ @bytes_value = args[:bytes_value] if args.key?(:bytes_value)
2110
+ @double_value = args[:double_value] if args.key?(:double_value)
2111
+ @geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value)
2112
+ @integer_value = args[:integer_value] if args.key?(:integer_value)
2113
+ @map_value = args[:map_value] if args.key?(:map_value)
2114
+ @null_value = args[:null_value] if args.key?(:null_value)
2115
+ @reference_value = args[:reference_value] if args.key?(:reference_value)
2116
+ @string_value = args[:string_value] if args.key?(:string_value)
2117
+ @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
2118
+ end
2119
+ end
2120
+
2121
+ # A write on a document.
2122
+ class Write
2123
+ include Google::Apis::Core::Hashable
2124
+
2125
+ # A precondition on a document, used for conditional operations.
2126
+ # Corresponds to the JSON property `currentDocument`
2127
+ # @return [Google::Apis::FirestoreV1beta1::Precondition]
2128
+ attr_accessor :current_document
2129
+
2130
+ # A document name to delete. In the format: `projects/`project_id`/databases/`
2131
+ # database_id`/documents/`document_path``.
2132
+ # Corresponds to the JSON property `delete`
2133
+ # @return [String]
2134
+ attr_accessor :delete
2135
+
2136
+ # A transformation of a document.
2137
+ # Corresponds to the JSON property `transform`
2138
+ # @return [Google::Apis::FirestoreV1beta1::DocumentTransform]
2139
+ attr_accessor :transform
2140
+
2141
+ # A Firestore document. Must not exceed 1 MiB - 4 bytes.
2142
+ # Corresponds to the JSON property `update`
2143
+ # @return [Google::Apis::FirestoreV1beta1::Document]
2144
+ attr_accessor :update
2145
+
2146
+ # A set of field paths on a document. Used to restrict a get or update operation
2147
+ # on a document to a subset of its fields. This is different from standard field
2148
+ # masks, as this is always scoped to a Document, and takes in account the
2149
+ # dynamic nature of Value.
2150
+ # Corresponds to the JSON property `updateMask`
2151
+ # @return [Google::Apis::FirestoreV1beta1::DocumentMask]
2152
+ attr_accessor :update_mask
2153
+
2154
+ # The transforms to perform after update. This field can be set only when the
2155
+ # operation is `update`. If present, this write is equivalent to performing `
2156
+ # update` and `transform` to the same document atomically and in order.
2157
+ # Corresponds to the JSON property `updateTransforms`
2158
+ # @return [Array<Google::Apis::FirestoreV1beta1::FieldTransform>]
2159
+ attr_accessor :update_transforms
2160
+
2161
+ def initialize(**args)
2162
+ update!(**args)
2163
+ end
2164
+
2165
+ # Update properties of this object
2166
+ def update!(**args)
2167
+ @current_document = args[:current_document] if args.key?(:current_document)
2168
+ @delete = args[:delete] if args.key?(:delete)
2169
+ @transform = args[:transform] if args.key?(:transform)
2170
+ @update = args[:update] if args.key?(:update)
2171
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
2172
+ @update_transforms = args[:update_transforms] if args.key?(:update_transforms)
2173
+ end
2174
+ end
2175
+
2176
+ # The request for Firestore.Write. The first request creates a stream, or
2177
+ # resumes an existing one from a token. When creating a new stream, the server
2178
+ # replies with a response containing only an ID and a token, to use in the next
2179
+ # request. When resuming a stream, the server first streams any responses later
2180
+ # than the given token, then a response containing only an up-to-date token, to
2181
+ # use in the next request.
2182
+ class WriteRequest
2183
+ include Google::Apis::Core::Hashable
2184
+
2185
+ # Labels associated with this write request.
2186
+ # Corresponds to the JSON property `labels`
2187
+ # @return [Hash<String,String>]
2188
+ attr_accessor :labels
2189
+
2190
+ # The ID of the write stream to resume. This may only be set in the first
2191
+ # message. When left empty, a new write stream will be created.
2192
+ # Corresponds to the JSON property `streamId`
2193
+ # @return [String]
2194
+ attr_accessor :stream_id
2195
+
2196
+ # A stream token that was previously sent by the server. The client should set
2197
+ # this field to the token from the most recent WriteResponse it has received.
2198
+ # This acknowledges that the client has received responses up to this token.
2199
+ # After sending this token, earlier tokens may not be used anymore. The server
2200
+ # may close the stream if there are too many unacknowledged responses. Leave
2201
+ # this field unset when creating a new stream. To resume a stream at a specific
2202
+ # point, set this field and the `stream_id` field. Leave this field unset when
2203
+ # creating a new stream.
2204
+ # Corresponds to the JSON property `streamToken`
2205
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
2206
+ # @return [String]
2207
+ attr_accessor :stream_token
2208
+
2209
+ # The writes to apply. Always executed atomically and in order. This must be
2210
+ # empty on the first request. This may be empty on the last request. This must
2211
+ # not be empty on all other requests.
2212
+ # Corresponds to the JSON property `writes`
2213
+ # @return [Array<Google::Apis::FirestoreV1beta1::Write>]
2214
+ attr_accessor :writes
2215
+
2216
+ def initialize(**args)
2217
+ update!(**args)
2218
+ end
2219
+
2220
+ # Update properties of this object
2221
+ def update!(**args)
2222
+ @labels = args[:labels] if args.key?(:labels)
2223
+ @stream_id = args[:stream_id] if args.key?(:stream_id)
2224
+ @stream_token = args[:stream_token] if args.key?(:stream_token)
2225
+ @writes = args[:writes] if args.key?(:writes)
2226
+ end
2227
+ end
2228
+
2229
+ # The response for Firestore.Write.
2230
+ class WriteResponse
2231
+ include Google::Apis::Core::Hashable
2232
+
2233
+ # The time at which the commit occurred. Any read with an equal or greater `
2234
+ # read_time` is guaranteed to see the effects of the write.
2235
+ # Corresponds to the JSON property `commitTime`
2236
+ # @return [String]
2237
+ attr_accessor :commit_time
2238
+
2239
+ # The ID of the stream. Only set on the first message, when a new stream was
2240
+ # created.
2241
+ # Corresponds to the JSON property `streamId`
2242
+ # @return [String]
2243
+ attr_accessor :stream_id
2244
+
2245
+ # A token that represents the position of this response in the stream. This can
2246
+ # be used by a client to resume the stream at this point. This field is always
2247
+ # set.
2248
+ # Corresponds to the JSON property `streamToken`
2249
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
2250
+ # @return [String]
2251
+ attr_accessor :stream_token
2252
+
2253
+ # The result of applying the writes. This i-th write result corresponds to the i-
2254
+ # th write in the request.
2255
+ # Corresponds to the JSON property `writeResults`
2256
+ # @return [Array<Google::Apis::FirestoreV1beta1::WriteResult>]
2257
+ attr_accessor :write_results
2258
+
2259
+ def initialize(**args)
2260
+ update!(**args)
2261
+ end
2262
+
2263
+ # Update properties of this object
2264
+ def update!(**args)
2265
+ @commit_time = args[:commit_time] if args.key?(:commit_time)
2266
+ @stream_id = args[:stream_id] if args.key?(:stream_id)
2267
+ @stream_token = args[:stream_token] if args.key?(:stream_token)
2268
+ @write_results = args[:write_results] if args.key?(:write_results)
2269
+ end
2270
+ end
2271
+
2272
+ # The result of applying a write.
2273
+ class WriteResult
2274
+ include Google::Apis::Core::Hashable
2275
+
2276
+ # The results of applying each DocumentTransform.FieldTransform, in the same
2277
+ # order.
2278
+ # Corresponds to the JSON property `transformResults`
2279
+ # @return [Array<Google::Apis::FirestoreV1beta1::Value>]
2280
+ attr_accessor :transform_results
2281
+
2282
+ # The last update time of the document after applying the write. Not set after a
2283
+ # `delete`. If the write did not actually change the document, this will be the
2284
+ # previous update_time.
2285
+ # Corresponds to the JSON property `updateTime`
2286
+ # @return [String]
2287
+ attr_accessor :update_time
2288
+
2289
+ def initialize(**args)
2290
+ update!(**args)
2291
+ end
2292
+
2293
+ # Update properties of this object
2294
+ def update!(**args)
2295
+ @transform_results = args[:transform_results] if args.key?(:transform_results)
2296
+ @update_time = args[:update_time] if args.key?(:update_time)
2297
+ end
2298
+ end
2299
+ end
2300
+ end
2301
+ end