google-cloud-firestore 0.24.1 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fccde9d0d32a88be624c95255dcdcbede69be371428e9f5dc3d7e6e4b59b541
4
- data.tar.gz: a761abb15eb952a1f555746f8fe2a0ebe2e821954c4f65e55711a270c2c903de
3
+ metadata.gz: a5ba1c47b78cf38ed102313b8069a1cd53404c7a46982fcbd9ec431d824c3b7e
4
+ data.tar.gz: 14bdfd709f1e330991d638d40cdb822e173247bc5504c13890a47ce78efc568c
5
5
  SHA512:
6
- metadata.gz: 54d896bf21cffe74009963af0d9a2eebbe187e4e27f1ba4dff85ecc933790e506fb0d3f5729dfc7600dbe3c9a10f14f9729b1e7d494c5944534b1a4444fff33c
7
- data.tar.gz: 162b854a6bdfe533535b4626b0b3a3669b8c8aa159c21279bb42ec333da840e87d6d32d147e350c5f335aa62a8b883e21491ba46498d9afd1ff1ff84b8d6ae50
6
+ metadata.gz: 871dfc5e79e50134cf47f13cf4c17eae85d12aa0724782d2db56401da2d8f543aded7162ede2c19067cf9d992364aa631dd2ef6a3d82281d24fc0f80ee3d35f7
7
+ data.tar.gz: 7cc1808bf7bd93503748619b96db974d14f9780afa6c9b7790a83943220337df4c51eaace902b4f176d7300a0270da5bbde5181998421f2e42d8014bb3917fb8
@@ -1,5 +1,13 @@
1
1
  # Release History
2
2
 
3
+ ### 0.24.2 / 2018-09-20
4
+
5
+ * Add fix for comparing NaN values
6
+ * NaN values should not be compared, as this may raise with Active Support.
7
+ * Update documentation.
8
+ * Change documentation URL to googleapis GitHub org.
9
+ * Fix circular require warning.
10
+
3
11
  ### 0.24.1 / 2018-09-12
4
12
 
5
13
  * Add missing documentation files to package.
data/LOGGING.md CHANGED
@@ -5,7 +5,7 @@ To enable logging for this library, set the logger for the underlying
5
5
  that you set may be a Ruby stdlib
6
6
  [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as
7
7
  shown below, or a
8
- [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger)
8
+ [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger)
9
9
  that will write logs to [Stackdriver
10
10
  Logging](https://cloud.google.com/logging/). See
11
11
  [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
@@ -20,7 +20,7 @@
20
20
 
21
21
 
22
22
  gem "google-cloud-core"
23
- require "google/cloud"
23
+ require "google/cloud" unless defined? Google::Cloud.new
24
24
  require "google/cloud/config"
25
25
  require "googleauth"
26
26
 
@@ -163,7 +163,7 @@ module Google
163
163
  def self.array_union *values
164
164
  # We can flatten the values because arrays don't support sub-arrays
165
165
  values.flatten!
166
- raise ArgumentError, "values must be provided" if values.nil?
166
+ raise ArgumentError, "values must be provided" if values.empty?
167
167
  # verify the values are the correct types
168
168
  Convert.raw_to_value values
169
169
 
@@ -196,7 +196,7 @@ module Google
196
196
  def self.array_delete *values
197
197
  # We can flatten the values because arrays don't support sub-arrays
198
198
  values.flatten!
199
- raise ArgumentError, "values must be provided" if values.nil?
199
+ raise ArgumentError, "values must be provided" if values.empty?
200
200
  # verify the values are the correct types
201
201
  Convert.raw_to_value values
202
202
 
@@ -921,32 +921,33 @@ module Google
921
921
  GREATER_THAN
922
922
  GREATER_THAN_OR_EQUAL
923
923
  ].freeze
924
- ##
925
- # @private
926
- UNARY_NIL_VALUES = [nil, :null, :nil].freeze
927
- ##
928
- # @private
929
- UNARY_NAN_VALUES = [:nan, Float::NAN].freeze
930
- ##
931
- # @private
932
- UNARY_VALUES = (UNARY_NIL_VALUES + UNARY_NAN_VALUES).freeze
924
+
925
+ def value_nil? value
926
+ [nil, :null, :nil].include?(value)
927
+ end
928
+
929
+ def value_nan? value
930
+ # Comparing NaN values raises, so check for #nan? first.
931
+ return true if value.respond_to?(:nan?) && value.nan?
932
+ [:nan].include?(value)
933
+ end
934
+
935
+ def value_unary? value
936
+ value_nil?(value) || value_nan?(value)
937
+ end
933
938
 
934
939
  def filter name, op, value
935
940
  field = StructuredQuery::FieldReference.new field_path: name.to_s
936
941
  operator = FILTER_OPS[op.to_s.downcase]
937
942
  raise ArgumentError, "unknown operator #{op}" if operator.nil?
938
943
 
939
- is_value_nan = value.respond_to?(:nan?) && value.nan?
940
- if UNARY_VALUES.include?(value) || is_value_nan
944
+ if value_unary? value
941
945
  if operator != :EQUAL
942
946
  raise ArgumentError,
943
947
  "can only check equality for #{value} values"
944
948
  end
945
949
 
946
- operator = :IS_NULL
947
- if UNARY_NAN_VALUES.include?(value) || is_value_nan
948
- operator = :IS_NAN
949
- end
950
+ operator = value_nan?(value) ? :IS_NAN : :IS_NULL
950
951
 
951
952
  return StructuredQuery::Filter.new(unary_filter:
952
953
  StructuredQuery::UnaryFilter.new(field: field, op: operator))
@@ -21,7 +21,7 @@ module Google
21
21
  # rubocop:disable LineLength
22
22
 
23
23
  ##
24
- # # Ruby Client for Google Cloud Firestore API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
24
+ # # Ruby Client for Google Cloud Firestore API ([Beta](https://github.com/googleapis/google-cloud-ruby#versioning))
25
25
  #
26
26
  # [Google Cloud Firestore API][Product Documentation]:
27
27
  #
@@ -34,7 +34,7 @@ module Google
34
34
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
35
35
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
36
36
  # 3. [Enable the Google Cloud Firestore API.](https://console.cloud.google.com/apis/library/firestore.googleapis.com)
37
- # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
37
+ # 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
38
38
  #
39
39
  # ### Installation
40
40
  # ```
@@ -44,7 +44,7 @@ module Google
44
44
  # ### Next Steps
45
45
  # - Read the [Google Cloud Firestore API Product documentation][Product Documentation]
46
46
  # to learn more about the product and see How-to Guides.
47
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
47
+ # - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
48
48
  # to see the full list of Cloud APIs that we cover.
49
49
  #
50
50
  # [Product Documentation]: https://cloud.google.com/firestore
@@ -53,7 +53,7 @@ module Google
53
53
  #
54
54
  # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
55
55
  # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
56
- # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
56
+ # or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
57
57
  # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
58
58
  # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
59
59
  #
@@ -83,17 +83,17 @@ module Google
83
83
  #
84
84
  # This service exposes several types of comparable timestamps:
85
85
  #
86
- # * +create_time+ - The time at which a document was created. Changes only
86
+ # * `create_time` - The time at which a document was created. Changes only
87
87
  # when a document is deleted, then re-created. Increases in a strict
88
88
  # monotonic fashion.
89
- # * +update_time+ - The time at which a document was last updated. Changes
89
+ # * `update_time` - The time at which a document was last updated. Changes
90
90
  # every time a document is modified. Does not change when a write results
91
91
  # in no modifications. Increases in a strict monotonic fashion.
92
- # * +read_time+ - The time at which a particular state was observed. Used
92
+ # * `read_time` - The time at which a particular state was observed. Used
93
93
  # to denote a consistent snapshot of the database or the time at which a
94
94
  # Document was observed to not exist.
95
- # * +commit_time+ - The time at which the writes in a transaction were
96
- # committed. Any read with an equal or greater +read_time+ is guaranteed
95
+ # * `commit_time` - The time at which the writes in a transaction were
96
+ # committed. Any read with an equal or greater `read_time` is guaranteed
97
97
  # to see the effects of the transaction.
98
98
  #
99
99
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
@@ -30,8 +30,8 @@ module Google
30
30
  # A precondition on a document, used for conditional operations.
31
31
  # @!attribute [rw] exists
32
32
  # @return [true, false]
33
- # When set to +true+, the target document must exist.
34
- # When set to +false+, the target document must not exist.
33
+ # When set to `true`, the target document must exist.
34
+ # When set to `false`, the target document must not exist.
35
35
  # @!attribute [rw] update_time
36
36
  # @return [Google::Protobuf::Timestamp]
37
37
  # When set, the target document must exist and have been last updated at
@@ -22,47 +22,47 @@ module Google
22
22
  # @!attribute [rw] name
23
23
  # @return [String]
24
24
  # The resource name of the document, for example
25
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
25
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
26
26
  # @!attribute [rw] fields
27
27
  # @return [Hash{String => Google::Firestore::V1beta1::Value}]
28
28
  # The document's fields.
29
29
  #
30
30
  # The map keys represent field names.
31
31
  #
32
- # A simple field name contains only characters +a+ to +z+, +A+ to +Z+,
33
- # +0+ to +9+, or +_+, and must not start with +0+ to +9+. For example,
34
- # +foo_bar_17+.
32
+ # A simple field name contains only characters `a` to `z`, `A` to `Z`,
33
+ # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
34
+ # `foo_bar_17`.
35
35
  #
36
- # Field names matching the regular expression +__.*__+ are reserved. Reserved
36
+ # Field names matching the regular expression `__.*__` are reserved. Reserved
37
37
  # field names are forbidden except in certain documented contexts. The map
38
38
  # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
39
39
  # empty.
40
40
  #
41
41
  # Field paths may be used in other contexts to refer to structured fields
42
- # defined here. For +map_value+, the field path is represented by the simple
43
- # or quoted field names of the containing fields, delimited by +.+. For
42
+ # defined here. For `map_value`, the field path is represented by the simple
43
+ # or quoted field names of the containing fields, delimited by `.`. For
44
44
  # example, the structured field
45
- # +"foo" : { map_value: { "x&y" : { string_value: "hello" }}}+ would be
46
- # represented by the field path +foo.x&y+.
45
+ # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
46
+ # represented by the field path `foo.x&y`.
47
47
  #
48
- # Within a field path, a quoted field name starts and ends with + + + and
49
- # may contain any character. Some characters, including + + +, must be
50
- # escaped using a +\+. For example, + +x&y+ + represents +x&y+ and
51
- # + +bak\+tik+ + represents + bak+tik +.
48
+ # Within a field path, a quoted field name starts and ends with `` ` `` and
49
+ # may contain any character. Some characters, including `` ` ``, must be
50
+ # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
51
+ # `` `bak\`tik` `` represents `` bak`tik ``.
52
52
  # @!attribute [rw] create_time
53
53
  # @return [Google::Protobuf::Timestamp]
54
54
  # Output only. The time at which the document was created.
55
55
  #
56
56
  # This value increases monotonically when a document is deleted then
57
57
  # recreated. It can also be compared to values from other documents and
58
- # the +read_time+ of a query.
58
+ # the `read_time` of a query.
59
59
  # @!attribute [rw] update_time
60
60
  # @return [Google::Protobuf::Timestamp]
61
61
  # Output only. The time at which the document was last changed.
62
62
  #
63
- # This value is initially set to the +create_time+ then increases
63
+ # This value is initially set to the `create_time` then increases
64
64
  # monotonically with each change to the document. It can also be
65
- # compared to values from other documents and the +read_time+ of a query.
65
+ # compared to values from other documents and the `read_time` of a query.
66
66
  class Document; end
67
67
 
68
68
  # A message that can hold any of the supported value types.
@@ -100,7 +100,7 @@ module Google
100
100
  # @!attribute [rw] reference_value
101
101
  # @return [String]
102
102
  # A reference to a document. For example:
103
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
103
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
104
104
  # @!attribute [rw] geo_point_value
105
105
  # @return [Google::Type::LatLng]
106
106
  # A geo point value representing a point on the surface of Earth.
@@ -127,7 +127,7 @@ module Google
127
127
  # The map's fields.
128
128
  #
129
129
  # The map keys represent field names. Field names matching the regular
130
- # expression +__.*__+ are reserved. Reserved field names are forbidden except
130
+ # expression `__.*__` are reserved. Reserved field names are forbidden except
131
131
  # in certain documented contexts. The map keys, represented as UTF-8, must
132
132
  # not exceed 1,500 bytes and cannot be empty.
133
133
  class MapValue; end
@@ -20,7 +20,7 @@ module Google
20
20
  # @!attribute [rw] name
21
21
  # @return [String]
22
22
  # The resource name of the Document to get. In the format:
23
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
23
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
24
24
  # @!attribute [rw] mask
25
25
  # @return [Google::Firestore::V1beta1::DocumentMask]
26
26
  # The fields to return. If not set, returns all fields.
@@ -40,24 +40,24 @@ module Google
40
40
  # @!attribute [rw] parent
41
41
  # @return [String]
42
42
  # The parent resource name. In the format:
43
- # +projects/\\{project_id}/databases/\\{database_id}/documents+ or
44
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
43
+ # `projects/{project_id}/databases/{database_id}/documents` or
44
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
45
45
  # For example:
46
- # +projects/my-project/databases/my-database/documents+ or
47
- # +projects/my-project/databases/my-database/documents/chatrooms/my-chatroom+
46
+ # `projects/my-project/databases/my-database/documents` or
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+
51
- # or +messages+.
50
+ # The collection ID, relative to `parent`, to list. For example: `chatrooms`
51
+ # or `messages`.
52
52
  # @!attribute [rw] page_size
53
53
  # @return [Integer]
54
54
  # The maximum number of documents to return.
55
55
  # @!attribute [rw] page_token
56
56
  # @return [String]
57
- # The +next_page_token+ value returned from a previous List request, if any.
57
+ # The `next_page_token` value returned from a previous List request, if any.
58
58
  # @!attribute [rw] order_by
59
59
  # @return [String]
60
- # The order to sort results by. For example: +priority desc, name+.
60
+ # The order to sort results by. For example: `priority desc, name`.
61
61
  # @!attribute [rw] mask
62
62
  # @return [Google::Firestore::V1beta1::DocumentMask]
63
63
  # The fields to return. If not set, returns all fields.
@@ -78,8 +78,8 @@ module Google
78
78
  # be returned with a key but will not have fields, {Google::Firestore::V1beta1::Document#create_time Document#create_time},
79
79
  # or {Google::Firestore::V1beta1::Document#update_time Document#update_time} set.
80
80
  #
81
- # Requests with +show_missing+ may not specify +where+ or
82
- # +order_by+.
81
+ # Requests with `show_missing` may not specify `where` or
82
+ # `order_by`.
83
83
  class ListDocumentsRequest; end
84
84
 
85
85
  # The response for {Google::Firestore::V1beta1::Firestore::ListDocuments Firestore::ListDocuments}.
@@ -95,11 +95,11 @@ module Google
95
95
  # @!attribute [rw] parent
96
96
  # @return [String]
97
97
  # The parent resource. For example:
98
- # +projects/\\{project_id}/databases/\\{database_id}/documents+ or
99
- # +projects/\\{project_id}/databases/\\{database_id}/documents/chatrooms/\\{chatroom_id}+
98
+ # `projects/{project_id}/databases/{database_id}/documents` or
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
+ # 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
+ # 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.
@@ -146,7 +146,7 @@ module Google
146
146
  # @!attribute [rw] name
147
147
  # @return [String]
148
148
  # The resource name of the Document to delete. In the format:
149
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
149
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
150
150
  # @!attribute [rw] current_document
151
151
  # @return [Google::Firestore::V1beta1::Precondition]
152
152
  # An optional precondition on the document.
@@ -157,13 +157,13 @@ module Google
157
157
  # @!attribute [rw] database
158
158
  # @return [String]
159
159
  # The database name. In the format:
160
- # +projects/\\{project_id}/databases/\\{database_id}+.
160
+ # `projects/{project_id}/databases/{database_id}`.
161
161
  # @!attribute [rw] documents
162
162
  # @return [Array<String>]
163
163
  # The names of the documents to retrieve. In the format:
164
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
164
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
165
165
  # The request will fail if any of the document is not a child resource of the
166
- # given +database+. Duplicate names will be elided.
166
+ # given `database`. Duplicate names will be elided.
167
167
  # @!attribute [rw] mask
168
168
  # @return [Google::Firestore::V1beta1::DocumentMask]
169
169
  # The fields to return. If not set, returns all fields.
@@ -192,7 +192,7 @@ module Google
192
192
  # @!attribute [rw] missing
193
193
  # @return [String]
194
194
  # A document name that was requested but does not exist. In the format:
195
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
195
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
196
196
  # @!attribute [rw] transaction
197
197
  # @return [String]
198
198
  # The transaction that was started as part of this request.
@@ -210,7 +210,7 @@ module Google
210
210
  # @!attribute [rw] database
211
211
  # @return [String]
212
212
  # The database name. In the format:
213
- # +projects/\\{project_id}/databases/\\{database_id}+.
213
+ # `projects/{project_id}/databases/{database_id}`.
214
214
  # @!attribute [rw] options
215
215
  # @return [Google::Firestore::V1beta1::TransactionOptions]
216
216
  # The options for the transaction.
@@ -227,7 +227,7 @@ module Google
227
227
  # @!attribute [rw] database
228
228
  # @return [String]
229
229
  # The database name. In the format:
230
- # +projects/\\{project_id}/databases/\\{database_id}+.
230
+ # `projects/{project_id}/databases/{database_id}`.
231
231
  # @!attribute [rw] writes
232
232
  # @return [Array<Google::Firestore::V1beta1::Write>]
233
233
  # The writes to apply.
@@ -254,7 +254,7 @@ module Google
254
254
  # @!attribute [rw] database
255
255
  # @return [String]
256
256
  # The database name. In the format:
257
- # +projects/\\{project_id}/databases/\\{database_id}+.
257
+ # `projects/{project_id}/databases/{database_id}`.
258
258
  # @!attribute [rw] transaction
259
259
  # @return [String]
260
260
  # The transaction to roll back.
@@ -264,11 +264,11 @@ module Google
264
264
  # @!attribute [rw] parent
265
265
  # @return [String]
266
266
  # The parent resource name. In the format:
267
- # +projects/\\{project_id}/databases/\\{database_id}/documents+ or
268
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
267
+ # `projects/{project_id}/databases/{database_id}/documents` or
268
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
269
269
  # For example:
270
- # +projects/my-project/databases/my-database/documents+ or
271
- # +projects/my-project/databases/my-database/documents/chatrooms/my-chatroom+
270
+ # `projects/my-project/databases/my-database/documents` or
271
+ # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
272
272
  # @!attribute [rw] structured_query
273
273
  # @return [Google::Firestore::V1beta1::StructuredQuery]
274
274
  # A structured query.
@@ -302,10 +302,10 @@ module Google
302
302
  # @return [Google::Protobuf::Timestamp]
303
303
  # The time at which the document was read. This may be monotonically
304
304
  # increasing; in this case, the previous documents in the result stream are
305
- # guaranteed not to have changed between their +read_time+ and this one.
305
+ # guaranteed not to have changed between their `read_time` and this one.
306
306
  #
307
- # If the query returns no results, a response with +read_time+ and no
308
- # +document+ will be sent, and this represents the time at which the query
307
+ # If the query returns no results, a response with `read_time` and no
308
+ # `document` will be sent, and this represents the time at which the query
309
309
  # was run.
310
310
  # @!attribute [rw] skipped_results
311
311
  # @return [Integer]
@@ -326,7 +326,7 @@ module Google
326
326
  # @!attribute [rw] database
327
327
  # @return [String]
328
328
  # The database name. In the format:
329
- # +projects/\\{project_id}/databases/\\{database_id}+.
329
+ # `projects/{project_id}/databases/{database_id}`.
330
330
  # This is only required in the first message.
331
331
  # @!attribute [rw] stream_id
332
332
  # @return [String]
@@ -354,7 +354,7 @@ module Google
354
354
  # responses.
355
355
  #
356
356
  # Leave this field unset when creating a new stream. To resume a stream at
357
- # a specific point, set this field and the +stream_id+ field.
357
+ # a specific point, set this field and the `stream_id` field.
358
358
  #
359
359
  # Leave this field unset when creating a new stream.
360
360
  # @!attribute [rw] labels
@@ -388,7 +388,7 @@ module Google
388
388
  # @!attribute [rw] database
389
389
  # @return [String]
390
390
  # The database name. In the format:
391
- # +projects/\\{project_id}/databases/\\{database_id}+.
391
+ # `projects/{project_id}/databases/{database_id}`.
392
392
  # @!attribute [rw] add_target
393
393
  # @return [Google::Firestore::V1beta1::Target]
394
394
  # A target to add to this stream.
@@ -437,7 +437,7 @@ module Google
437
437
  # Using a resume token with a different target is unsupported and may fail.
438
438
  # @!attribute [rw] read_time
439
439
  # @return [Google::Protobuf::Timestamp]
440
- # Start listening after a specific +read_time+.
440
+ # Start listening after a specific `read_time`.
441
441
  #
442
442
  # The client must know the state of matching documents at this time.
443
443
  # @!attribute [rw] target_id
@@ -458,20 +458,20 @@ module Google
458
458
  # @!attribute [rw] documents
459
459
  # @return [Array<String>]
460
460
  # The names of the documents to retrieve. In the format:
461
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
461
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
462
462
  # The request will fail if any of the document is not a child resource of
463
- # the given +database+. Duplicate names will be elided.
463
+ # the given `database`. Duplicate names will be elided.
464
464
  class DocumentsTarget; end
465
465
 
466
466
  # A target specified by a query.
467
467
  # @!attribute [rw] parent
468
468
  # @return [String]
469
469
  # The parent resource name. In the format:
470
- # +projects/\\{project_id}/databases/\\{database_id}/documents+ or
471
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
470
+ # `projects/{project_id}/databases/{database_id}/documents` or
471
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
472
472
  # For example:
473
- # +projects/my-project/databases/my-database/documents+ or
474
- # +projects/my-project/databases/my-database/documents/chatrooms/my-chatroom+
473
+ # `projects/my-project/databases/my-database/documents` or
474
+ # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
475
475
  # @!attribute [rw] structured_query
476
476
  # @return [Google::Firestore::V1beta1::StructuredQuery]
477
477
  # A structured query.
@@ -488,7 +488,7 @@ module Google
488
488
  #
489
489
  # If empty, the change applies to all targets.
490
490
  #
491
- # For +target_change_type=ADD+, the order of the target IDs matches the order
491
+ # For `target_change_type=ADD`, the order of the target IDs matches the order
492
492
  # of the requests to add the targets. This allows clients to unambiguously
493
493
  # associate server-assigned target IDs with added targets.
494
494
  #
@@ -498,26 +498,26 @@ module Google
498
498
  # The error that resulted in this change, if applicable.
499
499
  # @!attribute [rw] resume_token
500
500
  # @return [String]
501
- # A token that can be used to resume the stream for the given +target_ids+,
502
- # or all targets if +target_ids+ is empty.
501
+ # A token that can be used to resume the stream for the given `target_ids`,
502
+ # or all targets if `target_ids` is empty.
503
503
  #
504
504
  # Not set on every target change.
505
505
  # @!attribute [rw] read_time
506
506
  # @return [Google::Protobuf::Timestamp]
507
- # The consistent +read_time+ for the given +target_ids+ (omitted when the
507
+ # The consistent `read_time` for the given `target_ids` (omitted when the
508
508
  # target_ids are not at a consistent snapshot).
509
509
  #
510
- # The stream is guaranteed to send a +read_time+ with +target_ids+ empty
510
+ # The stream is guaranteed to send a `read_time` with `target_ids` empty
511
511
  # whenever the entire stream reaches a new consistent snapshot. ADD,
512
512
  # CURRENT, and RESET messages are guaranteed to (eventually) result in a
513
513
  # new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
514
514
  #
515
- # For a given stream, +read_time+ is guaranteed to be monotonically
515
+ # For a given stream, `read_time` is guaranteed to be monotonically
516
516
  # increasing.
517
517
  class TargetChange
518
518
  # The type of change.
519
519
  module TargetChangeType
520
- # No change has occurred. Used only to send an updated +resume_token+.
520
+ # No change has occurred. Used only to send an updated `resume_token`.
521
521
  NO_CHANGE = 0
522
522
 
523
523
  # The targets have been added.
@@ -529,7 +529,7 @@ module Google
529
529
  # The targets reflect all changes committed before the targets were added
530
530
  # to the stream.
531
531
  #
532
- # This will be sent after or with a +read_time+ that is greater than or
532
+ # This will be sent after or with a `read_time` that is greater than or
533
533
  # equal to the time at which the targets were added.
534
534
  #
535
535
  # Listeners can wait for this change if read-after-write semantics
@@ -539,8 +539,8 @@ module Google
539
539
  # The targets have been reset, and a new initial state for the targets
540
540
  # will be returned in subsequent changes.
541
541
  #
542
- # After the initial state is complete, +CURRENT+ will be returned even
543
- # if the target was previously indicated to be +CURRENT+.
542
+ # After the initial state is complete, `CURRENT` will be returned even
543
+ # if the target was previously indicated to be `CURRENT`.
544
544
  RESET = 4
545
545
  end
546
546
  end
@@ -549,9 +549,9 @@ module Google
549
549
  # @!attribute [rw] parent
550
550
  # @return [String]
551
551
  # The parent document. In the format:
552
- # +projects/\\{project_id}/databases/\\{database_id}/documents/\\{document_path}+.
552
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
553
553
  # For example:
554
- # +projects/my-project/databases/my-database/documents/chatrooms/my-chatroom+
554
+ # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
555
555
  # @!attribute [rw] page_size
556
556
  # @return [Integer]
557
557
  # The maximum number of results to return.