google-cloud-firestore 1.4.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/CHANGELOG.md +23 -0
- data/lib/google-cloud-firestore.rb +14 -21
- data/lib/google/cloud/firestore.rb +12 -23
- data/lib/google/cloud/firestore/client.rb +12 -14
- data/lib/google/cloud/firestore/collection_reference.rb +1 -0
- data/lib/google/cloud/firestore/collection_reference_list.rb +137 -0
- data/lib/google/cloud/firestore/convert.rb +39 -39
- data/lib/google/cloud/firestore/credentials.rb +2 -2
- data/lib/google/cloud/firestore/document_reference.rb +8 -8
- data/lib/google/cloud/firestore/document_reference/list.rb +2 -2
- data/lib/google/cloud/firestore/document_snapshot.rb +4 -4
- data/lib/google/cloud/firestore/query.rb +4 -4
- data/lib/google/cloud/firestore/service.rb +63 -104
- data/lib/google/cloud/firestore/transaction.rb +2 -2
- data/lib/google/cloud/firestore/version.rb +1 -1
- data/lib/google/cloud/firestore/watch/listener.rb +9 -9
- data/lib/google/cloud/firestore/watch/order.rb +1 -1
- metadata +9 -107
- data/lib/google/cloud/firestore/admin.rb +0 -144
- data/lib/google/cloud/firestore/admin/v1.rb +0 -151
- data/lib/google/cloud/firestore/admin/v1/credentials.rb +0 -44
- data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/field.rb +0 -86
- data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/firestore_admin.rb +0 -161
- data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/index.rb +0 -142
- data/lib/google/cloud/firestore/admin/v1/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/firestore/admin/v1/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/firestore/admin/v1/firestore_admin_client.rb +0 -902
- data/lib/google/cloud/firestore/admin/v1/firestore_admin_client_config.json +0 -76
- data/lib/google/cloud/firestore/v1.rb +0 -152
- data/lib/google/cloud/firestore/v1/credentials.rb +0 -42
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/common.rb +0 -64
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/document.rb +0 -136
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb +0 -566
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/query.rb +0 -227
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/write.rb +0 -241
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/wrappers.rb +0 -26
- data/lib/google/cloud/firestore/v1/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/firestore/v1/firestore_client.rb +0 -1011
- data/lib/google/cloud/firestore/v1/firestore_client_config.json +0 -105
- data/lib/google/cloud/firestore/v1beta1.rb +0 -162
- data/lib/google/cloud/firestore/v1beta1/credentials.rb +0 -42
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/common.rb +0 -64
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/document.rb +0 -136
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/firestore.rb +0 -564
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +0 -227
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +0 -237
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/wrappers.rb +0 -26
- data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +0 -1021
- data/lib/google/cloud/firestore/v1beta1/firestore_client_config.json +0 -100
- data/lib/google/firestore/admin/v1/field_pb.rb +0 -32
- data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +0 -84
- data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +0 -94
- data/lib/google/firestore/admin/v1/index_pb.rb +0 -58
- data/lib/google/firestore/admin/v1/location_pb.rb +0 -22
- data/lib/google/firestore/admin/v1/operation_pb.rb +0 -90
- data/lib/google/firestore/v1/common_pb.rb +0 -45
- data/lib/google/firestore/v1/document_pb.rb +0 -50
- data/lib/google/firestore/v1/firestore_pb.rb +0 -222
- data/lib/google/firestore/v1/firestore_services_pb.rb +0 -80
- data/lib/google/firestore/v1/query_pb.rb +0 -107
- data/lib/google/firestore/v1/write_pb.rb +0 -80
- data/lib/google/firestore/v1beta1/common_pb.rb +0 -45
- data/lib/google/firestore/v1beta1/document_pb.rb +0 -50
- data/lib/google/firestore/v1beta1/firestore_pb.rb +0 -222
- data/lib/google/firestore/v1beta1/firestore_services_pb.rb +0 -89
- data/lib/google/firestore/v1beta1/query_pb.rb +0 -107
- data/lib/google/firestore/v1beta1/write_pb.rb +0 -79
@@ -1,227 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Firestore
|
18
|
-
module V1beta1
|
19
|
-
# A Firestore query.
|
20
|
-
# @!attribute [rw] select
|
21
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::Projection]
|
22
|
-
# The projection to return.
|
23
|
-
# @!attribute [rw] from
|
24
|
-
# @return [Array<Google::Firestore::V1beta1::StructuredQuery::CollectionSelector>]
|
25
|
-
# The collections to query.
|
26
|
-
# @!attribute [rw] where
|
27
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::Filter]
|
28
|
-
# The filter to apply.
|
29
|
-
# @!attribute [rw] order_by
|
30
|
-
# @return [Array<Google::Firestore::V1beta1::StructuredQuery::Order>]
|
31
|
-
# The order to apply to the query results.
|
32
|
-
#
|
33
|
-
# Firestore guarantees a stable ordering through the following rules:
|
34
|
-
#
|
35
|
-
# * Any field required to appear in `order_by`, that is not already
|
36
|
-
# specified in `order_by`, is appended to the order in field name order
|
37
|
-
# by default.
|
38
|
-
# * If an order on `__name__` is not specified, it is appended by default.
|
39
|
-
#
|
40
|
-
# Fields are appended with the same sort direction as the last order
|
41
|
-
# specified, or 'ASCENDING' if no order was specified. For example:
|
42
|
-
#
|
43
|
-
# * `SELECT * FROM Foo ORDER BY A` becomes
|
44
|
-
# `SELECT * FROM Foo ORDER BY A, __name__`
|
45
|
-
# * `SELECT * FROM Foo ORDER BY A DESC` becomes
|
46
|
-
# `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
|
47
|
-
# * `SELECT * FROM Foo WHERE A > 1` becomes
|
48
|
-
# `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
|
49
|
-
# @!attribute [rw] start_at
|
50
|
-
# @return [Google::Firestore::V1beta1::Cursor]
|
51
|
-
# A starting point for the query results.
|
52
|
-
# @!attribute [rw] end_at
|
53
|
-
# @return [Google::Firestore::V1beta1::Cursor]
|
54
|
-
# A end point for the query results.
|
55
|
-
# @!attribute [rw] offset
|
56
|
-
# @return [Integer]
|
57
|
-
# The number of results to skip.
|
58
|
-
#
|
59
|
-
# Applies before limit, but after all other constraints. Must be >= 0 if
|
60
|
-
# specified.
|
61
|
-
# @!attribute [rw] limit
|
62
|
-
# @return [Google::Protobuf::Int32Value]
|
63
|
-
# The maximum number of results to return.
|
64
|
-
#
|
65
|
-
# Applies after all other constraints.
|
66
|
-
# Must be >= 0 if specified.
|
67
|
-
class StructuredQuery
|
68
|
-
# A selection of a collection, such as `messages as m1`.
|
69
|
-
# @!attribute [rw] collection_id
|
70
|
-
# @return [String]
|
71
|
-
# The collection ID.
|
72
|
-
# When set, selects only collections with this ID.
|
73
|
-
# @!attribute [rw] all_descendants
|
74
|
-
# @return [true, false]
|
75
|
-
# When false, selects only collections that are immediate children of
|
76
|
-
# the `parent` specified in the containing `RunQueryRequest`.
|
77
|
-
# When true, selects all descendant collections.
|
78
|
-
class CollectionSelector; end
|
79
|
-
|
80
|
-
# A filter.
|
81
|
-
# @!attribute [rw] composite_filter
|
82
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::CompositeFilter]
|
83
|
-
# A composite filter.
|
84
|
-
# @!attribute [rw] field_filter
|
85
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::FieldFilter]
|
86
|
-
# A filter on a document field.
|
87
|
-
# @!attribute [rw] unary_filter
|
88
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::UnaryFilter]
|
89
|
-
# A filter that takes exactly one argument.
|
90
|
-
class Filter; end
|
91
|
-
|
92
|
-
# A filter that merges multiple other filters using the given operator.
|
93
|
-
# @!attribute [rw] op
|
94
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::CompositeFilter::Operator]
|
95
|
-
# The operator for combining multiple filters.
|
96
|
-
# @!attribute [rw] filters
|
97
|
-
# @return [Array<Google::Firestore::V1beta1::StructuredQuery::Filter>]
|
98
|
-
# The list of filters to combine.
|
99
|
-
# Must contain at least one filter.
|
100
|
-
class CompositeFilter
|
101
|
-
# A composite filter operator.
|
102
|
-
module Operator
|
103
|
-
# Unspecified. This value must not be used.
|
104
|
-
OPERATOR_UNSPECIFIED = 0
|
105
|
-
|
106
|
-
# The results are required to satisfy each of the combined filters.
|
107
|
-
AND = 1
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
# A filter on a specific field.
|
112
|
-
# @!attribute [rw] field
|
113
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::FieldReference]
|
114
|
-
# The field to filter by.
|
115
|
-
# @!attribute [rw] op
|
116
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::FieldFilter::Operator]
|
117
|
-
# The operator to filter by.
|
118
|
-
# @!attribute [rw] value
|
119
|
-
# @return [Google::Firestore::V1beta1::Value]
|
120
|
-
# The value to compare to.
|
121
|
-
class FieldFilter
|
122
|
-
# A field filter operator.
|
123
|
-
module Operator
|
124
|
-
# Unspecified. This value must not be used.
|
125
|
-
OPERATOR_UNSPECIFIED = 0
|
126
|
-
|
127
|
-
# Less than. Requires that the field come first in `order_by`.
|
128
|
-
LESS_THAN = 1
|
129
|
-
|
130
|
-
# Less than or equal. Requires that the field come first in `order_by`.
|
131
|
-
LESS_THAN_OR_EQUAL = 2
|
132
|
-
|
133
|
-
# Greater than. Requires that the field come first in `order_by`.
|
134
|
-
GREATER_THAN = 3
|
135
|
-
|
136
|
-
# Greater than or equal. Requires that the field come first in
|
137
|
-
# `order_by`.
|
138
|
-
GREATER_THAN_OR_EQUAL = 4
|
139
|
-
|
140
|
-
# Equal.
|
141
|
-
EQUAL = 5
|
142
|
-
|
143
|
-
# Contains. Requires that the field is an array.
|
144
|
-
ARRAY_CONTAINS = 7
|
145
|
-
|
146
|
-
# In. Requires that `value` is a non-empty ArrayValue with at most 10
|
147
|
-
# values.
|
148
|
-
IN = 8
|
149
|
-
|
150
|
-
# Contains any. Requires that the field is an array and
|
151
|
-
# `value` is a non-empty ArrayValue with at most 10 values.
|
152
|
-
ARRAY_CONTAINS_ANY = 9
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
# A filter with a single operand.
|
157
|
-
# @!attribute [rw] op
|
158
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::UnaryFilter::Operator]
|
159
|
-
# The unary operator to apply.
|
160
|
-
# @!attribute [rw] field
|
161
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::FieldReference]
|
162
|
-
# The field to which to apply the operator.
|
163
|
-
class UnaryFilter
|
164
|
-
# A unary operator.
|
165
|
-
module Operator
|
166
|
-
# Unspecified. This value must not be used.
|
167
|
-
OPERATOR_UNSPECIFIED = 0
|
168
|
-
|
169
|
-
# Test if a field is equal to NaN.
|
170
|
-
IS_NAN = 2
|
171
|
-
|
172
|
-
# Test if an expression evaluates to Null.
|
173
|
-
IS_NULL = 3
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
177
|
-
# An order on a field.
|
178
|
-
# @!attribute [rw] field
|
179
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::FieldReference]
|
180
|
-
# The field to order by.
|
181
|
-
# @!attribute [rw] direction
|
182
|
-
# @return [Google::Firestore::V1beta1::StructuredQuery::Direction]
|
183
|
-
# The direction to order by. Defaults to `ASCENDING`.
|
184
|
-
class Order; end
|
185
|
-
|
186
|
-
# A reference to a field, such as `max(messages.time) as max_time`.
|
187
|
-
# @!attribute [rw] field_path
|
188
|
-
# @return [String]
|
189
|
-
class FieldReference; end
|
190
|
-
|
191
|
-
# The projection of document's fields to return.
|
192
|
-
# @!attribute [rw] fields
|
193
|
-
# @return [Array<Google::Firestore::V1beta1::StructuredQuery::FieldReference>]
|
194
|
-
# The fields to return.
|
195
|
-
#
|
196
|
-
# If empty, all fields are returned. To only return the name
|
197
|
-
# of the document, use `['__name__']`.
|
198
|
-
class Projection; end
|
199
|
-
|
200
|
-
# A sort direction.
|
201
|
-
module Direction
|
202
|
-
# Unspecified.
|
203
|
-
DIRECTION_UNSPECIFIED = 0
|
204
|
-
|
205
|
-
# Ascending.
|
206
|
-
ASCENDING = 1
|
207
|
-
|
208
|
-
# Descending.
|
209
|
-
DESCENDING = 2
|
210
|
-
end
|
211
|
-
end
|
212
|
-
|
213
|
-
# A position in a query result set.
|
214
|
-
# @!attribute [rw] values
|
215
|
-
# @return [Array<Google::Firestore::V1beta1::Value>]
|
216
|
-
# The values that represent a position, in the order they appear in
|
217
|
-
# the order by clause of a query.
|
218
|
-
#
|
219
|
-
# Can contain fewer values than specified in the order by clause.
|
220
|
-
# @!attribute [rw] before
|
221
|
-
# @return [true, false]
|
222
|
-
# If the position is just before or just after the given values, relative
|
223
|
-
# to the sort order defined by the query.
|
224
|
-
class Cursor; end
|
225
|
-
end
|
226
|
-
end
|
227
|
-
end
|
@@ -1,237 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Firestore
|
18
|
-
module V1beta1
|
19
|
-
# A write on a document.
|
20
|
-
# @!attribute [rw] update
|
21
|
-
# @return [Google::Firestore::V1beta1::Document]
|
22
|
-
# A document to write.
|
23
|
-
# @!attribute [rw] delete
|
24
|
-
# @return [String]
|
25
|
-
# A document name to delete. In the format:
|
26
|
-
# `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
27
|
-
# @!attribute [rw] transform
|
28
|
-
# @return [Google::Firestore::V1beta1::DocumentTransform]
|
29
|
-
# Applies a transformation to a document.
|
30
|
-
# At most one `transform` per document is allowed in a given request.
|
31
|
-
# An `update` cannot follow a `transform` on the same document in a given
|
32
|
-
# request.
|
33
|
-
# @!attribute [rw] update_mask
|
34
|
-
# @return [Google::Firestore::V1beta1::DocumentMask]
|
35
|
-
# The fields to update in this write.
|
36
|
-
#
|
37
|
-
# This field can be set only when the operation is `update`.
|
38
|
-
# If the mask is not set for an `update` and the document exists, any
|
39
|
-
# existing data will be overwritten.
|
40
|
-
# If the mask is set and the document on the server has fields not covered by
|
41
|
-
# the mask, they are left unchanged.
|
42
|
-
# Fields referenced in the mask, but not present in the input document, are
|
43
|
-
# deleted from the document on the server.
|
44
|
-
# The field paths in this mask must not contain a reserved field name.
|
45
|
-
# @!attribute [rw] current_document
|
46
|
-
# @return [Google::Firestore::V1beta1::Precondition]
|
47
|
-
# An optional precondition on the document.
|
48
|
-
#
|
49
|
-
# The write will fail if this is set and not met by the target document.
|
50
|
-
class Write; end
|
51
|
-
|
52
|
-
# A transformation of a document.
|
53
|
-
# @!attribute [rw] document
|
54
|
-
# @return [String]
|
55
|
-
# The name of the document to transform.
|
56
|
-
# @!attribute [rw] field_transforms
|
57
|
-
# @return [Array<Google::Firestore::V1beta1::DocumentTransform::FieldTransform>]
|
58
|
-
# The list of transformations to apply to the fields of the document, in
|
59
|
-
# order.
|
60
|
-
# This must not be empty.
|
61
|
-
class DocumentTransform
|
62
|
-
# A transformation of a field of the document.
|
63
|
-
# @!attribute [rw] field_path
|
64
|
-
# @return [String]
|
65
|
-
# The path of the field. See {Google::Firestore::V1beta1::Document#fields Document#fields} for the field path syntax
|
66
|
-
# reference.
|
67
|
-
# @!attribute [rw] set_to_server_value
|
68
|
-
# @return [Google::Firestore::V1beta1::DocumentTransform::FieldTransform::ServerValue]
|
69
|
-
# Sets the field to the given server value.
|
70
|
-
# @!attribute [rw] increment
|
71
|
-
# @return [Google::Firestore::V1beta1::Value]
|
72
|
-
# Adds the given value to the field's current value.
|
73
|
-
#
|
74
|
-
# This must be an integer or a double value.
|
75
|
-
# If the field is not an integer or double, or if the field does not yet
|
76
|
-
# exist, the transformation will set the field to the given value.
|
77
|
-
# If either of the given value or the current field value are doubles,
|
78
|
-
# both values will be interpreted as doubles. Double arithmetic and
|
79
|
-
# representation of double values follow IEEE 754 semantics.
|
80
|
-
# If there is positive/negative integer overflow, the field is resolved
|
81
|
-
# to the largest magnitude positive/negative integer.
|
82
|
-
# @!attribute [rw] maximum
|
83
|
-
# @return [Google::Firestore::V1beta1::Value]
|
84
|
-
# Sets the field to the maximum of its current value and the given value.
|
85
|
-
#
|
86
|
-
# This must be an integer or a double value.
|
87
|
-
# If the field is not an integer or double, or if the field does not yet
|
88
|
-
# exist, the transformation will set the field to the given value.
|
89
|
-
# If a maximum operation is applied where the field and the input value
|
90
|
-
# are of mixed types (that is - one is an integer and one is a double)
|
91
|
-
# the field takes on the type of the larger operand. If the operands are
|
92
|
-
# equivalent (e.g. 3 and 3.0), the field does not change.
|
93
|
-
# 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
|
94
|
-
# zero input value is always the stored value.
|
95
|
-
# The maximum of any numeric value x and NaN is NaN.
|
96
|
-
# @!attribute [rw] minimum
|
97
|
-
# @return [Google::Firestore::V1beta1::Value]
|
98
|
-
# Sets the field to the minimum of its current value and the given value.
|
99
|
-
#
|
100
|
-
# This must be an integer or a double value.
|
101
|
-
# If the field is not an integer or double, or if the field does not yet
|
102
|
-
# exist, the transformation will set the field to the input value.
|
103
|
-
# If a minimum operation is applied where the field and the input value
|
104
|
-
# are of mixed types (that is - one is an integer and one is a double)
|
105
|
-
# the field takes on the type of the smaller operand. If the operands are
|
106
|
-
# equivalent (e.g. 3 and 3.0), the field does not change.
|
107
|
-
# 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and
|
108
|
-
# zero input value is always the stored value.
|
109
|
-
# The minimum of any numeric value x and NaN is NaN.
|
110
|
-
# @!attribute [rw] append_missing_elements
|
111
|
-
# @return [Google::Firestore::V1beta1::ArrayValue]
|
112
|
-
# Append the given elements in order if they are not already present in
|
113
|
-
# the current field value.
|
114
|
-
# If the field is not an array, or if the field does not yet exist, it is
|
115
|
-
# first set to the empty array.
|
116
|
-
#
|
117
|
-
# Equivalent numbers of different types (e.g. 3L and 3.0) are
|
118
|
-
# considered equal when checking if a value is missing.
|
119
|
-
# NaN is equal to NaN, and Null is equal to Null.
|
120
|
-
# If the input contains multiple equivalent values, only the first will
|
121
|
-
# be considered.
|
122
|
-
#
|
123
|
-
# The corresponding transform_result will be the null value.
|
124
|
-
# @!attribute [rw] remove_all_from_array
|
125
|
-
# @return [Google::Firestore::V1beta1::ArrayValue]
|
126
|
-
# Remove all of the given elements from the array in the field.
|
127
|
-
# If the field is not an array, or if the field does not yet exist, it is
|
128
|
-
# set to the empty array.
|
129
|
-
#
|
130
|
-
# Equivalent numbers of the different types (e.g. 3L and 3.0) are
|
131
|
-
# considered equal when deciding whether an element should be removed.
|
132
|
-
# NaN is equal to NaN, and Null is equal to Null.
|
133
|
-
# This will remove all equivalent values if there are duplicates.
|
134
|
-
#
|
135
|
-
# The corresponding transform_result will be the null value.
|
136
|
-
class FieldTransform
|
137
|
-
# A value that is calculated by the server.
|
138
|
-
module ServerValue
|
139
|
-
# Unspecified. This value must not be used.
|
140
|
-
SERVER_VALUE_UNSPECIFIED = 0
|
141
|
-
|
142
|
-
# The time at which the server processed the request, with millisecond
|
143
|
-
# precision.
|
144
|
-
REQUEST_TIME = 1
|
145
|
-
end
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
# The result of applying a write.
|
150
|
-
# @!attribute [rw] update_time
|
151
|
-
# @return [Google::Protobuf::Timestamp]
|
152
|
-
# The last update time of the document after applying the write. Not set
|
153
|
-
# after a `delete`.
|
154
|
-
#
|
155
|
-
# If the write did not actually change the document, this will be the
|
156
|
-
# previous update_time.
|
157
|
-
# @!attribute [rw] transform_results
|
158
|
-
# @return [Array<Google::Firestore::V1beta1::Value>]
|
159
|
-
# The results of applying each {Google::Firestore::V1beta1::DocumentTransform::FieldTransform DocumentTransform::FieldTransform}, in the
|
160
|
-
# same order.
|
161
|
-
class WriteResult; end
|
162
|
-
|
163
|
-
# A {Google::Firestore::V1beta1::Document Document} has changed.
|
164
|
-
#
|
165
|
-
# May be the result of multiple {Google::Firestore::V1beta1::Write writes}, including deletes, that
|
166
|
-
# ultimately resulted in a new value for the {Google::Firestore::V1beta1::Document Document}.
|
167
|
-
#
|
168
|
-
# Multiple {Google::Firestore::V1beta1::DocumentChange DocumentChange} messages may be returned for the same logical
|
169
|
-
# change, if multiple targets are affected.
|
170
|
-
# @!attribute [rw] document
|
171
|
-
# @return [Google::Firestore::V1beta1::Document]
|
172
|
-
# The new state of the {Google::Firestore::V1beta1::Document Document}.
|
173
|
-
#
|
174
|
-
# If `mask` is set, contains only fields that were updated or added.
|
175
|
-
# @!attribute [rw] target_ids
|
176
|
-
# @return [Array<Integer>]
|
177
|
-
# A set of target IDs of targets that match this document.
|
178
|
-
# @!attribute [rw] removed_target_ids
|
179
|
-
# @return [Array<Integer>]
|
180
|
-
# A set of target IDs for targets that no longer match this document.
|
181
|
-
class DocumentChange; end
|
182
|
-
|
183
|
-
# A {Google::Firestore::V1beta1::Document Document} has been deleted.
|
184
|
-
#
|
185
|
-
# May be the result of multiple {Google::Firestore::V1beta1::Write writes}, including updates, the
|
186
|
-
# last of which deleted the {Google::Firestore::V1beta1::Document Document}.
|
187
|
-
#
|
188
|
-
# Multiple {Google::Firestore::V1beta1::DocumentDelete DocumentDelete} messages may be returned for the same logical
|
189
|
-
# delete, if multiple targets are affected.
|
190
|
-
# @!attribute [rw] document
|
191
|
-
# @return [String]
|
192
|
-
# The resource name of the {Google::Firestore::V1beta1::Document Document} that was deleted.
|
193
|
-
# @!attribute [rw] removed_target_ids
|
194
|
-
# @return [Array<Integer>]
|
195
|
-
# A set of target IDs for targets that previously matched this entity.
|
196
|
-
# @!attribute [rw] read_time
|
197
|
-
# @return [Google::Protobuf::Timestamp]
|
198
|
-
# The read timestamp at which the delete was observed.
|
199
|
-
#
|
200
|
-
# Greater or equal to the `commit_time` of the delete.
|
201
|
-
class DocumentDelete; end
|
202
|
-
|
203
|
-
# A {Google::Firestore::V1beta1::Document Document} has been removed from the view of the targets.
|
204
|
-
#
|
205
|
-
# Sent if the document is no longer relevant to a target and is out of view.
|
206
|
-
# Can be sent instead of a DocumentDelete or a DocumentChange if the server
|
207
|
-
# can not send the new value of the document.
|
208
|
-
#
|
209
|
-
# Multiple {Google::Firestore::V1beta1::DocumentRemove DocumentRemove} messages may be returned for the same logical
|
210
|
-
# write or delete, if multiple targets are affected.
|
211
|
-
# @!attribute [rw] document
|
212
|
-
# @return [String]
|
213
|
-
# The resource name of the {Google::Firestore::V1beta1::Document Document} that has gone out of view.
|
214
|
-
# @!attribute [rw] removed_target_ids
|
215
|
-
# @return [Array<Integer>]
|
216
|
-
# A set of target IDs for targets that previously matched this document.
|
217
|
-
# @!attribute [rw] read_time
|
218
|
-
# @return [Google::Protobuf::Timestamp]
|
219
|
-
# The read timestamp at which the remove was observed.
|
220
|
-
#
|
221
|
-
# Greater or equal to the `commit_time` of the change/delete/remove.
|
222
|
-
class DocumentRemove; end
|
223
|
-
|
224
|
-
# A digest of all the documents that match a given target.
|
225
|
-
# @!attribute [rw] target_id
|
226
|
-
# @return [Integer]
|
227
|
-
# The target ID to which this filter applies.
|
228
|
-
# @!attribute [rw] count
|
229
|
-
# @return [Integer]
|
230
|
-
# The total count of documents that match {Google::Firestore::V1beta1::ExistenceFilter#target_id target_id}.
|
231
|
-
#
|
232
|
-
# If different from the count of documents in the client that match, the
|
233
|
-
# client must manually determine which documents no longer match the target.
|
234
|
-
class ExistenceFilter; end
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|