google-apis-firestore_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-firestore_v1.rb +15 -0
- data/lib/google/apis/firestore_v1.rb +40 -0
- data/lib/google/apis/firestore_v1/classes.rb +2642 -0
- data/lib/google/apis/firestore_v1/gem_version.rb +28 -0
- data/lib/google/apis/firestore_v1/representations.rb +1228 -0
- data/lib/google/apis/firestore_v1/service.rb +1232 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d2bb7234f04e32284aebeedbe13ab46f1a7c0e83f46574ce5e9e4ad8f2b0aa75
|
4
|
+
data.tar.gz: 22b0c305ffed05c8ba93df5acb28f80ca13abf225c1f152a341bf40fe9f434e0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 201a8a7c2e19b0ff90f892dab41e7fa250b23946cc26a64f37f9cec85d011b8ed97475bcb2a0a356a539df65197c711474514a991fa9f4c88a6594caa453b730
|
7
|
+
data.tar.gz: 76a35937242bc1d01bc6390fd250ff5792f77cb28d72f3945818b87c32d54654e4a138a5393c8a619c4100c84b869bab85df284bba309b5d4e31e41acd5aaf14
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-firestore_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/firestore_v1/*.rb
|
9
|
+
lib/google/apis/firestore_v1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1 of the Cloud Firestore API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 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_v1', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-firestore_v1
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/firestore_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::FirestoreV1::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::FirestoreV1::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_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://cloud.google.com/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_v1"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/firestore_v1/service.rb'
|
16
|
+
require 'google/apis/firestore_v1/classes.rb'
|
17
|
+
require 'google/apis/firestore_v1/representations.rb'
|
18
|
+
require 'google/apis/firestore_v1/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 FirestoreV1
|
29
|
+
# Version of the Cloud Firestore API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V1'
|
32
|
+
|
33
|
+
# View and manage your data across Google Cloud Platform services
|
34
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
35
|
+
|
36
|
+
# View and manage your Google Cloud Datastore data
|
37
|
+
AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,2642 @@
|
|
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 FirestoreV1
|
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::FirestoreV1::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::FirestoreV1::DocumentMask]
|
62
|
+
attr_accessor :mask
|
63
|
+
|
64
|
+
# Options for creating a new transaction.
|
65
|
+
# Corresponds to the JSON property `newTransaction`
|
66
|
+
# @return [Google::Apis::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::Value]
|
719
|
+
attr_accessor :minimum
|
720
|
+
|
721
|
+
# An array value.
|
722
|
+
# Corresponds to the JSON property `removeAllFromArray`
|
723
|
+
# @return [Google::Apis::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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::FirestoreV1::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 google.longrunning.Operation results from FirestoreAdmin.
|
779
|
+
# ExportDocuments.
|
780
|
+
class GoogleFirestoreAdminV1ExportDocumentsMetadata
|
781
|
+
include Google::Apis::Core::Hashable
|
782
|
+
|
783
|
+
# Which collection ids are being exported.
|
784
|
+
# Corresponds to the JSON property `collectionIds`
|
785
|
+
# @return [Array<String>]
|
786
|
+
attr_accessor :collection_ids
|
787
|
+
|
788
|
+
# The time this operation completed. Will be unset if operation still in
|
789
|
+
# progress.
|
790
|
+
# Corresponds to the JSON property `endTime`
|
791
|
+
# @return [String]
|
792
|
+
attr_accessor :end_time
|
793
|
+
|
794
|
+
# The state of the export operation.
|
795
|
+
# Corresponds to the JSON property `operationState`
|
796
|
+
# @return [String]
|
797
|
+
attr_accessor :operation_state
|
798
|
+
|
799
|
+
# Where the entities are being exported to.
|
800
|
+
# Corresponds to the JSON property `outputUriPrefix`
|
801
|
+
# @return [String]
|
802
|
+
attr_accessor :output_uri_prefix
|
803
|
+
|
804
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
805
|
+
# interpreted based on where Progress is used.
|
806
|
+
# Corresponds to the JSON property `progressBytes`
|
807
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
808
|
+
attr_accessor :progress_bytes
|
809
|
+
|
810
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
811
|
+
# interpreted based on where Progress is used.
|
812
|
+
# Corresponds to the JSON property `progressDocuments`
|
813
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
814
|
+
attr_accessor :progress_documents
|
815
|
+
|
816
|
+
# The time this operation started.
|
817
|
+
# Corresponds to the JSON property `startTime`
|
818
|
+
# @return [String]
|
819
|
+
attr_accessor :start_time
|
820
|
+
|
821
|
+
def initialize(**args)
|
822
|
+
update!(**args)
|
823
|
+
end
|
824
|
+
|
825
|
+
# Update properties of this object
|
826
|
+
def update!(**args)
|
827
|
+
@collection_ids = args[:collection_ids] if args.key?(:collection_ids)
|
828
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
829
|
+
@operation_state = args[:operation_state] if args.key?(:operation_state)
|
830
|
+
@output_uri_prefix = args[:output_uri_prefix] if args.key?(:output_uri_prefix)
|
831
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
832
|
+
@progress_documents = args[:progress_documents] if args.key?(:progress_documents)
|
833
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
834
|
+
end
|
835
|
+
end
|
836
|
+
|
837
|
+
# The request for FirestoreAdmin.ExportDocuments.
|
838
|
+
class GoogleFirestoreAdminV1ExportDocumentsRequest
|
839
|
+
include Google::Apis::Core::Hashable
|
840
|
+
|
841
|
+
# Which collection ids to export. Unspecified means all collections.
|
842
|
+
# Corresponds to the JSON property `collectionIds`
|
843
|
+
# @return [Array<String>]
|
844
|
+
attr_accessor :collection_ids
|
845
|
+
|
846
|
+
# The output URI. Currently only supports Google Cloud Storage URIs of the form:
|
847
|
+
# `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the
|
848
|
+
# Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional Google Cloud
|
849
|
+
# Storage namespace path. When choosing a name, be sure to consider Google Cloud
|
850
|
+
# Storage naming guidelines: https://cloud.google.com/storage/docs/naming. If
|
851
|
+
# the URI is a bucket (without a namespace path), a prefix will be generated
|
852
|
+
# based on the start time.
|
853
|
+
# Corresponds to the JSON property `outputUriPrefix`
|
854
|
+
# @return [String]
|
855
|
+
attr_accessor :output_uri_prefix
|
856
|
+
|
857
|
+
def initialize(**args)
|
858
|
+
update!(**args)
|
859
|
+
end
|
860
|
+
|
861
|
+
# Update properties of this object
|
862
|
+
def update!(**args)
|
863
|
+
@collection_ids = args[:collection_ids] if args.key?(:collection_ids)
|
864
|
+
@output_uri_prefix = args[:output_uri_prefix] if args.key?(:output_uri_prefix)
|
865
|
+
end
|
866
|
+
end
|
867
|
+
|
868
|
+
# Returned in the google.longrunning.Operation response field.
|
869
|
+
class GoogleFirestoreAdminV1ExportDocumentsResponse
|
870
|
+
include Google::Apis::Core::Hashable
|
871
|
+
|
872
|
+
# Location of the output files. This can be used to begin an import into Cloud
|
873
|
+
# Firestore (this project or another project) after the operation completes
|
874
|
+
# successfully.
|
875
|
+
# Corresponds to the JSON property `outputUriPrefix`
|
876
|
+
# @return [String]
|
877
|
+
attr_accessor :output_uri_prefix
|
878
|
+
|
879
|
+
def initialize(**args)
|
880
|
+
update!(**args)
|
881
|
+
end
|
882
|
+
|
883
|
+
# Update properties of this object
|
884
|
+
def update!(**args)
|
885
|
+
@output_uri_prefix = args[:output_uri_prefix] if args.key?(:output_uri_prefix)
|
886
|
+
end
|
887
|
+
end
|
888
|
+
|
889
|
+
# Represents a single field in the database. Fields are grouped by their "
|
890
|
+
# Collection Group", which represent all collections in the database with the
|
891
|
+
# same id.
|
892
|
+
class GoogleFirestoreAdminV1Field
|
893
|
+
include Google::Apis::Core::Hashable
|
894
|
+
|
895
|
+
# The index configuration for this field.
|
896
|
+
# Corresponds to the JSON property `indexConfig`
|
897
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1IndexConfig]
|
898
|
+
attr_accessor :index_config
|
899
|
+
|
900
|
+
# A field name of the form `projects/`project_id`/databases/`database_id`/
|
901
|
+
# collectionGroups/`collection_id`/fields/`field_path`` A field path may be a
|
902
|
+
# simple field name, e.g. `address` or a path to fields within map_value , e.g. `
|
903
|
+
# address.city`, or a special field path. The only valid special field is `*`,
|
904
|
+
# which represents any field. Field paths may be quoted using ` (backtick). The
|
905
|
+
# only character that needs to be escaped within a quoted field path is the
|
906
|
+
# backtick character itself, escaped using a backslash. Special characters in
|
907
|
+
# field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`,
|
908
|
+
# as well as any ascii symbolic characters. Examples: (Note: Comments here are
|
909
|
+
# written in markdown syntax, so there is an additional layer of backticks to
|
910
|
+
# represent a code block) `\`address.city\`` represents a field named `address.
|
911
|
+
# city`, not the map key `city` in the field `address`. `\`*\`` represents a
|
912
|
+
# field named `*`, not any field. A special `Field` contains the default
|
913
|
+
# indexing settings for all fields. This field's resource name is: `projects/`
|
914
|
+
# project_id`/databases/`database_id`/collectionGroups/__default__/fields/*`
|
915
|
+
# Indexes defined on this `Field` will be applied to all fields which do not
|
916
|
+
# have their own `Field` index configuration.
|
917
|
+
# Corresponds to the JSON property `name`
|
918
|
+
# @return [String]
|
919
|
+
attr_accessor :name
|
920
|
+
|
921
|
+
def initialize(**args)
|
922
|
+
update!(**args)
|
923
|
+
end
|
924
|
+
|
925
|
+
# Update properties of this object
|
926
|
+
def update!(**args)
|
927
|
+
@index_config = args[:index_config] if args.key?(:index_config)
|
928
|
+
@name = args[:name] if args.key?(:name)
|
929
|
+
end
|
930
|
+
end
|
931
|
+
|
932
|
+
# Metadata for google.longrunning.Operation results from FirestoreAdmin.
|
933
|
+
# UpdateField.
|
934
|
+
class GoogleFirestoreAdminV1FieldOperationMetadata
|
935
|
+
include Google::Apis::Core::Hashable
|
936
|
+
|
937
|
+
# The time this operation completed. Will be unset if operation still in
|
938
|
+
# progress.
|
939
|
+
# Corresponds to the JSON property `endTime`
|
940
|
+
# @return [String]
|
941
|
+
attr_accessor :end_time
|
942
|
+
|
943
|
+
# The field resource that this operation is acting on. For example: `projects/`
|
944
|
+
# project_id`/databases/`database_id`/collectionGroups/`collection_id`/fields/`
|
945
|
+
# field_path``
|
946
|
+
# Corresponds to the JSON property `field`
|
947
|
+
# @return [String]
|
948
|
+
attr_accessor :field
|
949
|
+
|
950
|
+
# A list of IndexConfigDelta, which describe the intent of this operation.
|
951
|
+
# Corresponds to the JSON property `indexConfigDeltas`
|
952
|
+
# @return [Array<Google::Apis::FirestoreV1::GoogleFirestoreAdminV1IndexConfigDelta>]
|
953
|
+
attr_accessor :index_config_deltas
|
954
|
+
|
955
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
956
|
+
# interpreted based on where Progress is used.
|
957
|
+
# Corresponds to the JSON property `progressBytes`
|
958
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
959
|
+
attr_accessor :progress_bytes
|
960
|
+
|
961
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
962
|
+
# interpreted based on where Progress is used.
|
963
|
+
# Corresponds to the JSON property `progressDocuments`
|
964
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
965
|
+
attr_accessor :progress_documents
|
966
|
+
|
967
|
+
# The time this operation started.
|
968
|
+
# Corresponds to the JSON property `startTime`
|
969
|
+
# @return [String]
|
970
|
+
attr_accessor :start_time
|
971
|
+
|
972
|
+
# The state of the operation.
|
973
|
+
# Corresponds to the JSON property `state`
|
974
|
+
# @return [String]
|
975
|
+
attr_accessor :state
|
976
|
+
|
977
|
+
def initialize(**args)
|
978
|
+
update!(**args)
|
979
|
+
end
|
980
|
+
|
981
|
+
# Update properties of this object
|
982
|
+
def update!(**args)
|
983
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
984
|
+
@field = args[:field] if args.key?(:field)
|
985
|
+
@index_config_deltas = args[:index_config_deltas] if args.key?(:index_config_deltas)
|
986
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
987
|
+
@progress_documents = args[:progress_documents] if args.key?(:progress_documents)
|
988
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
989
|
+
@state = args[:state] if args.key?(:state)
|
990
|
+
end
|
991
|
+
end
|
992
|
+
|
993
|
+
# Metadata for google.longrunning.Operation results from FirestoreAdmin.
|
994
|
+
# ImportDocuments.
|
995
|
+
class GoogleFirestoreAdminV1ImportDocumentsMetadata
|
996
|
+
include Google::Apis::Core::Hashable
|
997
|
+
|
998
|
+
# Which collection ids are being imported.
|
999
|
+
# Corresponds to the JSON property `collectionIds`
|
1000
|
+
# @return [Array<String>]
|
1001
|
+
attr_accessor :collection_ids
|
1002
|
+
|
1003
|
+
# The time this operation completed. Will be unset if operation still in
|
1004
|
+
# progress.
|
1005
|
+
# Corresponds to the JSON property `endTime`
|
1006
|
+
# @return [String]
|
1007
|
+
attr_accessor :end_time
|
1008
|
+
|
1009
|
+
# The location of the documents being imported.
|
1010
|
+
# Corresponds to the JSON property `inputUriPrefix`
|
1011
|
+
# @return [String]
|
1012
|
+
attr_accessor :input_uri_prefix
|
1013
|
+
|
1014
|
+
# The state of the import operation.
|
1015
|
+
# Corresponds to the JSON property `operationState`
|
1016
|
+
# @return [String]
|
1017
|
+
attr_accessor :operation_state
|
1018
|
+
|
1019
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
1020
|
+
# interpreted based on where Progress is used.
|
1021
|
+
# Corresponds to the JSON property `progressBytes`
|
1022
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
1023
|
+
attr_accessor :progress_bytes
|
1024
|
+
|
1025
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
1026
|
+
# interpreted based on where Progress is used.
|
1027
|
+
# Corresponds to the JSON property `progressDocuments`
|
1028
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
1029
|
+
attr_accessor :progress_documents
|
1030
|
+
|
1031
|
+
# The time this operation started.
|
1032
|
+
# Corresponds to the JSON property `startTime`
|
1033
|
+
# @return [String]
|
1034
|
+
attr_accessor :start_time
|
1035
|
+
|
1036
|
+
def initialize(**args)
|
1037
|
+
update!(**args)
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
# Update properties of this object
|
1041
|
+
def update!(**args)
|
1042
|
+
@collection_ids = args[:collection_ids] if args.key?(:collection_ids)
|
1043
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1044
|
+
@input_uri_prefix = args[:input_uri_prefix] if args.key?(:input_uri_prefix)
|
1045
|
+
@operation_state = args[:operation_state] if args.key?(:operation_state)
|
1046
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
1047
|
+
@progress_documents = args[:progress_documents] if args.key?(:progress_documents)
|
1048
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1049
|
+
end
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# The request for FirestoreAdmin.ImportDocuments.
|
1053
|
+
class GoogleFirestoreAdminV1ImportDocumentsRequest
|
1054
|
+
include Google::Apis::Core::Hashable
|
1055
|
+
|
1056
|
+
# Which collection ids to import. Unspecified means all collections included in
|
1057
|
+
# the import.
|
1058
|
+
# Corresponds to the JSON property `collectionIds`
|
1059
|
+
# @return [Array<String>]
|
1060
|
+
attr_accessor :collection_ids
|
1061
|
+
|
1062
|
+
# Location of the exported files. This must match the output_uri_prefix of an
|
1063
|
+
# ExportDocumentsResponse from an export that has completed successfully. See:
|
1064
|
+
# google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix.
|
1065
|
+
# Corresponds to the JSON property `inputUriPrefix`
|
1066
|
+
# @return [String]
|
1067
|
+
attr_accessor :input_uri_prefix
|
1068
|
+
|
1069
|
+
def initialize(**args)
|
1070
|
+
update!(**args)
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
# Update properties of this object
|
1074
|
+
def update!(**args)
|
1075
|
+
@collection_ids = args[:collection_ids] if args.key?(:collection_ids)
|
1076
|
+
@input_uri_prefix = args[:input_uri_prefix] if args.key?(:input_uri_prefix)
|
1077
|
+
end
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
# Cloud Firestore indexes enable simple and complex queries against documents in
|
1081
|
+
# a database.
|
1082
|
+
class GoogleFirestoreAdminV1Index
|
1083
|
+
include Google::Apis::Core::Hashable
|
1084
|
+
|
1085
|
+
# The fields supported by this index. For composite indexes, this is always 2 or
|
1086
|
+
# more fields. The last field entry is always for the field path `__name__`. If,
|
1087
|
+
# on creation, `__name__` was not specified as the last field, it will be added
|
1088
|
+
# automatically with the same direction as that of the last field defined. If
|
1089
|
+
# the final field in a composite index is not directional, the `__name__` will
|
1090
|
+
# be ordered ASCENDING (unless explicitly specified). For single field indexes,
|
1091
|
+
# this will always be exactly one entry with a field path equal to the field
|
1092
|
+
# path of the associated field.
|
1093
|
+
# Corresponds to the JSON property `fields`
|
1094
|
+
# @return [Array<Google::Apis::FirestoreV1::GoogleFirestoreAdminV1IndexField>]
|
1095
|
+
attr_accessor :fields
|
1096
|
+
|
1097
|
+
# Output only. A server defined name for this index. The form of this name for
|
1098
|
+
# composite indexes will be: `projects/`project_id`/databases/`database_id`/
|
1099
|
+
# collectionGroups/`collection_id`/indexes/`composite_index_id`` For single
|
1100
|
+
# field indexes, this field will be empty.
|
1101
|
+
# Corresponds to the JSON property `name`
|
1102
|
+
# @return [String]
|
1103
|
+
attr_accessor :name
|
1104
|
+
|
1105
|
+
# Indexes with a collection query scope specified allow queries against a
|
1106
|
+
# collection that is the child of a specific document, specified at query time,
|
1107
|
+
# and that has the same collection id. Indexes with a collection group query
|
1108
|
+
# scope specified allow queries against all collections descended from a
|
1109
|
+
# specific document, specified at query time, and that have the same collection
|
1110
|
+
# id as this index.
|
1111
|
+
# Corresponds to the JSON property `queryScope`
|
1112
|
+
# @return [String]
|
1113
|
+
attr_accessor :query_scope
|
1114
|
+
|
1115
|
+
# Output only. The serving state of the index.
|
1116
|
+
# Corresponds to the JSON property `state`
|
1117
|
+
# @return [String]
|
1118
|
+
attr_accessor :state
|
1119
|
+
|
1120
|
+
def initialize(**args)
|
1121
|
+
update!(**args)
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
# Update properties of this object
|
1125
|
+
def update!(**args)
|
1126
|
+
@fields = args[:fields] if args.key?(:fields)
|
1127
|
+
@name = args[:name] if args.key?(:name)
|
1128
|
+
@query_scope = args[:query_scope] if args.key?(:query_scope)
|
1129
|
+
@state = args[:state] if args.key?(:state)
|
1130
|
+
end
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
# The index configuration for this field.
|
1134
|
+
class GoogleFirestoreAdminV1IndexConfig
|
1135
|
+
include Google::Apis::Core::Hashable
|
1136
|
+
|
1137
|
+
# Output only. Specifies the resource name of the `Field` from which this field'
|
1138
|
+
# s index configuration is set (when `uses_ancestor_config` is true), or from
|
1139
|
+
# which it *would* be set if this field had no index configuration (when `
|
1140
|
+
# uses_ancestor_config` is false).
|
1141
|
+
# Corresponds to the JSON property `ancestorField`
|
1142
|
+
# @return [String]
|
1143
|
+
attr_accessor :ancestor_field
|
1144
|
+
|
1145
|
+
# The indexes supported for this field.
|
1146
|
+
# Corresponds to the JSON property `indexes`
|
1147
|
+
# @return [Array<Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Index>]
|
1148
|
+
attr_accessor :indexes
|
1149
|
+
|
1150
|
+
# Output only When true, the `Field`'s index configuration is in the process of
|
1151
|
+
# being reverted. Once complete, the index config will transition to the same
|
1152
|
+
# state as the field specified by `ancestor_field`, at which point `
|
1153
|
+
# uses_ancestor_config` will be `true` and `reverting` will be `false`.
|
1154
|
+
# Corresponds to the JSON property `reverting`
|
1155
|
+
# @return [Boolean]
|
1156
|
+
attr_accessor :reverting
|
1157
|
+
alias_method :reverting?, :reverting
|
1158
|
+
|
1159
|
+
# Output only. When true, the `Field`'s index configuration is set from the
|
1160
|
+
# configuration specified by the `ancestor_field`. When false, the `Field`'s
|
1161
|
+
# index configuration is defined explicitly.
|
1162
|
+
# Corresponds to the JSON property `usesAncestorConfig`
|
1163
|
+
# @return [Boolean]
|
1164
|
+
attr_accessor :uses_ancestor_config
|
1165
|
+
alias_method :uses_ancestor_config?, :uses_ancestor_config
|
1166
|
+
|
1167
|
+
def initialize(**args)
|
1168
|
+
update!(**args)
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
# Update properties of this object
|
1172
|
+
def update!(**args)
|
1173
|
+
@ancestor_field = args[:ancestor_field] if args.key?(:ancestor_field)
|
1174
|
+
@indexes = args[:indexes] if args.key?(:indexes)
|
1175
|
+
@reverting = args[:reverting] if args.key?(:reverting)
|
1176
|
+
@uses_ancestor_config = args[:uses_ancestor_config] if args.key?(:uses_ancestor_config)
|
1177
|
+
end
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
# Information about an index configuration change.
|
1181
|
+
class GoogleFirestoreAdminV1IndexConfigDelta
|
1182
|
+
include Google::Apis::Core::Hashable
|
1183
|
+
|
1184
|
+
# Specifies how the index is changing.
|
1185
|
+
# Corresponds to the JSON property `changeType`
|
1186
|
+
# @return [String]
|
1187
|
+
attr_accessor :change_type
|
1188
|
+
|
1189
|
+
# Cloud Firestore indexes enable simple and complex queries against documents in
|
1190
|
+
# a database.
|
1191
|
+
# Corresponds to the JSON property `index`
|
1192
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Index]
|
1193
|
+
attr_accessor :index
|
1194
|
+
|
1195
|
+
def initialize(**args)
|
1196
|
+
update!(**args)
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
# Update properties of this object
|
1200
|
+
def update!(**args)
|
1201
|
+
@change_type = args[:change_type] if args.key?(:change_type)
|
1202
|
+
@index = args[:index] if args.key?(:index)
|
1203
|
+
end
|
1204
|
+
end
|
1205
|
+
|
1206
|
+
# A field in an index. The field_path describes which field is indexed, the
|
1207
|
+
# value_mode describes how the field value is indexed.
|
1208
|
+
class GoogleFirestoreAdminV1IndexField
|
1209
|
+
include Google::Apis::Core::Hashable
|
1210
|
+
|
1211
|
+
# Indicates that this field supports operations on `array_value`s.
|
1212
|
+
# Corresponds to the JSON property `arrayConfig`
|
1213
|
+
# @return [String]
|
1214
|
+
attr_accessor :array_config
|
1215
|
+
|
1216
|
+
# Can be __name__. For single field indexes, this must match the name of the
|
1217
|
+
# field or may be omitted.
|
1218
|
+
# Corresponds to the JSON property `fieldPath`
|
1219
|
+
# @return [String]
|
1220
|
+
attr_accessor :field_path
|
1221
|
+
|
1222
|
+
# Indicates that this field supports ordering by the specified order or
|
1223
|
+
# comparing using =, <, <=, >, >=.
|
1224
|
+
# Corresponds to the JSON property `order`
|
1225
|
+
# @return [String]
|
1226
|
+
attr_accessor :order
|
1227
|
+
|
1228
|
+
def initialize(**args)
|
1229
|
+
update!(**args)
|
1230
|
+
end
|
1231
|
+
|
1232
|
+
# Update properties of this object
|
1233
|
+
def update!(**args)
|
1234
|
+
@array_config = args[:array_config] if args.key?(:array_config)
|
1235
|
+
@field_path = args[:field_path] if args.key?(:field_path)
|
1236
|
+
@order = args[:order] if args.key?(:order)
|
1237
|
+
end
|
1238
|
+
end
|
1239
|
+
|
1240
|
+
# Metadata for google.longrunning.Operation results from FirestoreAdmin.
|
1241
|
+
# CreateIndex.
|
1242
|
+
class GoogleFirestoreAdminV1IndexOperationMetadata
|
1243
|
+
include Google::Apis::Core::Hashable
|
1244
|
+
|
1245
|
+
# The time this operation completed. Will be unset if operation still in
|
1246
|
+
# progress.
|
1247
|
+
# Corresponds to the JSON property `endTime`
|
1248
|
+
# @return [String]
|
1249
|
+
attr_accessor :end_time
|
1250
|
+
|
1251
|
+
# The index resource that this operation is acting on. For example: `projects/`
|
1252
|
+
# project_id`/databases/`database_id`/collectionGroups/`collection_id`/indexes/`
|
1253
|
+
# index_id``
|
1254
|
+
# Corresponds to the JSON property `index`
|
1255
|
+
# @return [String]
|
1256
|
+
attr_accessor :index
|
1257
|
+
|
1258
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
1259
|
+
# interpreted based on where Progress is used.
|
1260
|
+
# Corresponds to the JSON property `progressBytes`
|
1261
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
1262
|
+
attr_accessor :progress_bytes
|
1263
|
+
|
1264
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
1265
|
+
# interpreted based on where Progress is used.
|
1266
|
+
# Corresponds to the JSON property `progressDocuments`
|
1267
|
+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
|
1268
|
+
attr_accessor :progress_documents
|
1269
|
+
|
1270
|
+
# The time this operation started.
|
1271
|
+
# Corresponds to the JSON property `startTime`
|
1272
|
+
# @return [String]
|
1273
|
+
attr_accessor :start_time
|
1274
|
+
|
1275
|
+
# The state of the operation.
|
1276
|
+
# Corresponds to the JSON property `state`
|
1277
|
+
# @return [String]
|
1278
|
+
attr_accessor :state
|
1279
|
+
|
1280
|
+
def initialize(**args)
|
1281
|
+
update!(**args)
|
1282
|
+
end
|
1283
|
+
|
1284
|
+
# Update properties of this object
|
1285
|
+
def update!(**args)
|
1286
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1287
|
+
@index = args[:index] if args.key?(:index)
|
1288
|
+
@progress_bytes = args[:progress_bytes] if args.key?(:progress_bytes)
|
1289
|
+
@progress_documents = args[:progress_documents] if args.key?(:progress_documents)
|
1290
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1291
|
+
@state = args[:state] if args.key?(:state)
|
1292
|
+
end
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
# The response for FirestoreAdmin.ListFields.
|
1296
|
+
class GoogleFirestoreAdminV1ListFieldsResponse
|
1297
|
+
include Google::Apis::Core::Hashable
|
1298
|
+
|
1299
|
+
# The requested fields.
|
1300
|
+
# Corresponds to the JSON property `fields`
|
1301
|
+
# @return [Array<Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Field>]
|
1302
|
+
attr_accessor :fields
|
1303
|
+
|
1304
|
+
# A page token that may be used to request another page of results. If blank,
|
1305
|
+
# this is the last page.
|
1306
|
+
# Corresponds to the JSON property `nextPageToken`
|
1307
|
+
# @return [String]
|
1308
|
+
attr_accessor :next_page_token
|
1309
|
+
|
1310
|
+
def initialize(**args)
|
1311
|
+
update!(**args)
|
1312
|
+
end
|
1313
|
+
|
1314
|
+
# Update properties of this object
|
1315
|
+
def update!(**args)
|
1316
|
+
@fields = args[:fields] if args.key?(:fields)
|
1317
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1318
|
+
end
|
1319
|
+
end
|
1320
|
+
|
1321
|
+
# The response for FirestoreAdmin.ListIndexes.
|
1322
|
+
class GoogleFirestoreAdminV1ListIndexesResponse
|
1323
|
+
include Google::Apis::Core::Hashable
|
1324
|
+
|
1325
|
+
# The requested indexes.
|
1326
|
+
# Corresponds to the JSON property `indexes`
|
1327
|
+
# @return [Array<Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Index>]
|
1328
|
+
attr_accessor :indexes
|
1329
|
+
|
1330
|
+
# A page token that may be used to request another page of results. If blank,
|
1331
|
+
# this is the last page.
|
1332
|
+
# Corresponds to the JSON property `nextPageToken`
|
1333
|
+
# @return [String]
|
1334
|
+
attr_accessor :next_page_token
|
1335
|
+
|
1336
|
+
def initialize(**args)
|
1337
|
+
update!(**args)
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
# Update properties of this object
|
1341
|
+
def update!(**args)
|
1342
|
+
@indexes = args[:indexes] if args.key?(:indexes)
|
1343
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1344
|
+
end
|
1345
|
+
end
|
1346
|
+
|
1347
|
+
# The metadata message for google.cloud.location.Location.metadata.
|
1348
|
+
class GoogleFirestoreAdminV1LocationMetadata
|
1349
|
+
include Google::Apis::Core::Hashable
|
1350
|
+
|
1351
|
+
def initialize(**args)
|
1352
|
+
update!(**args)
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
# Update properties of this object
|
1356
|
+
def update!(**args)
|
1357
|
+
end
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
# Describes the progress of the operation. Unit of work is generic and must be
|
1361
|
+
# interpreted based on where Progress is used.
|
1362
|
+
class GoogleFirestoreAdminV1Progress
|
1363
|
+
include Google::Apis::Core::Hashable
|
1364
|
+
|
1365
|
+
# The amount of work completed.
|
1366
|
+
# Corresponds to the JSON property `completedWork`
|
1367
|
+
# @return [Fixnum]
|
1368
|
+
attr_accessor :completed_work
|
1369
|
+
|
1370
|
+
# The amount of work estimated.
|
1371
|
+
# Corresponds to the JSON property `estimatedWork`
|
1372
|
+
# @return [Fixnum]
|
1373
|
+
attr_accessor :estimated_work
|
1374
|
+
|
1375
|
+
def initialize(**args)
|
1376
|
+
update!(**args)
|
1377
|
+
end
|
1378
|
+
|
1379
|
+
# Update properties of this object
|
1380
|
+
def update!(**args)
|
1381
|
+
@completed_work = args[:completed_work] if args.key?(:completed_work)
|
1382
|
+
@estimated_work = args[:estimated_work] if args.key?(:estimated_work)
|
1383
|
+
end
|
1384
|
+
end
|
1385
|
+
|
1386
|
+
# The request message for Operations.CancelOperation.
|
1387
|
+
class GoogleLongrunningCancelOperationRequest
|
1388
|
+
include Google::Apis::Core::Hashable
|
1389
|
+
|
1390
|
+
def initialize(**args)
|
1391
|
+
update!(**args)
|
1392
|
+
end
|
1393
|
+
|
1394
|
+
# Update properties of this object
|
1395
|
+
def update!(**args)
|
1396
|
+
end
|
1397
|
+
end
|
1398
|
+
|
1399
|
+
# The response message for Operations.ListOperations.
|
1400
|
+
class GoogleLongrunningListOperationsResponse
|
1401
|
+
include Google::Apis::Core::Hashable
|
1402
|
+
|
1403
|
+
# The standard List next-page token.
|
1404
|
+
# Corresponds to the JSON property `nextPageToken`
|
1405
|
+
# @return [String]
|
1406
|
+
attr_accessor :next_page_token
|
1407
|
+
|
1408
|
+
# A list of operations that matches the specified filter in the request.
|
1409
|
+
# Corresponds to the JSON property `operations`
|
1410
|
+
# @return [Array<Google::Apis::FirestoreV1::GoogleLongrunningOperation>]
|
1411
|
+
attr_accessor :operations
|
1412
|
+
|
1413
|
+
def initialize(**args)
|
1414
|
+
update!(**args)
|
1415
|
+
end
|
1416
|
+
|
1417
|
+
# Update properties of this object
|
1418
|
+
def update!(**args)
|
1419
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1420
|
+
@operations = args[:operations] if args.key?(:operations)
|
1421
|
+
end
|
1422
|
+
end
|
1423
|
+
|
1424
|
+
# This resource represents a long-running operation that is the result of a
|
1425
|
+
# network API call.
|
1426
|
+
class GoogleLongrunningOperation
|
1427
|
+
include Google::Apis::Core::Hashable
|
1428
|
+
|
1429
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
1430
|
+
# , the operation is completed, and either `error` or `response` is available.
|
1431
|
+
# Corresponds to the JSON property `done`
|
1432
|
+
# @return [Boolean]
|
1433
|
+
attr_accessor :done
|
1434
|
+
alias_method :done?, :done
|
1435
|
+
|
1436
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1437
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1438
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1439
|
+
# data: error code, error message, and error details. You can find out more
|
1440
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1441
|
+
# //cloud.google.com/apis/design/errors).
|
1442
|
+
# Corresponds to the JSON property `error`
|
1443
|
+
# @return [Google::Apis::FirestoreV1::Status]
|
1444
|
+
attr_accessor :error
|
1445
|
+
|
1446
|
+
# Service-specific metadata associated with the operation. It typically contains
|
1447
|
+
# progress information and common metadata such as create time. Some services
|
1448
|
+
# might not provide such metadata. Any method that returns a long-running
|
1449
|
+
# operation should document the metadata type, if any.
|
1450
|
+
# Corresponds to the JSON property `metadata`
|
1451
|
+
# @return [Hash<String,Object>]
|
1452
|
+
attr_accessor :metadata
|
1453
|
+
|
1454
|
+
# The server-assigned name, which is only unique within the same service that
|
1455
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
1456
|
+
# be a resource name ending with `operations/`unique_id``.
|
1457
|
+
# Corresponds to the JSON property `name`
|
1458
|
+
# @return [String]
|
1459
|
+
attr_accessor :name
|
1460
|
+
|
1461
|
+
# The normal response of the operation in case of success. If the original
|
1462
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
1463
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
1464
|
+
# the response should be the resource. For other methods, the response should
|
1465
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
1466
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
1467
|
+
# response type is `TakeSnapshotResponse`.
|
1468
|
+
# Corresponds to the JSON property `response`
|
1469
|
+
# @return [Hash<String,Object>]
|
1470
|
+
attr_accessor :response
|
1471
|
+
|
1472
|
+
def initialize(**args)
|
1473
|
+
update!(**args)
|
1474
|
+
end
|
1475
|
+
|
1476
|
+
# Update properties of this object
|
1477
|
+
def update!(**args)
|
1478
|
+
@done = args[:done] if args.key?(:done)
|
1479
|
+
@error = args[:error] if args.key?(:error)
|
1480
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1481
|
+
@name = args[:name] if args.key?(:name)
|
1482
|
+
@response = args[:response] if args.key?(:response)
|
1483
|
+
end
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
1487
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
1488
|
+
# specified otherwise, this must conform to the WGS84 standard. Values must be
|
1489
|
+
# within normalized ranges.
|
1490
|
+
class LatLng
|
1491
|
+
include Google::Apis::Core::Hashable
|
1492
|
+
|
1493
|
+
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
1494
|
+
# Corresponds to the JSON property `latitude`
|
1495
|
+
# @return [Float]
|
1496
|
+
attr_accessor :latitude
|
1497
|
+
|
1498
|
+
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
1499
|
+
# Corresponds to the JSON property `longitude`
|
1500
|
+
# @return [Float]
|
1501
|
+
attr_accessor :longitude
|
1502
|
+
|
1503
|
+
def initialize(**args)
|
1504
|
+
update!(**args)
|
1505
|
+
end
|
1506
|
+
|
1507
|
+
# Update properties of this object
|
1508
|
+
def update!(**args)
|
1509
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
1510
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
1511
|
+
end
|
1512
|
+
end
|
1513
|
+
|
1514
|
+
# The request for Firestore.ListCollectionIds.
|
1515
|
+
class ListCollectionIdsRequest
|
1516
|
+
include Google::Apis::Core::Hashable
|
1517
|
+
|
1518
|
+
# The maximum number of results to return.
|
1519
|
+
# Corresponds to the JSON property `pageSize`
|
1520
|
+
# @return [Fixnum]
|
1521
|
+
attr_accessor :page_size
|
1522
|
+
|
1523
|
+
# A page token. Must be a value from ListCollectionIdsResponse.
|
1524
|
+
# Corresponds to the JSON property `pageToken`
|
1525
|
+
# @return [String]
|
1526
|
+
attr_accessor :page_token
|
1527
|
+
|
1528
|
+
def initialize(**args)
|
1529
|
+
update!(**args)
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
# Update properties of this object
|
1533
|
+
def update!(**args)
|
1534
|
+
@page_size = args[:page_size] if args.key?(:page_size)
|
1535
|
+
@page_token = args[:page_token] if args.key?(:page_token)
|
1536
|
+
end
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# The response from Firestore.ListCollectionIds.
|
1540
|
+
class ListCollectionIdsResponse
|
1541
|
+
include Google::Apis::Core::Hashable
|
1542
|
+
|
1543
|
+
# The collection ids.
|
1544
|
+
# Corresponds to the JSON property `collectionIds`
|
1545
|
+
# @return [Array<String>]
|
1546
|
+
attr_accessor :collection_ids
|
1547
|
+
|
1548
|
+
# A page token that may be used to continue the list.
|
1549
|
+
# Corresponds to the JSON property `nextPageToken`
|
1550
|
+
# @return [String]
|
1551
|
+
attr_accessor :next_page_token
|
1552
|
+
|
1553
|
+
def initialize(**args)
|
1554
|
+
update!(**args)
|
1555
|
+
end
|
1556
|
+
|
1557
|
+
# Update properties of this object
|
1558
|
+
def update!(**args)
|
1559
|
+
@collection_ids = args[:collection_ids] if args.key?(:collection_ids)
|
1560
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1561
|
+
end
|
1562
|
+
end
|
1563
|
+
|
1564
|
+
# The response for Firestore.ListDocuments.
|
1565
|
+
class ListDocumentsResponse
|
1566
|
+
include Google::Apis::Core::Hashable
|
1567
|
+
|
1568
|
+
# The Documents found.
|
1569
|
+
# Corresponds to the JSON property `documents`
|
1570
|
+
# @return [Array<Google::Apis::FirestoreV1::Document>]
|
1571
|
+
attr_accessor :documents
|
1572
|
+
|
1573
|
+
# The next page token.
|
1574
|
+
# Corresponds to the JSON property `nextPageToken`
|
1575
|
+
# @return [String]
|
1576
|
+
attr_accessor :next_page_token
|
1577
|
+
|
1578
|
+
def initialize(**args)
|
1579
|
+
update!(**args)
|
1580
|
+
end
|
1581
|
+
|
1582
|
+
# Update properties of this object
|
1583
|
+
def update!(**args)
|
1584
|
+
@documents = args[:documents] if args.key?(:documents)
|
1585
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1586
|
+
end
|
1587
|
+
end
|
1588
|
+
|
1589
|
+
# The response message for Locations.ListLocations.
|
1590
|
+
class ListLocationsResponse
|
1591
|
+
include Google::Apis::Core::Hashable
|
1592
|
+
|
1593
|
+
# A list of locations that matches the specified filter in the request.
|
1594
|
+
# Corresponds to the JSON property `locations`
|
1595
|
+
# @return [Array<Google::Apis::FirestoreV1::Location>]
|
1596
|
+
attr_accessor :locations
|
1597
|
+
|
1598
|
+
# The standard List next-page token.
|
1599
|
+
# Corresponds to the JSON property `nextPageToken`
|
1600
|
+
# @return [String]
|
1601
|
+
attr_accessor :next_page_token
|
1602
|
+
|
1603
|
+
def initialize(**args)
|
1604
|
+
update!(**args)
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# Update properties of this object
|
1608
|
+
def update!(**args)
|
1609
|
+
@locations = args[:locations] if args.key?(:locations)
|
1610
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1611
|
+
end
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
# A request for Firestore.Listen
|
1615
|
+
class ListenRequest
|
1616
|
+
include Google::Apis::Core::Hashable
|
1617
|
+
|
1618
|
+
# A specification of a set of documents to listen to.
|
1619
|
+
# Corresponds to the JSON property `addTarget`
|
1620
|
+
# @return [Google::Apis::FirestoreV1::Target]
|
1621
|
+
attr_accessor :add_target
|
1622
|
+
|
1623
|
+
# Labels associated with this target change.
|
1624
|
+
# Corresponds to the JSON property `labels`
|
1625
|
+
# @return [Hash<String,String>]
|
1626
|
+
attr_accessor :labels
|
1627
|
+
|
1628
|
+
# The ID of a target to remove from this stream.
|
1629
|
+
# Corresponds to the JSON property `removeTarget`
|
1630
|
+
# @return [Fixnum]
|
1631
|
+
attr_accessor :remove_target
|
1632
|
+
|
1633
|
+
def initialize(**args)
|
1634
|
+
update!(**args)
|
1635
|
+
end
|
1636
|
+
|
1637
|
+
# Update properties of this object
|
1638
|
+
def update!(**args)
|
1639
|
+
@add_target = args[:add_target] if args.key?(:add_target)
|
1640
|
+
@labels = args[:labels] if args.key?(:labels)
|
1641
|
+
@remove_target = args[:remove_target] if args.key?(:remove_target)
|
1642
|
+
end
|
1643
|
+
end
|
1644
|
+
|
1645
|
+
# The response for Firestore.Listen.
|
1646
|
+
class ListenResponse
|
1647
|
+
include Google::Apis::Core::Hashable
|
1648
|
+
|
1649
|
+
# A Document has changed. May be the result of multiple writes, including
|
1650
|
+
# deletes, that ultimately resulted in a new value for the Document. Multiple
|
1651
|
+
# DocumentChange messages may be returned for the same logical change, if
|
1652
|
+
# multiple targets are affected.
|
1653
|
+
# Corresponds to the JSON property `documentChange`
|
1654
|
+
# @return [Google::Apis::FirestoreV1::DocumentChange]
|
1655
|
+
attr_accessor :document_change
|
1656
|
+
|
1657
|
+
# A Document has been deleted. May be the result of multiple writes, including
|
1658
|
+
# updates, the last of which deleted the Document. Multiple DocumentDelete
|
1659
|
+
# messages may be returned for the same logical delete, if multiple targets are
|
1660
|
+
# affected.
|
1661
|
+
# Corresponds to the JSON property `documentDelete`
|
1662
|
+
# @return [Google::Apis::FirestoreV1::DocumentDelete]
|
1663
|
+
attr_accessor :document_delete
|
1664
|
+
|
1665
|
+
# A Document has been removed from the view of the targets. Sent if the document
|
1666
|
+
# is no longer relevant to a target and is out of view. Can be sent instead of a
|
1667
|
+
# DocumentDelete or a DocumentChange if the server can not send the new value of
|
1668
|
+
# the document. Multiple DocumentRemove messages may be returned for the same
|
1669
|
+
# logical write or delete, if multiple targets are affected.
|
1670
|
+
# Corresponds to the JSON property `documentRemove`
|
1671
|
+
# @return [Google::Apis::FirestoreV1::DocumentRemove]
|
1672
|
+
attr_accessor :document_remove
|
1673
|
+
|
1674
|
+
# A digest of all the documents that match a given target.
|
1675
|
+
# Corresponds to the JSON property `filter`
|
1676
|
+
# @return [Google::Apis::FirestoreV1::ExistenceFilter]
|
1677
|
+
attr_accessor :filter
|
1678
|
+
|
1679
|
+
# Targets being watched have changed.
|
1680
|
+
# Corresponds to the JSON property `targetChange`
|
1681
|
+
# @return [Google::Apis::FirestoreV1::TargetChange]
|
1682
|
+
attr_accessor :target_change
|
1683
|
+
|
1684
|
+
def initialize(**args)
|
1685
|
+
update!(**args)
|
1686
|
+
end
|
1687
|
+
|
1688
|
+
# Update properties of this object
|
1689
|
+
def update!(**args)
|
1690
|
+
@document_change = args[:document_change] if args.key?(:document_change)
|
1691
|
+
@document_delete = args[:document_delete] if args.key?(:document_delete)
|
1692
|
+
@document_remove = args[:document_remove] if args.key?(:document_remove)
|
1693
|
+
@filter = args[:filter] if args.key?(:filter)
|
1694
|
+
@target_change = args[:target_change] if args.key?(:target_change)
|
1695
|
+
end
|
1696
|
+
end
|
1697
|
+
|
1698
|
+
# A resource that represents Google Cloud Platform location.
|
1699
|
+
class Location
|
1700
|
+
include Google::Apis::Core::Hashable
|
1701
|
+
|
1702
|
+
# The friendly name for this location, typically a nearby city name. For example,
|
1703
|
+
# "Tokyo".
|
1704
|
+
# Corresponds to the JSON property `displayName`
|
1705
|
+
# @return [String]
|
1706
|
+
attr_accessor :display_name
|
1707
|
+
|
1708
|
+
# Cross-service attributes for the location. For example `"cloud.googleapis.com/
|
1709
|
+
# region": "us-east1"`
|
1710
|
+
# Corresponds to the JSON property `labels`
|
1711
|
+
# @return [Hash<String,String>]
|
1712
|
+
attr_accessor :labels
|
1713
|
+
|
1714
|
+
# The canonical id for this location. For example: `"us-east1"`.
|
1715
|
+
# Corresponds to the JSON property `locationId`
|
1716
|
+
# @return [String]
|
1717
|
+
attr_accessor :location_id
|
1718
|
+
|
1719
|
+
# Service-specific metadata. For example the available capacity at the given
|
1720
|
+
# location.
|
1721
|
+
# Corresponds to the JSON property `metadata`
|
1722
|
+
# @return [Hash<String,Object>]
|
1723
|
+
attr_accessor :metadata
|
1724
|
+
|
1725
|
+
# Resource name for the location, which may vary between implementations. For
|
1726
|
+
# example: `"projects/example-project/locations/us-east1"`
|
1727
|
+
# Corresponds to the JSON property `name`
|
1728
|
+
# @return [String]
|
1729
|
+
attr_accessor :name
|
1730
|
+
|
1731
|
+
def initialize(**args)
|
1732
|
+
update!(**args)
|
1733
|
+
end
|
1734
|
+
|
1735
|
+
# Update properties of this object
|
1736
|
+
def update!(**args)
|
1737
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1738
|
+
@labels = args[:labels] if args.key?(:labels)
|
1739
|
+
@location_id = args[:location_id] if args.key?(:location_id)
|
1740
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1741
|
+
@name = args[:name] if args.key?(:name)
|
1742
|
+
end
|
1743
|
+
end
|
1744
|
+
|
1745
|
+
# A map value.
|
1746
|
+
class MapValue
|
1747
|
+
include Google::Apis::Core::Hashable
|
1748
|
+
|
1749
|
+
# The map's fields. The map keys represent field names. Field names matching the
|
1750
|
+
# regular expression `__.*__` are reserved. Reserved field names are forbidden
|
1751
|
+
# except in certain documented contexts. The map keys, represented as UTF-8,
|
1752
|
+
# must not exceed 1,500 bytes and cannot be empty.
|
1753
|
+
# Corresponds to the JSON property `fields`
|
1754
|
+
# @return [Hash<String,Google::Apis::FirestoreV1::Value>]
|
1755
|
+
attr_accessor :fields
|
1756
|
+
|
1757
|
+
def initialize(**args)
|
1758
|
+
update!(**args)
|
1759
|
+
end
|
1760
|
+
|
1761
|
+
# Update properties of this object
|
1762
|
+
def update!(**args)
|
1763
|
+
@fields = args[:fields] if args.key?(:fields)
|
1764
|
+
end
|
1765
|
+
end
|
1766
|
+
|
1767
|
+
# An order on a field.
|
1768
|
+
class Order
|
1769
|
+
include Google::Apis::Core::Hashable
|
1770
|
+
|
1771
|
+
# The direction to order by. Defaults to `ASCENDING`.
|
1772
|
+
# Corresponds to the JSON property `direction`
|
1773
|
+
# @return [String]
|
1774
|
+
attr_accessor :direction
|
1775
|
+
|
1776
|
+
# A reference to a field, such as `max(messages.time) as max_time`.
|
1777
|
+
# Corresponds to the JSON property `field`
|
1778
|
+
# @return [Google::Apis::FirestoreV1::FieldReference]
|
1779
|
+
attr_accessor :field
|
1780
|
+
|
1781
|
+
def initialize(**args)
|
1782
|
+
update!(**args)
|
1783
|
+
end
|
1784
|
+
|
1785
|
+
# Update properties of this object
|
1786
|
+
def update!(**args)
|
1787
|
+
@direction = args[:direction] if args.key?(:direction)
|
1788
|
+
@field = args[:field] if args.key?(:field)
|
1789
|
+
end
|
1790
|
+
end
|
1791
|
+
|
1792
|
+
# The request for Firestore.PartitionQuery.
|
1793
|
+
class PartitionQueryRequest
|
1794
|
+
include Google::Apis::Core::Hashable
|
1795
|
+
|
1796
|
+
# The maximum number of partitions to return in this call, subject to `
|
1797
|
+
# partition_count`. For example, if `partition_count` = 10 and `page_size` = 8,
|
1798
|
+
# the first call to PartitionQuery will return up to 8 partitions and a `
|
1799
|
+
# next_page_token` if more results exist. A second call to PartitionQuery will
|
1800
|
+
# return up to 2 partitions, to complete the total of 10 specified in `
|
1801
|
+
# partition_count`.
|
1802
|
+
# Corresponds to the JSON property `pageSize`
|
1803
|
+
# @return [Fixnum]
|
1804
|
+
attr_accessor :page_size
|
1805
|
+
|
1806
|
+
# The `next_page_token` value returned from a previous call to PartitionQuery
|
1807
|
+
# that may be used to get an additional set of results. There are no ordering
|
1808
|
+
# guarantees between sets of results. Thus, using multiple sets of results will
|
1809
|
+
# require merging the different result sets. For example, two subsequent calls
|
1810
|
+
# using a page_token may return: * cursor B, cursor M, cursor Q * cursor A,
|
1811
|
+
# cursor U, cursor W To obtain a complete result set ordered with respect to the
|
1812
|
+
# results of the query supplied to PartitionQuery, the results sets should be
|
1813
|
+
# merged: cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
|
1814
|
+
# Corresponds to the JSON property `pageToken`
|
1815
|
+
# @return [String]
|
1816
|
+
attr_accessor :page_token
|
1817
|
+
|
1818
|
+
# The desired maximum number of partition points. The partitions may be returned
|
1819
|
+
# across multiple pages of results. The number must be positive. The actual
|
1820
|
+
# number of partitions returned may be fewer. For example, this may be set to
|
1821
|
+
# one fewer than the number of parallel queries to be run, or in running a data
|
1822
|
+
# pipeline job, one fewer than the number of workers or compute instances
|
1823
|
+
# available.
|
1824
|
+
# Corresponds to the JSON property `partitionCount`
|
1825
|
+
# @return [Fixnum]
|
1826
|
+
attr_accessor :partition_count
|
1827
|
+
|
1828
|
+
# A Firestore query.
|
1829
|
+
# Corresponds to the JSON property `structuredQuery`
|
1830
|
+
# @return [Google::Apis::FirestoreV1::StructuredQuery]
|
1831
|
+
attr_accessor :structured_query
|
1832
|
+
|
1833
|
+
def initialize(**args)
|
1834
|
+
update!(**args)
|
1835
|
+
end
|
1836
|
+
|
1837
|
+
# Update properties of this object
|
1838
|
+
def update!(**args)
|
1839
|
+
@page_size = args[:page_size] if args.key?(:page_size)
|
1840
|
+
@page_token = args[:page_token] if args.key?(:page_token)
|
1841
|
+
@partition_count = args[:partition_count] if args.key?(:partition_count)
|
1842
|
+
@structured_query = args[:structured_query] if args.key?(:structured_query)
|
1843
|
+
end
|
1844
|
+
end
|
1845
|
+
|
1846
|
+
# The response for Firestore.PartitionQuery.
|
1847
|
+
class PartitionQueryResponse
|
1848
|
+
include Google::Apis::Core::Hashable
|
1849
|
+
|
1850
|
+
# A page token that may be used to request an additional set of results, up to
|
1851
|
+
# the number specified by `partition_count` in the PartitionQuery request. If
|
1852
|
+
# blank, there are no more results.
|
1853
|
+
# Corresponds to the JSON property `nextPageToken`
|
1854
|
+
# @return [String]
|
1855
|
+
attr_accessor :next_page_token
|
1856
|
+
|
1857
|
+
# Partition results. Each partition is a split point that can be used by
|
1858
|
+
# RunQuery as a starting or end point for the query results. The RunQuery
|
1859
|
+
# requests must be made with the same query supplied to this PartitionQuery
|
1860
|
+
# request. The partition cursors will be ordered according to same ordering as
|
1861
|
+
# the results of the query supplied to PartitionQuery. For example, if a
|
1862
|
+
# PartitionQuery request returns partition cursors A and B, running the
|
1863
|
+
# following three queries will return the entire result set of the original
|
1864
|
+
# query: * query, end_at A * query, start_at A, end_at B * query, start_at B An
|
1865
|
+
# empty result may indicate that the query has too few results to be partitioned.
|
1866
|
+
# Corresponds to the JSON property `partitions`
|
1867
|
+
# @return [Array<Google::Apis::FirestoreV1::Cursor>]
|
1868
|
+
attr_accessor :partitions
|
1869
|
+
|
1870
|
+
def initialize(**args)
|
1871
|
+
update!(**args)
|
1872
|
+
end
|
1873
|
+
|
1874
|
+
# Update properties of this object
|
1875
|
+
def update!(**args)
|
1876
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1877
|
+
@partitions = args[:partitions] if args.key?(:partitions)
|
1878
|
+
end
|
1879
|
+
end
|
1880
|
+
|
1881
|
+
# A precondition on a document, used for conditional operations.
|
1882
|
+
class Precondition
|
1883
|
+
include Google::Apis::Core::Hashable
|
1884
|
+
|
1885
|
+
# When set to `true`, the target document must exist. When set to `false`, the
|
1886
|
+
# target document must not exist.
|
1887
|
+
# Corresponds to the JSON property `exists`
|
1888
|
+
# @return [Boolean]
|
1889
|
+
attr_accessor :exists
|
1890
|
+
alias_method :exists?, :exists
|
1891
|
+
|
1892
|
+
# When set, the target document must exist and have been last updated at that
|
1893
|
+
# time.
|
1894
|
+
# Corresponds to the JSON property `updateTime`
|
1895
|
+
# @return [String]
|
1896
|
+
attr_accessor :update_time
|
1897
|
+
|
1898
|
+
def initialize(**args)
|
1899
|
+
update!(**args)
|
1900
|
+
end
|
1901
|
+
|
1902
|
+
# Update properties of this object
|
1903
|
+
def update!(**args)
|
1904
|
+
@exists = args[:exists] if args.key?(:exists)
|
1905
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
1906
|
+
end
|
1907
|
+
end
|
1908
|
+
|
1909
|
+
# The projection of document's fields to return.
|
1910
|
+
class Projection
|
1911
|
+
include Google::Apis::Core::Hashable
|
1912
|
+
|
1913
|
+
# The fields to return. If empty, all fields are returned. To only return the
|
1914
|
+
# name of the document, use `['__name__']`.
|
1915
|
+
# Corresponds to the JSON property `fields`
|
1916
|
+
# @return [Array<Google::Apis::FirestoreV1::FieldReference>]
|
1917
|
+
attr_accessor :fields
|
1918
|
+
|
1919
|
+
def initialize(**args)
|
1920
|
+
update!(**args)
|
1921
|
+
end
|
1922
|
+
|
1923
|
+
# Update properties of this object
|
1924
|
+
def update!(**args)
|
1925
|
+
@fields = args[:fields] if args.key?(:fields)
|
1926
|
+
end
|
1927
|
+
end
|
1928
|
+
|
1929
|
+
# A target specified by a query.
|
1930
|
+
class QueryTarget
|
1931
|
+
include Google::Apis::Core::Hashable
|
1932
|
+
|
1933
|
+
# The parent resource name. In the format: `projects/`project_id`/databases/`
|
1934
|
+
# database_id`/documents` or `projects/`project_id`/databases/`database_id`/
|
1935
|
+
# documents/`document_path``. For example: `projects/my-project/databases/my-
|
1936
|
+
# database/documents` or `projects/my-project/databases/my-database/documents/
|
1937
|
+
# chatrooms/my-chatroom`
|
1938
|
+
# Corresponds to the JSON property `parent`
|
1939
|
+
# @return [String]
|
1940
|
+
attr_accessor :parent
|
1941
|
+
|
1942
|
+
# A Firestore query.
|
1943
|
+
# Corresponds to the JSON property `structuredQuery`
|
1944
|
+
# @return [Google::Apis::FirestoreV1::StructuredQuery]
|
1945
|
+
attr_accessor :structured_query
|
1946
|
+
|
1947
|
+
def initialize(**args)
|
1948
|
+
update!(**args)
|
1949
|
+
end
|
1950
|
+
|
1951
|
+
# Update properties of this object
|
1952
|
+
def update!(**args)
|
1953
|
+
@parent = args[:parent] if args.key?(:parent)
|
1954
|
+
@structured_query = args[:structured_query] if args.key?(:structured_query)
|
1955
|
+
end
|
1956
|
+
end
|
1957
|
+
|
1958
|
+
# Options for a transaction that can only be used to read documents.
|
1959
|
+
class ReadOnly
|
1960
|
+
include Google::Apis::Core::Hashable
|
1961
|
+
|
1962
|
+
# Reads documents at the given time. This may not be older than 60 seconds.
|
1963
|
+
# Corresponds to the JSON property `readTime`
|
1964
|
+
# @return [String]
|
1965
|
+
attr_accessor :read_time
|
1966
|
+
|
1967
|
+
def initialize(**args)
|
1968
|
+
update!(**args)
|
1969
|
+
end
|
1970
|
+
|
1971
|
+
# Update properties of this object
|
1972
|
+
def update!(**args)
|
1973
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1974
|
+
end
|
1975
|
+
end
|
1976
|
+
|
1977
|
+
# Options for a transaction that can be used to read and write documents.
|
1978
|
+
class ReadWrite
|
1979
|
+
include Google::Apis::Core::Hashable
|
1980
|
+
|
1981
|
+
# An optional transaction to retry.
|
1982
|
+
# Corresponds to the JSON property `retryTransaction`
|
1983
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1984
|
+
# @return [String]
|
1985
|
+
attr_accessor :retry_transaction
|
1986
|
+
|
1987
|
+
def initialize(**args)
|
1988
|
+
update!(**args)
|
1989
|
+
end
|
1990
|
+
|
1991
|
+
# Update properties of this object
|
1992
|
+
def update!(**args)
|
1993
|
+
@retry_transaction = args[:retry_transaction] if args.key?(:retry_transaction)
|
1994
|
+
end
|
1995
|
+
end
|
1996
|
+
|
1997
|
+
# The request for Firestore.Rollback.
|
1998
|
+
class RollbackRequest
|
1999
|
+
include Google::Apis::Core::Hashable
|
2000
|
+
|
2001
|
+
# Required. The transaction to roll back.
|
2002
|
+
# Corresponds to the JSON property `transaction`
|
2003
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2004
|
+
# @return [String]
|
2005
|
+
attr_accessor :transaction
|
2006
|
+
|
2007
|
+
def initialize(**args)
|
2008
|
+
update!(**args)
|
2009
|
+
end
|
2010
|
+
|
2011
|
+
# Update properties of this object
|
2012
|
+
def update!(**args)
|
2013
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
2014
|
+
end
|
2015
|
+
end
|
2016
|
+
|
2017
|
+
# The request for Firestore.RunQuery.
|
2018
|
+
class RunQueryRequest
|
2019
|
+
include Google::Apis::Core::Hashable
|
2020
|
+
|
2021
|
+
# Options for creating a new transaction.
|
2022
|
+
# Corresponds to the JSON property `newTransaction`
|
2023
|
+
# @return [Google::Apis::FirestoreV1::TransactionOptions]
|
2024
|
+
attr_accessor :new_transaction
|
2025
|
+
|
2026
|
+
# Reads documents as they were at the given time. This may not be older than 270
|
2027
|
+
# seconds.
|
2028
|
+
# Corresponds to the JSON property `readTime`
|
2029
|
+
# @return [String]
|
2030
|
+
attr_accessor :read_time
|
2031
|
+
|
2032
|
+
# A Firestore query.
|
2033
|
+
# Corresponds to the JSON property `structuredQuery`
|
2034
|
+
# @return [Google::Apis::FirestoreV1::StructuredQuery]
|
2035
|
+
attr_accessor :structured_query
|
2036
|
+
|
2037
|
+
# Reads documents in a transaction.
|
2038
|
+
# Corresponds to the JSON property `transaction`
|
2039
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2040
|
+
# @return [String]
|
2041
|
+
attr_accessor :transaction
|
2042
|
+
|
2043
|
+
def initialize(**args)
|
2044
|
+
update!(**args)
|
2045
|
+
end
|
2046
|
+
|
2047
|
+
# Update properties of this object
|
2048
|
+
def update!(**args)
|
2049
|
+
@new_transaction = args[:new_transaction] if args.key?(:new_transaction)
|
2050
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
2051
|
+
@structured_query = args[:structured_query] if args.key?(:structured_query)
|
2052
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
2053
|
+
end
|
2054
|
+
end
|
2055
|
+
|
2056
|
+
# The response for Firestore.RunQuery.
|
2057
|
+
class RunQueryResponse
|
2058
|
+
include Google::Apis::Core::Hashable
|
2059
|
+
|
2060
|
+
# A Firestore document. Must not exceed 1 MiB - 4 bytes.
|
2061
|
+
# Corresponds to the JSON property `document`
|
2062
|
+
# @return [Google::Apis::FirestoreV1::Document]
|
2063
|
+
attr_accessor :document
|
2064
|
+
|
2065
|
+
# The time at which the document was read. This may be monotonically increasing;
|
2066
|
+
# in this case, the previous documents in the result stream are guaranteed not
|
2067
|
+
# to have changed between their `read_time` and this one. If the query returns
|
2068
|
+
# no results, a response with `read_time` and no `document` will be sent, and
|
2069
|
+
# this represents the time at which the query was run.
|
2070
|
+
# Corresponds to the JSON property `readTime`
|
2071
|
+
# @return [String]
|
2072
|
+
attr_accessor :read_time
|
2073
|
+
|
2074
|
+
# The number of results that have been skipped due to an offset between the last
|
2075
|
+
# response and the current response.
|
2076
|
+
# Corresponds to the JSON property `skippedResults`
|
2077
|
+
# @return [Fixnum]
|
2078
|
+
attr_accessor :skipped_results
|
2079
|
+
|
2080
|
+
# The transaction that was started as part of this request. Can only be set in
|
2081
|
+
# the first response, and only if RunQueryRequest.new_transaction was set in the
|
2082
|
+
# request. If set, no other fields will be set in this response.
|
2083
|
+
# Corresponds to the JSON property `transaction`
|
2084
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2085
|
+
# @return [String]
|
2086
|
+
attr_accessor :transaction
|
2087
|
+
|
2088
|
+
def initialize(**args)
|
2089
|
+
update!(**args)
|
2090
|
+
end
|
2091
|
+
|
2092
|
+
# Update properties of this object
|
2093
|
+
def update!(**args)
|
2094
|
+
@document = args[:document] if args.key?(:document)
|
2095
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
2096
|
+
@skipped_results = args[:skipped_results] if args.key?(:skipped_results)
|
2097
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
2098
|
+
end
|
2099
|
+
end
|
2100
|
+
|
2101
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2102
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
2103
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
2104
|
+
# data: error code, error message, and error details. You can find out more
|
2105
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
2106
|
+
# //cloud.google.com/apis/design/errors).
|
2107
|
+
class Status
|
2108
|
+
include Google::Apis::Core::Hashable
|
2109
|
+
|
2110
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
2111
|
+
# Corresponds to the JSON property `code`
|
2112
|
+
# @return [Fixnum]
|
2113
|
+
attr_accessor :code
|
2114
|
+
|
2115
|
+
# A list of messages that carry the error details. There is a common set of
|
2116
|
+
# message types for APIs to use.
|
2117
|
+
# Corresponds to the JSON property `details`
|
2118
|
+
# @return [Array<Hash<String,Object>>]
|
2119
|
+
attr_accessor :details
|
2120
|
+
|
2121
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
2122
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
2123
|
+
# field, or localized by the client.
|
2124
|
+
# Corresponds to the JSON property `message`
|
2125
|
+
# @return [String]
|
2126
|
+
attr_accessor :message
|
2127
|
+
|
2128
|
+
def initialize(**args)
|
2129
|
+
update!(**args)
|
2130
|
+
end
|
2131
|
+
|
2132
|
+
# Update properties of this object
|
2133
|
+
def update!(**args)
|
2134
|
+
@code = args[:code] if args.key?(:code)
|
2135
|
+
@details = args[:details] if args.key?(:details)
|
2136
|
+
@message = args[:message] if args.key?(:message)
|
2137
|
+
end
|
2138
|
+
end
|
2139
|
+
|
2140
|
+
# A Firestore query.
|
2141
|
+
class StructuredQuery
|
2142
|
+
include Google::Apis::Core::Hashable
|
2143
|
+
|
2144
|
+
# A position in a query result set.
|
2145
|
+
# Corresponds to the JSON property `endAt`
|
2146
|
+
# @return [Google::Apis::FirestoreV1::Cursor]
|
2147
|
+
attr_accessor :end_at
|
2148
|
+
|
2149
|
+
# The collections to query.
|
2150
|
+
# Corresponds to the JSON property `from`
|
2151
|
+
# @return [Array<Google::Apis::FirestoreV1::CollectionSelector>]
|
2152
|
+
attr_accessor :from
|
2153
|
+
|
2154
|
+
# The maximum number of results to return. Applies after all other constraints.
|
2155
|
+
# Must be >= 0 if specified.
|
2156
|
+
# Corresponds to the JSON property `limit`
|
2157
|
+
# @return [Fixnum]
|
2158
|
+
attr_accessor :limit
|
2159
|
+
|
2160
|
+
# The number of results to skip. Applies before limit, but after all other
|
2161
|
+
# constraints. Must be >= 0 if specified.
|
2162
|
+
# Corresponds to the JSON property `offset`
|
2163
|
+
# @return [Fixnum]
|
2164
|
+
attr_accessor :offset
|
2165
|
+
|
2166
|
+
# The order to apply to the query results. Firestore guarantees a stable
|
2167
|
+
# ordering through the following rules: * Any field required to appear in `
|
2168
|
+
# order_by`, that is not already specified in `order_by`, is appended to the
|
2169
|
+
# order in field name order by default. * If an order on `__name__` is not
|
2170
|
+
# specified, it is appended by default. Fields are appended with the same sort
|
2171
|
+
# direction as the last order specified, or 'ASCENDING' if no order was
|
2172
|
+
# specified. For example: * `SELECT * FROM Foo ORDER BY A` becomes `SELECT *
|
2173
|
+
# FROM Foo ORDER BY A, __name__` * `SELECT * FROM Foo ORDER BY A DESC` becomes `
|
2174
|
+
# SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` * `SELECT * FROM Foo WHERE A
|
2175
|
+
# > 1` becomes `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
|
2176
|
+
# Corresponds to the JSON property `orderBy`
|
2177
|
+
# @return [Array<Google::Apis::FirestoreV1::Order>]
|
2178
|
+
attr_accessor :order_by
|
2179
|
+
|
2180
|
+
# The projection of document's fields to return.
|
2181
|
+
# Corresponds to the JSON property `select`
|
2182
|
+
# @return [Google::Apis::FirestoreV1::Projection]
|
2183
|
+
attr_accessor :select
|
2184
|
+
|
2185
|
+
# A position in a query result set.
|
2186
|
+
# Corresponds to the JSON property `startAt`
|
2187
|
+
# @return [Google::Apis::FirestoreV1::Cursor]
|
2188
|
+
attr_accessor :start_at
|
2189
|
+
|
2190
|
+
# A filter.
|
2191
|
+
# Corresponds to the JSON property `where`
|
2192
|
+
# @return [Google::Apis::FirestoreV1::Filter]
|
2193
|
+
attr_accessor :where
|
2194
|
+
|
2195
|
+
def initialize(**args)
|
2196
|
+
update!(**args)
|
2197
|
+
end
|
2198
|
+
|
2199
|
+
# Update properties of this object
|
2200
|
+
def update!(**args)
|
2201
|
+
@end_at = args[:end_at] if args.key?(:end_at)
|
2202
|
+
@from = args[:from] if args.key?(:from)
|
2203
|
+
@limit = args[:limit] if args.key?(:limit)
|
2204
|
+
@offset = args[:offset] if args.key?(:offset)
|
2205
|
+
@order_by = args[:order_by] if args.key?(:order_by)
|
2206
|
+
@select = args[:select] if args.key?(:select)
|
2207
|
+
@start_at = args[:start_at] if args.key?(:start_at)
|
2208
|
+
@where = args[:where] if args.key?(:where)
|
2209
|
+
end
|
2210
|
+
end
|
2211
|
+
|
2212
|
+
# A specification of a set of documents to listen to.
|
2213
|
+
class Target
|
2214
|
+
include Google::Apis::Core::Hashable
|
2215
|
+
|
2216
|
+
# A target specified by a set of documents names.
|
2217
|
+
# Corresponds to the JSON property `documents`
|
2218
|
+
# @return [Google::Apis::FirestoreV1::DocumentsTarget]
|
2219
|
+
attr_accessor :documents
|
2220
|
+
|
2221
|
+
# If the target should be removed once it is current and consistent.
|
2222
|
+
# Corresponds to the JSON property `once`
|
2223
|
+
# @return [Boolean]
|
2224
|
+
attr_accessor :once
|
2225
|
+
alias_method :once?, :once
|
2226
|
+
|
2227
|
+
# A target specified by a query.
|
2228
|
+
# Corresponds to the JSON property `query`
|
2229
|
+
# @return [Google::Apis::FirestoreV1::QueryTarget]
|
2230
|
+
attr_accessor :query
|
2231
|
+
|
2232
|
+
# Start listening after a specific `read_time`. The client must know the state
|
2233
|
+
# of matching documents at this time.
|
2234
|
+
# Corresponds to the JSON property `readTime`
|
2235
|
+
# @return [String]
|
2236
|
+
attr_accessor :read_time
|
2237
|
+
|
2238
|
+
# A resume token from a prior TargetChange for an identical target. Using a
|
2239
|
+
# resume token with a different target is unsupported and may fail.
|
2240
|
+
# Corresponds to the JSON property `resumeToken`
|
2241
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2242
|
+
# @return [String]
|
2243
|
+
attr_accessor :resume_token
|
2244
|
+
|
2245
|
+
# The target ID that identifies the target on the stream. Must be a positive
|
2246
|
+
# number and non-zero.
|
2247
|
+
# Corresponds to the JSON property `targetId`
|
2248
|
+
# @return [Fixnum]
|
2249
|
+
attr_accessor :target_id
|
2250
|
+
|
2251
|
+
def initialize(**args)
|
2252
|
+
update!(**args)
|
2253
|
+
end
|
2254
|
+
|
2255
|
+
# Update properties of this object
|
2256
|
+
def update!(**args)
|
2257
|
+
@documents = args[:documents] if args.key?(:documents)
|
2258
|
+
@once = args[:once] if args.key?(:once)
|
2259
|
+
@query = args[:query] if args.key?(:query)
|
2260
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
2261
|
+
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
2262
|
+
@target_id = args[:target_id] if args.key?(:target_id)
|
2263
|
+
end
|
2264
|
+
end
|
2265
|
+
|
2266
|
+
# Targets being watched have changed.
|
2267
|
+
class TargetChange
|
2268
|
+
include Google::Apis::Core::Hashable
|
2269
|
+
|
2270
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2271
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
2272
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
2273
|
+
# data: error code, error message, and error details. You can find out more
|
2274
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
2275
|
+
# //cloud.google.com/apis/design/errors).
|
2276
|
+
# Corresponds to the JSON property `cause`
|
2277
|
+
# @return [Google::Apis::FirestoreV1::Status]
|
2278
|
+
attr_accessor :cause
|
2279
|
+
|
2280
|
+
# The consistent `read_time` for the given `target_ids` (omitted when the
|
2281
|
+
# target_ids are not at a consistent snapshot). The stream is guaranteed to send
|
2282
|
+
# a `read_time` with `target_ids` empty whenever the entire stream reaches a new
|
2283
|
+
# consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (
|
2284
|
+
# eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE
|
2285
|
+
# messages are not). For a given stream, `read_time` is guaranteed to be
|
2286
|
+
# monotonically increasing.
|
2287
|
+
# Corresponds to the JSON property `readTime`
|
2288
|
+
# @return [String]
|
2289
|
+
attr_accessor :read_time
|
2290
|
+
|
2291
|
+
# A token that can be used to resume the stream for the given `target_ids`, or
|
2292
|
+
# all targets if `target_ids` is empty. Not set on every target change.
|
2293
|
+
# Corresponds to the JSON property `resumeToken`
|
2294
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2295
|
+
# @return [String]
|
2296
|
+
attr_accessor :resume_token
|
2297
|
+
|
2298
|
+
# The type of change that occurred.
|
2299
|
+
# Corresponds to the JSON property `targetChangeType`
|
2300
|
+
# @return [String]
|
2301
|
+
attr_accessor :target_change_type
|
2302
|
+
|
2303
|
+
# The target IDs of targets that have changed. If empty, the change applies to
|
2304
|
+
# all targets. The order of the target IDs is not defined.
|
2305
|
+
# Corresponds to the JSON property `targetIds`
|
2306
|
+
# @return [Array<Fixnum>]
|
2307
|
+
attr_accessor :target_ids
|
2308
|
+
|
2309
|
+
def initialize(**args)
|
2310
|
+
update!(**args)
|
2311
|
+
end
|
2312
|
+
|
2313
|
+
# Update properties of this object
|
2314
|
+
def update!(**args)
|
2315
|
+
@cause = args[:cause] if args.key?(:cause)
|
2316
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
2317
|
+
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
2318
|
+
@target_change_type = args[:target_change_type] if args.key?(:target_change_type)
|
2319
|
+
@target_ids = args[:target_ids] if args.key?(:target_ids)
|
2320
|
+
end
|
2321
|
+
end
|
2322
|
+
|
2323
|
+
# Options for creating a new transaction.
|
2324
|
+
class TransactionOptions
|
2325
|
+
include Google::Apis::Core::Hashable
|
2326
|
+
|
2327
|
+
# Options for a transaction that can only be used to read documents.
|
2328
|
+
# Corresponds to the JSON property `readOnly`
|
2329
|
+
# @return [Google::Apis::FirestoreV1::ReadOnly]
|
2330
|
+
attr_accessor :read_only
|
2331
|
+
|
2332
|
+
# Options for a transaction that can be used to read and write documents.
|
2333
|
+
# Corresponds to the JSON property `readWrite`
|
2334
|
+
# @return [Google::Apis::FirestoreV1::ReadWrite]
|
2335
|
+
attr_accessor :read_write
|
2336
|
+
|
2337
|
+
def initialize(**args)
|
2338
|
+
update!(**args)
|
2339
|
+
end
|
2340
|
+
|
2341
|
+
# Update properties of this object
|
2342
|
+
def update!(**args)
|
2343
|
+
@read_only = args[:read_only] if args.key?(:read_only)
|
2344
|
+
@read_write = args[:read_write] if args.key?(:read_write)
|
2345
|
+
end
|
2346
|
+
end
|
2347
|
+
|
2348
|
+
# A filter with a single operand.
|
2349
|
+
class UnaryFilter
|
2350
|
+
include Google::Apis::Core::Hashable
|
2351
|
+
|
2352
|
+
# A reference to a field, such as `max(messages.time) as max_time`.
|
2353
|
+
# Corresponds to the JSON property `field`
|
2354
|
+
# @return [Google::Apis::FirestoreV1::FieldReference]
|
2355
|
+
attr_accessor :field
|
2356
|
+
|
2357
|
+
# The unary operator to apply.
|
2358
|
+
# Corresponds to the JSON property `op`
|
2359
|
+
# @return [String]
|
2360
|
+
attr_accessor :op
|
2361
|
+
|
2362
|
+
def initialize(**args)
|
2363
|
+
update!(**args)
|
2364
|
+
end
|
2365
|
+
|
2366
|
+
# Update properties of this object
|
2367
|
+
def update!(**args)
|
2368
|
+
@field = args[:field] if args.key?(:field)
|
2369
|
+
@op = args[:op] if args.key?(:op)
|
2370
|
+
end
|
2371
|
+
end
|
2372
|
+
|
2373
|
+
# A message that can hold any of the supported value types.
|
2374
|
+
class Value
|
2375
|
+
include Google::Apis::Core::Hashable
|
2376
|
+
|
2377
|
+
# An array value.
|
2378
|
+
# Corresponds to the JSON property `arrayValue`
|
2379
|
+
# @return [Google::Apis::FirestoreV1::ArrayValue]
|
2380
|
+
attr_accessor :array_value
|
2381
|
+
|
2382
|
+
# A boolean value.
|
2383
|
+
# Corresponds to the JSON property `booleanValue`
|
2384
|
+
# @return [Boolean]
|
2385
|
+
attr_accessor :boolean_value
|
2386
|
+
alias_method :boolean_value?, :boolean_value
|
2387
|
+
|
2388
|
+
# A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes
|
2389
|
+
# are considered by queries.
|
2390
|
+
# Corresponds to the JSON property `bytesValue`
|
2391
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2392
|
+
# @return [String]
|
2393
|
+
attr_accessor :bytes_value
|
2394
|
+
|
2395
|
+
# A double value.
|
2396
|
+
# Corresponds to the JSON property `doubleValue`
|
2397
|
+
# @return [Float]
|
2398
|
+
attr_accessor :double_value
|
2399
|
+
|
2400
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
2401
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
2402
|
+
# specified otherwise, this must conform to the WGS84 standard. Values must be
|
2403
|
+
# within normalized ranges.
|
2404
|
+
# Corresponds to the JSON property `geoPointValue`
|
2405
|
+
# @return [Google::Apis::FirestoreV1::LatLng]
|
2406
|
+
attr_accessor :geo_point_value
|
2407
|
+
|
2408
|
+
# An integer value.
|
2409
|
+
# Corresponds to the JSON property `integerValue`
|
2410
|
+
# @return [Fixnum]
|
2411
|
+
attr_accessor :integer_value
|
2412
|
+
|
2413
|
+
# A map value.
|
2414
|
+
# Corresponds to the JSON property `mapValue`
|
2415
|
+
# @return [Google::Apis::FirestoreV1::MapValue]
|
2416
|
+
attr_accessor :map_value
|
2417
|
+
|
2418
|
+
# A null value.
|
2419
|
+
# Corresponds to the JSON property `nullValue`
|
2420
|
+
# @return [String]
|
2421
|
+
attr_accessor :null_value
|
2422
|
+
|
2423
|
+
# A reference to a document. For example: `projects/`project_id`/databases/`
|
2424
|
+
# database_id`/documents/`document_path``.
|
2425
|
+
# Corresponds to the JSON property `referenceValue`
|
2426
|
+
# @return [String]
|
2427
|
+
attr_accessor :reference_value
|
2428
|
+
|
2429
|
+
# A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89
|
2430
|
+
# bytes. Only the first 1,500 bytes of the UTF-8 representation are considered
|
2431
|
+
# by queries.
|
2432
|
+
# Corresponds to the JSON property `stringValue`
|
2433
|
+
# @return [String]
|
2434
|
+
attr_accessor :string_value
|
2435
|
+
|
2436
|
+
# A timestamp value. Precise only to microseconds. When stored, any additional
|
2437
|
+
# precision is rounded down.
|
2438
|
+
# Corresponds to the JSON property `timestampValue`
|
2439
|
+
# @return [String]
|
2440
|
+
attr_accessor :timestamp_value
|
2441
|
+
|
2442
|
+
def initialize(**args)
|
2443
|
+
update!(**args)
|
2444
|
+
end
|
2445
|
+
|
2446
|
+
# Update properties of this object
|
2447
|
+
def update!(**args)
|
2448
|
+
@array_value = args[:array_value] if args.key?(:array_value)
|
2449
|
+
@boolean_value = args[:boolean_value] if args.key?(:boolean_value)
|
2450
|
+
@bytes_value = args[:bytes_value] if args.key?(:bytes_value)
|
2451
|
+
@double_value = args[:double_value] if args.key?(:double_value)
|
2452
|
+
@geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value)
|
2453
|
+
@integer_value = args[:integer_value] if args.key?(:integer_value)
|
2454
|
+
@map_value = args[:map_value] if args.key?(:map_value)
|
2455
|
+
@null_value = args[:null_value] if args.key?(:null_value)
|
2456
|
+
@reference_value = args[:reference_value] if args.key?(:reference_value)
|
2457
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
2458
|
+
@timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
|
2459
|
+
end
|
2460
|
+
end
|
2461
|
+
|
2462
|
+
# A write on a document.
|
2463
|
+
class Write
|
2464
|
+
include Google::Apis::Core::Hashable
|
2465
|
+
|
2466
|
+
# A precondition on a document, used for conditional operations.
|
2467
|
+
# Corresponds to the JSON property `currentDocument`
|
2468
|
+
# @return [Google::Apis::FirestoreV1::Precondition]
|
2469
|
+
attr_accessor :current_document
|
2470
|
+
|
2471
|
+
# A document name to delete. In the format: `projects/`project_id`/databases/`
|
2472
|
+
# database_id`/documents/`document_path``.
|
2473
|
+
# Corresponds to the JSON property `delete`
|
2474
|
+
# @return [String]
|
2475
|
+
attr_accessor :delete
|
2476
|
+
|
2477
|
+
# A transformation of a document.
|
2478
|
+
# Corresponds to the JSON property `transform`
|
2479
|
+
# @return [Google::Apis::FirestoreV1::DocumentTransform]
|
2480
|
+
attr_accessor :transform
|
2481
|
+
|
2482
|
+
# A Firestore document. Must not exceed 1 MiB - 4 bytes.
|
2483
|
+
# Corresponds to the JSON property `update`
|
2484
|
+
# @return [Google::Apis::FirestoreV1::Document]
|
2485
|
+
attr_accessor :update
|
2486
|
+
|
2487
|
+
# A set of field paths on a document. Used to restrict a get or update operation
|
2488
|
+
# on a document to a subset of its fields. This is different from standard field
|
2489
|
+
# masks, as this is always scoped to a Document, and takes in account the
|
2490
|
+
# dynamic nature of Value.
|
2491
|
+
# Corresponds to the JSON property `updateMask`
|
2492
|
+
# @return [Google::Apis::FirestoreV1::DocumentMask]
|
2493
|
+
attr_accessor :update_mask
|
2494
|
+
|
2495
|
+
# The transforms to perform after update. This field can be set only when the
|
2496
|
+
# operation is `update`. If present, this write is equivalent to performing `
|
2497
|
+
# update` and `transform` to the same document atomically and in order.
|
2498
|
+
# Corresponds to the JSON property `updateTransforms`
|
2499
|
+
# @return [Array<Google::Apis::FirestoreV1::FieldTransform>]
|
2500
|
+
attr_accessor :update_transforms
|
2501
|
+
|
2502
|
+
def initialize(**args)
|
2503
|
+
update!(**args)
|
2504
|
+
end
|
2505
|
+
|
2506
|
+
# Update properties of this object
|
2507
|
+
def update!(**args)
|
2508
|
+
@current_document = args[:current_document] if args.key?(:current_document)
|
2509
|
+
@delete = args[:delete] if args.key?(:delete)
|
2510
|
+
@transform = args[:transform] if args.key?(:transform)
|
2511
|
+
@update = args[:update] if args.key?(:update)
|
2512
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
2513
|
+
@update_transforms = args[:update_transforms] if args.key?(:update_transforms)
|
2514
|
+
end
|
2515
|
+
end
|
2516
|
+
|
2517
|
+
# The request for Firestore.Write. The first request creates a stream, or
|
2518
|
+
# resumes an existing one from a token. When creating a new stream, the server
|
2519
|
+
# replies with a response containing only an ID and a token, to use in the next
|
2520
|
+
# request. When resuming a stream, the server first streams any responses later
|
2521
|
+
# than the given token, then a response containing only an up-to-date token, to
|
2522
|
+
# use in the next request.
|
2523
|
+
class WriteRequest
|
2524
|
+
include Google::Apis::Core::Hashable
|
2525
|
+
|
2526
|
+
# Labels associated with this write request.
|
2527
|
+
# Corresponds to the JSON property `labels`
|
2528
|
+
# @return [Hash<String,String>]
|
2529
|
+
attr_accessor :labels
|
2530
|
+
|
2531
|
+
# The ID of the write stream to resume. This may only be set in the first
|
2532
|
+
# message. When left empty, a new write stream will be created.
|
2533
|
+
# Corresponds to the JSON property `streamId`
|
2534
|
+
# @return [String]
|
2535
|
+
attr_accessor :stream_id
|
2536
|
+
|
2537
|
+
# A stream token that was previously sent by the server. The client should set
|
2538
|
+
# this field to the token from the most recent WriteResponse it has received.
|
2539
|
+
# This acknowledges that the client has received responses up to this token.
|
2540
|
+
# After sending this token, earlier tokens may not be used anymore. The server
|
2541
|
+
# may close the stream if there are too many unacknowledged responses. Leave
|
2542
|
+
# this field unset when creating a new stream. To resume a stream at a specific
|
2543
|
+
# point, set this field and the `stream_id` field. Leave this field unset when
|
2544
|
+
# creating a new stream.
|
2545
|
+
# Corresponds to the JSON property `streamToken`
|
2546
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2547
|
+
# @return [String]
|
2548
|
+
attr_accessor :stream_token
|
2549
|
+
|
2550
|
+
# The writes to apply. Always executed atomically and in order. This must be
|
2551
|
+
# empty on the first request. This may be empty on the last request. This must
|
2552
|
+
# not be empty on all other requests.
|
2553
|
+
# Corresponds to the JSON property `writes`
|
2554
|
+
# @return [Array<Google::Apis::FirestoreV1::Write>]
|
2555
|
+
attr_accessor :writes
|
2556
|
+
|
2557
|
+
def initialize(**args)
|
2558
|
+
update!(**args)
|
2559
|
+
end
|
2560
|
+
|
2561
|
+
# Update properties of this object
|
2562
|
+
def update!(**args)
|
2563
|
+
@labels = args[:labels] if args.key?(:labels)
|
2564
|
+
@stream_id = args[:stream_id] if args.key?(:stream_id)
|
2565
|
+
@stream_token = args[:stream_token] if args.key?(:stream_token)
|
2566
|
+
@writes = args[:writes] if args.key?(:writes)
|
2567
|
+
end
|
2568
|
+
end
|
2569
|
+
|
2570
|
+
# The response for Firestore.Write.
|
2571
|
+
class WriteResponse
|
2572
|
+
include Google::Apis::Core::Hashable
|
2573
|
+
|
2574
|
+
# The time at which the commit occurred. Any read with an equal or greater `
|
2575
|
+
# read_time` is guaranteed to see the effects of the write.
|
2576
|
+
# Corresponds to the JSON property `commitTime`
|
2577
|
+
# @return [String]
|
2578
|
+
attr_accessor :commit_time
|
2579
|
+
|
2580
|
+
# The ID of the stream. Only set on the first message, when a new stream was
|
2581
|
+
# created.
|
2582
|
+
# Corresponds to the JSON property `streamId`
|
2583
|
+
# @return [String]
|
2584
|
+
attr_accessor :stream_id
|
2585
|
+
|
2586
|
+
# A token that represents the position of this response in the stream. This can
|
2587
|
+
# be used by a client to resume the stream at this point. This field is always
|
2588
|
+
# set.
|
2589
|
+
# Corresponds to the JSON property `streamToken`
|
2590
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2591
|
+
# @return [String]
|
2592
|
+
attr_accessor :stream_token
|
2593
|
+
|
2594
|
+
# The result of applying the writes. This i-th write result corresponds to the i-
|
2595
|
+
# th write in the request.
|
2596
|
+
# Corresponds to the JSON property `writeResults`
|
2597
|
+
# @return [Array<Google::Apis::FirestoreV1::WriteResult>]
|
2598
|
+
attr_accessor :write_results
|
2599
|
+
|
2600
|
+
def initialize(**args)
|
2601
|
+
update!(**args)
|
2602
|
+
end
|
2603
|
+
|
2604
|
+
# Update properties of this object
|
2605
|
+
def update!(**args)
|
2606
|
+
@commit_time = args[:commit_time] if args.key?(:commit_time)
|
2607
|
+
@stream_id = args[:stream_id] if args.key?(:stream_id)
|
2608
|
+
@stream_token = args[:stream_token] if args.key?(:stream_token)
|
2609
|
+
@write_results = args[:write_results] if args.key?(:write_results)
|
2610
|
+
end
|
2611
|
+
end
|
2612
|
+
|
2613
|
+
# The result of applying a write.
|
2614
|
+
class WriteResult
|
2615
|
+
include Google::Apis::Core::Hashable
|
2616
|
+
|
2617
|
+
# The results of applying each DocumentTransform.FieldTransform, in the same
|
2618
|
+
# order.
|
2619
|
+
# Corresponds to the JSON property `transformResults`
|
2620
|
+
# @return [Array<Google::Apis::FirestoreV1::Value>]
|
2621
|
+
attr_accessor :transform_results
|
2622
|
+
|
2623
|
+
# The last update time of the document after applying the write. Not set after a
|
2624
|
+
# `delete`. If the write did not actually change the document, this will be the
|
2625
|
+
# previous update_time.
|
2626
|
+
# Corresponds to the JSON property `updateTime`
|
2627
|
+
# @return [String]
|
2628
|
+
attr_accessor :update_time
|
2629
|
+
|
2630
|
+
def initialize(**args)
|
2631
|
+
update!(**args)
|
2632
|
+
end
|
2633
|
+
|
2634
|
+
# Update properties of this object
|
2635
|
+
def update!(**args)
|
2636
|
+
@transform_results = args[:transform_results] if args.key?(:transform_results)
|
2637
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2638
|
+
end
|
2639
|
+
end
|
2640
|
+
end
|
2641
|
+
end
|
2642
|
+
end
|