google-cloud-firestore 1.1.0 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -26
  3. data/CHANGELOG.md +39 -0
  4. data/CONTRIBUTING.md +1 -1
  5. data/OVERVIEW.md +5 -3
  6. data/lib/google/cloud/firestore/admin/v1/credentials.rb +1 -1
  7. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/field.rb +3 -5
  8. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/firestore_admin.rb +11 -11
  9. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/index.rb +8 -5
  10. data/lib/google/cloud/firestore/admin/v1/doc/google/longrunning/operations.rb +2 -2
  11. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/any.rb +1 -1
  12. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/empty.rb +1 -1
  13. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/field_mask.rb +1 -1
  14. data/lib/google/cloud/firestore/admin/v1/doc/google/rpc/status.rb +7 -55
  15. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client.rb +11 -11
  16. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client_config.json +3 -2
  17. data/lib/google/cloud/firestore/admin/v1.rb +1 -1
  18. data/lib/google/cloud/firestore/admin.rb +1 -1
  19. data/lib/google/cloud/firestore/client.rb +1 -1
  20. data/lib/google/cloud/firestore/document_reference/list.rb +9 -9
  21. data/lib/google/cloud/firestore/v1/credentials.rb +1 -1
  22. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/common.rb +1 -1
  23. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/document.rb +1 -1
  24. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb +25 -33
  25. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/query.rb +15 -7
  26. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/write.rb +1 -1
  27. data/lib/google/cloud/firestore/v1/doc/google/protobuf/any.rb +1 -1
  28. data/lib/google/cloud/firestore/v1/doc/google/protobuf/empty.rb +1 -1
  29. data/lib/google/cloud/firestore/v1/doc/google/protobuf/timestamp.rb +7 -5
  30. data/lib/google/cloud/firestore/v1/doc/google/protobuf/wrappers.rb +1 -1
  31. data/lib/google/cloud/firestore/v1/doc/google/rpc/status.rb +7 -55
  32. data/lib/google/cloud/firestore/v1/firestore_client.rb +22 -30
  33. data/lib/google/cloud/firestore/v1/firestore_client_config.json +5 -4
  34. data/lib/google/cloud/firestore/v1.rb +7 -15
  35. data/lib/google/cloud/firestore/v1beta1/credentials.rb +1 -1
  36. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/common.rb +1 -1
  37. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/document.rb +1 -1
  38. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/firestore.rb +21 -31
  39. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +19 -11
  40. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +1 -1
  41. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +1 -1
  42. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/empty.rb +1 -1
  43. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +7 -5
  44. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/wrappers.rb +1 -1
  45. data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +7 -55
  46. data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +16 -16
  47. data/lib/google/cloud/firestore/v1beta1.rb +1 -1
  48. data/lib/google/cloud/firestore/version.rb +1 -1
  49. data/lib/google/cloud/firestore/watch/listener.rb +2 -2
  50. data/lib/google/firestore/admin/v1/field_pb.rb +1 -0
  51. data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +3 -0
  52. data/lib/google/firestore/admin/v1/index_pb.rb +2 -0
  53. data/lib/google/firestore/v1/firestore_pb.rb +2 -0
  54. data/lib/google/firestore/v1/firestore_services_pb.rb +8 -14
  55. data/lib/google/firestore/v1/query_pb.rb +6 -4
  56. data/lib/google/firestore/v1beta1/firestore_pb.rb +2 -0
  57. data/lib/google/firestore/v1beta1/firestore_services_pb.rb +2 -0
  58. data/lib/google/firestore/v1beta1/query_pb.rb +6 -4
  59. metadata +60 -20
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@ module Google
19
19
  # The request for {Google::Firestore::V1beta1::Firestore::GetDocument Firestore::GetDocument}.
20
20
  # @!attribute [rw] name
21
21
  # @return [String]
22
- # The resource name of the Document to get. In the format:
22
+ # Required. The resource name of the Document to get. In the format:
23
23
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
24
24
  # @!attribute [rw] mask
25
25
  # @return [Google::Firestore::V1beta1::DocumentMask]
@@ -39,7 +39,7 @@ module Google
39
39
  # The request for {Google::Firestore::V1beta1::Firestore::ListDocuments Firestore::ListDocuments}.
40
40
  # @!attribute [rw] parent
41
41
  # @return [String]
42
- # The parent resource name. In the format:
42
+ # Required. The parent resource name. In the format:
43
43
  # `projects/{project_id}/databases/{database_id}/documents` or
44
44
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
45
45
  # For example:
@@ -47,7 +47,7 @@ module Google
47
47
  # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
48
48
  # @!attribute [rw] collection_id
49
49
  # @return [String]
50
- # The collection ID, relative to `parent`, to list. For example: `chatrooms`
50
+ # Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`
51
51
  # or `messages`.
52
52
  # @!attribute [rw] page_size
53
53
  # @return [Integer]
@@ -94,12 +94,12 @@ module Google
94
94
  # The request for {Google::Firestore::V1beta1::Firestore::CreateDocument Firestore::CreateDocument}.
95
95
  # @!attribute [rw] parent
96
96
  # @return [String]
97
- # The parent resource. For example:
97
+ # Required. The parent resource. For example:
98
98
  # `projects/{project_id}/databases/{database_id}/documents` or
99
99
  # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
100
100
  # @!attribute [rw] collection_id
101
101
  # @return [String]
102
- # The collection ID, relative to `parent`, to list. For example: `chatrooms`.
102
+ # Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
103
103
  # @!attribute [rw] document_id
104
104
  # @return [String]
105
105
  # The client-assigned document ID to use for this document.
@@ -107,7 +107,7 @@ module Google
107
107
  # Optional. If not specified, an ID will be assigned by the service.
108
108
  # @!attribute [rw] document
109
109
  # @return [Google::Firestore::V1beta1::Document]
110
- # The document to create. `name` must not be set.
110
+ # Required. The document to create. `name` must not be set.
111
111
  # @!attribute [rw] mask
112
112
  # @return [Google::Firestore::V1beta1::DocumentMask]
113
113
  # The fields to return. If not set, returns all fields.
@@ -119,7 +119,7 @@ module Google
119
119
  # The request for {Google::Firestore::V1beta1::Firestore::UpdateDocument Firestore::UpdateDocument}.
120
120
  # @!attribute [rw] document
121
121
  # @return [Google::Firestore::V1beta1::Document]
122
- # The updated document.
122
+ # Required. The updated document.
123
123
  # Creates the document if it does not already exist.
124
124
  # @!attribute [rw] update_mask
125
125
  # @return [Google::Firestore::V1beta1::DocumentMask]
@@ -145,7 +145,7 @@ module Google
145
145
  # The request for {Google::Firestore::V1beta1::Firestore::DeleteDocument Firestore::DeleteDocument}.
146
146
  # @!attribute [rw] name
147
147
  # @return [String]
148
- # The resource name of the Document to delete. In the format:
148
+ # Required. The resource name of the Document to delete. In the format:
149
149
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
150
150
  # @!attribute [rw] current_document
151
151
  # @return [Google::Firestore::V1beta1::Precondition]
@@ -156,7 +156,7 @@ module Google
156
156
  # The request for {Google::Firestore::V1beta1::Firestore::BatchGetDocuments Firestore::BatchGetDocuments}.
157
157
  # @!attribute [rw] database
158
158
  # @return [String]
159
- # The database name. In the format:
159
+ # Required. The database name. In the format:
160
160
  # `projects/{project_id}/databases/{database_id}`.
161
161
  # @!attribute [rw] documents
162
162
  # @return [Array<String>]
@@ -209,7 +209,7 @@ module Google
209
209
  # The request for {Google::Firestore::V1beta1::Firestore::BeginTransaction Firestore::BeginTransaction}.
210
210
  # @!attribute [rw] database
211
211
  # @return [String]
212
- # The database name. In the format:
212
+ # Required. The database name. In the format:
213
213
  # `projects/{project_id}/databases/{database_id}`.
214
214
  # @!attribute [rw] options
215
215
  # @return [Google::Firestore::V1beta1::TransactionOptions]
@@ -226,7 +226,7 @@ module Google
226
226
  # The request for {Google::Firestore::V1beta1::Firestore::Commit Firestore::Commit}.
227
227
  # @!attribute [rw] database
228
228
  # @return [String]
229
- # The database name. In the format:
229
+ # Required. The database name. In the format:
230
230
  # `projects/{project_id}/databases/{database_id}`.
231
231
  # @!attribute [rw] writes
232
232
  # @return [Array<Google::Firestore::V1beta1::Write>]
@@ -253,17 +253,17 @@ module Google
253
253
  # The request for {Google::Firestore::V1beta1::Firestore::Rollback Firestore::Rollback}.
254
254
  # @!attribute [rw] database
255
255
  # @return [String]
256
- # The database name. In the format:
256
+ # Required. The database name. In the format:
257
257
  # `projects/{project_id}/databases/{database_id}`.
258
258
  # @!attribute [rw] transaction
259
259
  # @return [String]
260
- # The transaction to roll back.
260
+ # Required. The transaction to roll back.
261
261
  class RollbackRequest; end
262
262
 
263
263
  # The request for {Google::Firestore::V1beta1::Firestore::RunQuery Firestore::RunQuery}.
264
264
  # @!attribute [rw] parent
265
265
  # @return [String]
266
- # The parent resource name. In the format:
266
+ # Required. The parent resource name. In the format:
267
267
  # `projects/{project_id}/databases/{database_id}/documents` or
268
268
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
269
269
  # For example:
@@ -325,7 +325,7 @@ module Google
325
325
  # the next request.
326
326
  # @!attribute [rw] database
327
327
  # @return [String]
328
- # The database name. In the format:
328
+ # Required. The database name. In the format:
329
329
  # `projects/{project_id}/databases/{database_id}`.
330
330
  # This is only required in the first message.
331
331
  # @!attribute [rw] stream_id
@@ -387,7 +387,7 @@ module Google
387
387
  # A request for {Google::Firestore::V1beta1::Firestore::Listen Firestore::Listen}
388
388
  # @!attribute [rw] database
389
389
  # @return [String]
390
- # The database name. In the format:
390
+ # Required. The database name. In the format:
391
391
  # `projects/{project_id}/databases/{database_id}`.
392
392
  # @!attribute [rw] add_target
393
393
  # @return [Google::Firestore::V1beta1::Target]
@@ -442,14 +442,8 @@ module Google
442
442
  # The client must know the state of matching documents at this time.
443
443
  # @!attribute [rw] target_id
444
444
  # @return [Integer]
445
- # A client provided target ID.
446
- #
447
- # If not set, the server will assign an ID for the target.
448
- #
449
- # Used for resuming a target without changing IDs. The IDs can either be
450
- # client-assigned or be server-assigned in a previous stream. All targets
451
- # with client provided IDs must be added before adding a target that needs
452
- # a server-assigned id.
445
+ # The target ID that identifies the target on the stream. Must be a positive
446
+ # number and non-zero.
453
447
  # @!attribute [rw] once
454
448
  # @return [true, false]
455
449
  # If the target should be removed once it is current and consistent.
@@ -488,11 +482,7 @@ module Google
488
482
  #
489
483
  # If empty, the change applies to all targets.
490
484
  #
491
- # For `target_change_type=ADD`, the order of the target IDs matches the order
492
- # of the requests to add the targets. This allows clients to unambiguously
493
- # associate server-assigned target IDs with added targets.
494
- #
495
- # For other states, the order of the target IDs is not defined.
485
+ # The order of the target IDs is not defined.
496
486
  # @!attribute [rw] cause
497
487
  # @return [Google::Rpc::Status]
498
488
  # The error that resulted in this change, if applicable.
@@ -548,7 +538,7 @@ module Google
548
538
  # The request for {Google::Firestore::V1beta1::Firestore::ListCollectionIds Firestore::ListCollectionIds}.
549
539
  # @!attribute [rw] parent
550
540
  # @return [String]
551
- # The parent document. In the format:
541
+ # Required. The parent document. In the format:
552
542
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
553
543
  # For example:
554
544
  # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -142,18 +142,17 @@ module Google
142
142
 
143
143
  # Contains. Requires that the field is an array.
144
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
145
153
  end
146
154
  end
147
155
 
148
- # The projection of document's fields to return.
149
- # @!attribute [rw] fields
150
- # @return [Array<Google::Firestore::V1beta1::StructuredQuery::FieldReference>]
151
- # The fields to return.
152
- #
153
- # If empty, all fields are returned. To only return the name
154
- # of the document, use `['__name__']`.
155
- class Projection; end
156
-
157
156
  # A filter with a single operand.
158
157
  # @!attribute [rw] op
159
158
  # @return [Google::Firestore::V1beta1::StructuredQuery::UnaryFilter::Operator]
@@ -170,7 +169,7 @@ module Google
170
169
  # Test if a field is equal to NaN.
171
170
  IS_NAN = 2
172
171
 
173
- # Test if an exprestion evaluates to Null.
172
+ # Test if an expression evaluates to Null.
174
173
  IS_NULL = 3
175
174
  end
176
175
  end
@@ -189,6 +188,15 @@ module Google
189
188
  # @return [String]
190
189
  class FieldReference; end
191
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
+
192
200
  # A sort direction.
193
201
  module Direction
194
202
  # Unspecified.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -88,11 +88,13 @@ module Google
88
88
  # 01:30 UTC on January 15, 2017.
89
89
  #
90
90
  # In JavaScript, one can convert a Date object to this format using the
91
- # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
91
+ # standard
92
+ # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
92
93
  # method. In Python, a standard `datetime.datetime` object can be converted
93
- # to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
94
- # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
95
- # can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94
+ # to this format using
95
+ # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
96
+ # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
97
+ # the Joda Time's [`ISODateTimeFormat.dateTime()`](
96
98
  # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
97
99
  # ) to obtain a formatter capable of generating timestamps in this format.
98
100
  # @!attribute [rw] seconds
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -17,67 +17,19 @@ module Google
17
17
  module Rpc
18
18
  # The `Status` type defines a logical error model that is suitable for
19
19
  # different programming environments, including REST APIs and RPC APIs. It is
20
- # used by [gRPC](https://github.com/grpc). The error model is designed to be:
20
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
21
+ # three pieces of data: error code, error message, and error details.
21
22
  #
22
- # * Simple to use and understand for most users
23
- # * Flexible enough to meet unexpected needs
24
- #
25
- # = Overview
26
- #
27
- # The `Status` message contains three pieces of data: error code, error
28
- # message, and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes
30
- # if needed. The error message should be a developer-facing English message
31
- # that helps developers *understand* and *resolve* the error. If a localized
32
- # user-facing error message is needed, put the localized message in the error
33
- # details or localize it in the client. The optional error details may contain
34
- # arbitrary information about the error. There is a predefined set of error
35
- # detail types in the package `google.rpc` that can be used for common error
36
- # conditions.
37
- #
38
- # = Language mapping
39
- #
40
- # The `Status` message is the logical representation of the error model, but it
41
- # is not necessarily the actual wire format. When the `Status` message is
42
- # exposed in different client libraries and different wire protocols, it can be
43
- # mapped differently. For example, it will likely be mapped to some exceptions
44
- # in Java, but more likely mapped to some error codes in C.
45
- #
46
- # = Other uses
47
- #
48
- # The error model and the `Status` message can be used in a variety of
49
- # environments, either with or without APIs, to provide a
50
- # consistent developer experience across different environments.
51
- #
52
- # Example uses of this error model include:
53
- #
54
- # * Partial errors. If a service needs to return partial errors to the client,
55
- # it may embed the `Status` in the normal response to indicate the partial
56
- # errors.
57
- #
58
- # * Workflow errors. A typical workflow has multiple steps. Each step may
59
- # have a `Status` message for error reporting.
60
- #
61
- # * Batch operations. If a client uses batch request and batch response, the
62
- # `Status` message should be used directly inside batch response, one for
63
- # each error sub-response.
64
- #
65
- # * Asynchronous operations. If an API call embeds asynchronous operation
66
- # results in its response, the status of those operations should be
67
- # represented directly using the `Status` message.
68
- #
69
- # * Logging. If some API errors are stored in logs, the message `Status` could
70
- # be used directly after any stripping needed for security/privacy reasons.
23
+ # You can find out more about this error model and how to work with it in the
24
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
71
25
  # @!attribute [rw] code
72
26
  # @return [Integer]
73
- # The status code, which should be an enum value of
74
- # {Google::Rpc::Code}.
27
+ # The status code, which should be an enum value of {Google::Rpc::Code}.
75
28
  # @!attribute [rw] message
76
29
  # @return [String]
77
30
  # A developer-facing error message, which should be in English. Any
78
31
  # user-facing error message should be localized and sent in the
79
- # {Google::Rpc::Status#details} field, or localized
80
- # by the client.
32
+ # {Google::Rpc::Status#details} field, or localized by the client.
81
33
  # @!attribute [rw] details
82
34
  # @return [Array<Google::Protobuf::Any>]
83
35
  # A list of messages that carry the error details. There is a common set of
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -370,7 +370,7 @@ module Google
370
370
  # Gets a single document.
371
371
  #
372
372
  # @param name [String]
373
- # The resource name of the Document to get. In the format:
373
+ # Required. The resource name of the Document to get. In the format:
374
374
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
375
375
  # @param mask [Google::Firestore::V1beta1::DocumentMask | Hash]
376
376
  # The fields to return. If not set, returns all fields.
@@ -421,14 +421,14 @@ module Google
421
421
  # Lists documents.
422
422
  #
423
423
  # @param parent [String]
424
- # The parent resource name. In the format:
424
+ # Required. The parent resource name. In the format:
425
425
  # `projects/{project_id}/databases/{database_id}/documents` or
426
426
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
427
427
  # For example:
428
428
  # `projects/my-project/databases/my-database/documents` or
429
429
  # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
430
430
  # @param collection_id [String]
431
- # The collection ID, relative to `parent`, to list. For example: `chatrooms`
431
+ # Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`
432
432
  # or `messages`.
433
433
  # @param page_size [Integer]
434
434
  # The maximum number of resources contained in the underlying API
@@ -522,17 +522,17 @@ module Google
522
522
  # Creates a new document.
523
523
  #
524
524
  # @param parent [String]
525
- # The parent resource. For example:
525
+ # Required. The parent resource. For example:
526
526
  # `projects/{project_id}/databases/{database_id}/documents` or
527
527
  # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
528
528
  # @param collection_id [String]
529
- # The collection ID, relative to `parent`, to list. For example: `chatrooms`.
529
+ # Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
530
530
  # @param document_id [String]
531
531
  # The client-assigned document ID to use for this document.
532
532
  #
533
533
  # Optional. If not specified, an ID will be assigned by the service.
534
534
  # @param document [Google::Firestore::V1beta1::Document | Hash]
535
- # The document to create. `name` must not be set.
535
+ # Required. The document to create. `name` must not be set.
536
536
  # A hash of the same form as `Google::Firestore::V1beta1::Document`
537
537
  # can also be provided.
538
538
  # @param mask [Google::Firestore::V1beta1::DocumentMask | Hash]
@@ -588,7 +588,7 @@ module Google
588
588
  # Updates or inserts a document.
589
589
  #
590
590
  # @param document [Google::Firestore::V1beta1::Document | Hash]
591
- # The updated document.
591
+ # Required. The updated document.
592
592
  # Creates the document if it does not already exist.
593
593
  # A hash of the same form as `Google::Firestore::V1beta1::Document`
594
594
  # can also be provided.
@@ -654,7 +654,7 @@ module Google
654
654
  # Deletes a document.
655
655
  #
656
656
  # @param name [String]
657
- # The resource name of the Document to delete. In the format:
657
+ # Required. The resource name of the Document to delete. In the format:
658
658
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
659
659
  # @param current_document [Google::Firestore::V1beta1::Precondition | Hash]
660
660
  # An optional precondition on the document.
@@ -695,7 +695,7 @@ module Google
695
695
  # same order that they were requested.
696
696
  #
697
697
  # @param database [String]
698
- # The database name. In the format:
698
+ # Required. The database name. In the format:
699
699
  # `projects/{project_id}/databases/{database_id}`.
700
700
  # @param documents [Array<String>]
701
701
  # The names of the documents to retrieve. In the format:
@@ -765,7 +765,7 @@ module Google
765
765
  # Starts a new transaction.
766
766
  #
767
767
  # @param database [String]
768
- # The database name. In the format:
768
+ # Required. The database name. In the format:
769
769
  # `projects/{project_id}/databases/{database_id}`.
770
770
  # @param options_ [Google::Firestore::V1beta1::TransactionOptions | Hash]
771
771
  # The options for the transaction.
@@ -803,7 +803,7 @@ module Google
803
803
  # Commits a transaction, while optionally updating documents.
804
804
  #
805
805
  # @param database [String]
806
- # The database name. In the format:
806
+ # Required. The database name. In the format:
807
807
  # `projects/{project_id}/databases/{database_id}`.
808
808
  # @param writes [Array<Google::Firestore::V1beta1::Write | Hash>]
809
809
  # The writes to apply.
@@ -849,10 +849,10 @@ module Google
849
849
  # Rolls back a transaction.
850
850
  #
851
851
  # @param database [String]
852
- # The database name. In the format:
852
+ # Required. The database name. In the format:
853
853
  # `projects/{project_id}/databases/{database_id}`.
854
854
  # @param transaction [String]
855
- # The transaction to roll back.
855
+ # Required. The transaction to roll back.
856
856
  # @param options [Google::Gax::CallOptions]
857
857
  # Overrides the default settings for this call, e.g, timeout,
858
858
  # retries, etc.
@@ -887,7 +887,7 @@ module Google
887
887
  # Runs a query.
888
888
  #
889
889
  # @param parent [String]
890
- # The parent resource name. In the format:
890
+ # Required. The parent resource name. In the format:
891
891
  # `projects/{project_id}/databases/{database_id}/documents` or
892
892
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
893
893
  # For example:
@@ -1018,7 +1018,7 @@ module Google
1018
1018
  # Lists all the collection IDs underneath a document.
1019
1019
  #
1020
1020
  # @param parent [String]
1021
- # The parent document. In the format:
1021
+ # Required. The parent document. In the format:
1022
1022
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1023
1023
  # For example:
1024
1024
  # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Firestore
19
- VERSION = "1.1.0".freeze
19
+ VERSION = "1.2.4".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -65,13 +65,13 @@ module Google
65
65
  end
66
66
 
67
67
  def initialize query, doc_ref, client, init_listen_req, &callback
68
+ super() # to init MonitorMixin
69
+
68
70
  @query = query
69
71
  @doc_ref = doc_ref
70
72
  @client = client
71
73
  @init_listen_req = init_listen_req
72
74
  @callback = callback
73
-
74
- super() # to init MonitorMixin
75
75
  end
76
76
 
77
77
  def start
@@ -4,6 +4,7 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/resource_pb'
7
8
  require 'google/firestore/admin/v1/index_pb'
8
9
  require 'google/api/annotations_pb'
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -5,6 +5,9 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
8
11
  require 'google/firestore/admin/v1/field_pb'
9
12
  require 'google/firestore/admin/v1/index_pb'
10
13
  require 'google/longrunning/operations_pb'
@@ -4,6 +4,7 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/resource_pb'
7
8
  require 'google/api/annotations_pb'
8
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_message "google.firestore.admin.v1.Index" do
@@ -31,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
32
  add_enum "google.firestore.admin.v1.Index.QueryScope" do
32
33
  value :QUERY_SCOPE_UNSPECIFIED, 0
33
34
  value :COLLECTION, 1
35
+ value :COLLECTION_GROUP, 2
34
36
  end
35
37
  add_enum "google.firestore.admin.v1.Index.State" do
36
38
  value :STATE_UNSPECIFIED, 0
@@ -5,6 +5,8 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
8
10
  require 'google/firestore/v1/common_pb'
9
11
  require 'google/firestore/v1/document_pb'
10
12
  require 'google/firestore/v1/query_pb'
@@ -25,22 +25,16 @@ module Google
25
25
  module Firestore
26
26
  module V1
27
27
  module Firestore
28
- # The Cloud Firestore service.
28
+ # Specification of the Firestore API.
29
29
  #
30
- # This service exposes several types of comparable timestamps:
30
+ # The Cloud Firestore service.
31
31
  #
32
- # * `create_time` - The time at which a document was created. Changes only
33
- # when a document is deleted, then re-created. Increases in a strict
34
- # monotonic fashion.
35
- # * `update_time` - The time at which a document was last updated. Changes
36
- # every time a document is modified. Does not change when a write results
37
- # in no modifications. Increases in a strict monotonic fashion.
38
- # * `read_time` - The time at which a particular state was observed. Used
39
- # to denote a consistent snapshot of the database or the time at which a
40
- # Document was observed to not exist.
41
- # * `commit_time` - The time at which the writes in a transaction were
42
- # committed. Any read with an equal or greater `read_time` is guaranteed
43
- # to see the effects of the transaction.
32
+ # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
33
+ # document database that simplifies storing, syncing, and querying data for
34
+ # your mobile, web, and IoT apps at global scale. Its client libraries provide
35
+ # live synchronization and offline support, while its security features and
36
+ # integrations with Firebase and Google Cloud Platform (GCP) accelerate
37
+ # building truly serverless apps.
44
38
  class Service
45
39
 
46
40
  include GRPC::GenericService
@@ -50,6 +50,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
50
50
  value :GREATER_THAN_OR_EQUAL, 4
51
51
  value :EQUAL, 5
52
52
  value :ARRAY_CONTAINS, 7
53
+ value :IN, 8
54
+ value :ARRAY_CONTAINS_ANY, 9
53
55
  end
54
56
  add_message "google.firestore.v1.StructuredQuery.UnaryFilter" do
55
57
  optional :op, :enum, 1, "google.firestore.v1.StructuredQuery.UnaryFilter.Operator"
@@ -62,13 +64,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
62
64
  value :IS_NAN, 2
63
65
  value :IS_NULL, 3
64
66
  end
65
- add_message "google.firestore.v1.StructuredQuery.FieldReference" do
66
- optional :field_path, :string, 2
67
- end
68
67
  add_message "google.firestore.v1.StructuredQuery.Order" do
69
68
  optional :field, :message, 1, "google.firestore.v1.StructuredQuery.FieldReference"
70
69
  optional :direction, :enum, 2, "google.firestore.v1.StructuredQuery.Direction"
71
70
  end
71
+ add_message "google.firestore.v1.StructuredQuery.FieldReference" do
72
+ optional :field_path, :string, 2
73
+ end
72
74
  add_message "google.firestore.v1.StructuredQuery.Projection" do
73
75
  repeated :fields, :message, 2, "google.firestore.v1.StructuredQuery.FieldReference"
74
76
  end
@@ -95,8 +97,8 @@ module Google
95
97
  StructuredQuery::FieldFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldFilter.Operator").enummodule
96
98
  StructuredQuery::UnaryFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.UnaryFilter").msgclass
97
99
  StructuredQuery::UnaryFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.UnaryFilter.Operator").enummodule
98
- StructuredQuery::FieldReference = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldReference").msgclass
99
100
  StructuredQuery::Order = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Order").msgclass
101
+ StructuredQuery::FieldReference = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldReference").msgclass
100
102
  StructuredQuery::Projection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Projection").msgclass
101
103
  StructuredQuery::Direction = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Direction").enummodule
102
104
  Cursor = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Cursor").msgclass
@@ -5,6 +5,8 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
8
10
  require 'google/firestore/v1beta1/common_pb'
9
11
  require 'google/firestore/v1beta1/document_pb'
10
12
  require 'google/firestore/v1beta1/query_pb'