google-cloud-firestore 1.1.0 → 1.2.4

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.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51be2bb301f8eb7d271a28efa81767e4cf296b6111665df4f0857ed495f4bc4e
4
- data.tar.gz: b859f290260bdc0448f7407c4f0c7f481bfdc98ef808750c56633817b46417c0
3
+ metadata.gz: 624e1c2f31b57258eea410abcdb33d52562c1f23128890a3a3fd065a984d8c9e
4
+ data.tar.gz: b6b834eca755a67b24b2c4b08f5fa52d5e40c3df469b64f29d77023188372197
5
5
  SHA512:
6
- metadata.gz: 72a920965f28b179256c47f474668cf1c7d35b202356184a2a3c934768dab747aaddce43d3bb821c82785da73560b03baf130bb534886315fcbdedb1b1032b56
7
- data.tar.gz: 46bde522096b25cd0cd0951a92d598378c6d8536e4a505215110272b2dca08ea585ded8591c79e461ac3dd31f8539450f7a29c07ae68f60beccf77b739c7e217
6
+ metadata.gz: fce2ab47a485ebfee11ee2c3ba25970c808c2796dee8224fb22470e802961e98435cec66281e633b8fa14685e75cb6169baabfe7260c821cb2ebe9ad6c451609
7
+ data.tar.gz: 89c3a26866c079d668f3a57ca221321830070890ca3b55c4cf9ecb3e3684445ad61d000ac59e2a8065676e91c3e51daaf6166df2561175d78af2a53a0e0a3beb
data/AUTHENTICATION.md CHANGED
@@ -55,32 +55,10 @@ code.
55
55
 
56
56
  ### Google Cloud Platform environments
57
57
 
58
- While running on Google Cloud Platform environments such as Google Compute
59
- Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
60
- The **Project ID** and **Credentials** and are discovered automatically. Code
61
- should be written as if already authenticated. Just be sure when you [set up the
62
- GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
63
- access. For example:
64
-
65
- * **All APIs**
66
- * `https://www.googleapis.com/auth/cloud-platform`
67
- * `https://www.googleapis.com/auth/cloud-platform.read-only`
68
- * **BigQuery**
69
- * `https://www.googleapis.com/auth/bigquery`
70
- * `https://www.googleapis.com/auth/bigquery.insertdata`
71
- * **Compute Engine**
72
- * `https://www.googleapis.com/auth/compute`
73
- * **Datastore**
74
- * `https://www.googleapis.com/auth/datastore`
75
- * `https://www.googleapis.com/auth/userinfo.email`
76
- * **DNS**
77
- * `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
78
- * **Pub/Sub**
79
- * `https://www.googleapis.com/auth/pubsub`
80
- * **Storage**
81
- * `https://www.googleapis.com/auth/devstorage.full_control`
82
- * `https://www.googleapis.com/auth/devstorage.read_only`
83
- * `https://www.googleapis.com/auth/devstorage.read_write`
58
+ When running on Google Cloud Platform (GCP), including Google Compute Engine (GCE),
59
+ Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud Functions
60
+ (GCF) and Cloud Run, the **Project ID** and **Credentials** and are discovered
61
+ automatically. Code should be written as if already authenticated.
84
62
 
85
63
  ### Environment Variables
86
64
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Release History
2
2
 
3
+ ### 1.2.4 / 2020-01-23
4
+
5
+ #### Documentation
6
+
7
+ * Update copyright year
8
+ * Update Status documentation
9
+
10
+ ### 1.2.3 / 2020-01-08
11
+
12
+ #### Bug Fixes
13
+
14
+ * Use client instead of service in DocumentReference::List
15
+
16
+ ### 1.2.2 / 2019-12-18
17
+
18
+ #### Bug Fixes
19
+
20
+ * Fix MonitorMixin usage on Ruby 2.7
21
+ * Ruby 2.7 will error if new_cond is called before super().
22
+ * Make the call to super() be the first call in initialize
23
+
24
+ #### Documentation
25
+
26
+ * Update lower-level API documentation
27
+
28
+ ### 1.2.1 / 2019-11-06
29
+
30
+ #### Bug Fixes
31
+
32
+ * Update minimum runtime dependencies
33
+
34
+ ### 1.2.0 / 2019-10-29
35
+
36
+ This release requires Ruby 2.4 or later.
37
+
38
+ #### Documentation
39
+
40
+ * Clarify which Google Cloud Platform environments support automatic authentication
41
+
3
42
  ### 1.1.0 / 2019-08-23
4
43
 
5
44
  #### Features
data/CONTRIBUTING.md CHANGED
@@ -24,7 +24,7 @@ be able to accept your pull requests.
24
24
  In order to use the google-cloud-firestore console and run the project's tests,
25
25
  there is a small amount of setup:
26
26
 
27
- 1. Install Ruby. google-cloud-firestore requires Ruby 2.3+. You may choose to
27
+ 1. Install Ruby. google-cloud-firestore requires Ruby 2.4+. You may choose to
28
28
  manage your Ruby and gem installations with [RVM](https://rvm.io/),
29
29
  [rbenv](https://github.com/rbenv/rbenv), or
30
30
  [chruby](https://github.com/postmodern/chruby).
data/OVERVIEW.md CHANGED
@@ -12,9 +12,11 @@ Documentation](https://cloud.google.com/firestore/docs/).
12
12
  The goal of google-cloud is to provide an API that is comfortable to Rubyists.
13
13
  Authentication is handled by {Google::Cloud::Firestore.new Firestore.new}. You
14
14
  can provide the project and credential information to connect to the Cloud
15
- Firestore service, or if you are running on Google Compute Engine this
16
- configuration is taken care of for you. You can read more about the options for
17
- connecting in the {file:AUTHENTICATION.md Authentication Guide}.
15
+ Firestore service, or if you are running on Google Cloud Platform (GCP),
16
+ including Google Compute Engine (GCE), Google Kubernetes Engine (GKE), Google
17
+ App Engine (GAE), Google Cloud Functions (GCF) and Cloud Run this configuration
18
+ is taken care of for you. You can read more about the options for connecting in
19
+ the {file:AUTHENTICATION.md Authentication Guide}.
18
20
 
19
21
  ## Adding data
20
22
 
@@ -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.
@@ -62,14 +62,12 @@ module Google
62
62
  # The indexes supported for this field.
63
63
  # @!attribute [rw] uses_ancestor_config
64
64
  # @return [true, false]
65
- # Output only.
66
- # When true, the `Field`'s index configuration is set from the
65
+ # Output only. When true, the `Field`'s index configuration is set from the
67
66
  # configuration specified by the `ancestor_field`.
68
67
  # When false, the `Field`'s index configuration is defined explicitly.
69
68
  # @!attribute [rw] ancestor_field
70
69
  # @return [String]
71
- # Output only.
72
- # Specifies the resource name of the `Field` from which this field's
70
+ # Output only. Specifies the resource name of the `Field` from which this field's
73
71
  # index configuration is set (when `uses_ancestor_config` is true),
74
72
  # or from which it *would* be set if this field had no index configuration
75
73
  # (when `uses_ancestor_config` is false).
@@ -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.
@@ -20,17 +20,17 @@ module Google
20
20
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::CreateIndex FirestoreAdmin::CreateIndex}.
21
21
  # @!attribute [rw] parent
22
22
  # @return [String]
23
- # A parent name of the form
23
+ # Required. A parent name of the form
24
24
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
25
25
  # @!attribute [rw] index
26
26
  # @return [Google::Firestore::Admin::V1::Index]
27
- # The composite index to create.
27
+ # Required. The composite index to create.
28
28
  class CreateIndexRequest; end
29
29
 
30
30
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::ListIndexes FirestoreAdmin::ListIndexes}.
31
31
  # @!attribute [rw] parent
32
32
  # @return [String]
33
- # A parent name of the form
33
+ # Required. A parent name of the form
34
34
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
35
35
  # @!attribute [rw] filter
36
36
  # @return [String]
@@ -58,21 +58,21 @@ module Google
58
58
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::GetIndex FirestoreAdmin::GetIndex}.
59
59
  # @!attribute [rw] name
60
60
  # @return [String]
61
- # A name of the form
61
+ # Required. A name of the form
62
62
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
63
63
  class GetIndexRequest; end
64
64
 
65
65
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::DeleteIndex FirestoreAdmin::DeleteIndex}.
66
66
  # @!attribute [rw] name
67
67
  # @return [String]
68
- # A name of the form
68
+ # Required. A name of the form
69
69
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
70
70
  class DeleteIndexRequest; end
71
71
 
72
72
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::UpdateField FirestoreAdmin::UpdateField}.
73
73
  # @!attribute [rw] field
74
74
  # @return [Google::Firestore::Admin::V1::Field]
75
- # The field to be updated.
75
+ # Required. The field to be updated.
76
76
  # @!attribute [rw] update_mask
77
77
  # @return [Google::Protobuf::FieldMask]
78
78
  # A mask, relative to the field. If specified, only configuration specified
@@ -82,14 +82,14 @@ module Google
82
82
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::GetField FirestoreAdmin::GetField}.
83
83
  # @!attribute [rw] name
84
84
  # @return [String]
85
- # A name of the form
85
+ # Required. A name of the form
86
86
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
87
87
  class GetFieldRequest; end
88
88
 
89
89
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::ListFields FirestoreAdmin::ListFields}.
90
90
  # @!attribute [rw] parent
91
91
  # @return [String]
92
- # A parent name of the form
92
+ # Required. A parent name of the form
93
93
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
94
94
  # @!attribute [rw] filter
95
95
  # @return [String]
@@ -121,7 +121,7 @@ module Google
121
121
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::ExportDocuments FirestoreAdmin::ExportDocuments}.
122
122
  # @!attribute [rw] name
123
123
  # @return [String]
124
- # Database to export. Should be of the form:
124
+ # Required. Database to export. Should be of the form:
125
125
  # `projects/{project_id}/databases/{database_id}`.
126
126
  # @!attribute [rw] collection_ids
127
127
  # @return [Array<String>]
@@ -141,7 +141,7 @@ module Google
141
141
  # The request for {Google::Firestore::Admin::V1::FirestoreAdmin::ImportDocuments FirestoreAdmin::ImportDocuments}.
142
142
  # @!attribute [rw] name
143
143
  # @return [String]
144
- # Database to import into. Should be of the form:
144
+ # Required. Database to import into. Should be of the form:
145
145
  # `projects/{project_id}/databases/{database_id}`.
146
146
  # @!attribute [rw] collection_ids
147
147
  # @return [Array<String>]
@@ -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.
@@ -21,8 +21,7 @@ module Google
21
21
  # documents in a database.
22
22
  # @!attribute [rw] name
23
23
  # @return [String]
24
- # Output only.
25
- # A server defined name for this index.
24
+ # Output only. A server defined name for this index.
26
25
  # The form of this name for composite indexes will be:
27
26
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
28
27
  # For single field indexes, this field will be empty.
@@ -50,8 +49,7 @@ module Google
50
49
  # field path equal to the field path of the associated field.
51
50
  # @!attribute [rw] state
52
51
  # @return [Google::Firestore::Admin::V1::Index::State]
53
- # Output only.
54
- # The serving state of the index.
52
+ # Output only. The serving state of the index.
55
53
  class Index
56
54
  # A field in an index.
57
55
  # The field_path describes which field is indexed, the value_mode describes
@@ -101,6 +99,11 @@ module Google
101
99
  # against a collection that is the child of a specific document, specified
102
100
  # at query time, and that has the collection id specified by the index.
103
101
  COLLECTION = 1
102
+
103
+ # Indexes with a collection group query scope specified allow queries
104
+ # against all collections that has the collection id specified by the
105
+ # index.
106
+ COLLECTION_GROUP = 2
104
107
  end
105
108
 
106
109
  # The state of an index. During index creation, an index will be in the
@@ -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.
@@ -21,7 +21,7 @@ module Google
21
21
  # @return [String]
22
22
  # The server-assigned name, which is only unique within the same service that
23
23
  # originally returns it. If you use the default HTTP mapping, the
24
- # `name` should have the format of `operations/some/unique/name`.
24
+ # `name` should be a resource name ending with `operations/{unique_id}`.
25
25
  # @!attribute [rw] metadata
26
26
  # @return [Google::Protobuf::Any]
27
27
  # Service-specific metadata associated with the operation. It typically
@@ -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.
@@ -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.
@@ -343,10 +343,10 @@ module Google
343
343
  # the operation will be the type {Google::Firestore::Admin::V1::IndexOperationMetadata IndexOperationMetadata}.
344
344
  #
345
345
  # @param parent [String]
346
- # A parent name of the form
346
+ # Required. A parent name of the form
347
347
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
348
348
  # @param index [Google::Firestore::Admin::V1::Index | Hash]
349
- # The composite index to create.
349
+ # Required. The composite index to create.
350
350
  # A hash of the same form as `Google::Firestore::Admin::V1::Index`
351
351
  # can also be provided.
352
352
  # @param options [Google::Gax::CallOptions]
@@ -383,7 +383,7 @@ module Google
383
383
  # Lists composite indexes.
384
384
  #
385
385
  # @param parent [String]
386
- # A parent name of the form
386
+ # Required. A parent name of the form
387
387
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
388
388
  # @param filter [String]
389
389
  # The filter to apply to list results.
@@ -442,7 +442,7 @@ module Google
442
442
  # Gets a composite index.
443
443
  #
444
444
  # @param name [String]
445
- # A name of the form
445
+ # Required. A name of the form
446
446
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
447
447
  # @param options [Google::Gax::CallOptions]
448
448
  # Overrides the default settings for this call, e.g, timeout,
@@ -473,7 +473,7 @@ module Google
473
473
  # Deletes a composite index.
474
474
  #
475
475
  # @param name [String]
476
- # A name of the form
476
+ # Required. A name of the form
477
477
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
478
478
  # @param options [Google::Gax::CallOptions]
479
479
  # Overrides the default settings for this call, e.g, timeout,
@@ -508,7 +508,7 @@ module Google
508
508
  # that a subset of the data has already been imported to Cloud Firestore.
509
509
  #
510
510
  # @param name [String]
511
- # Database to import into. Should be of the form:
511
+ # Required. Database to import into. Should be of the form:
512
512
  # `projects/{project_id}/databases/{database_id}`.
513
513
  # @param collection_ids [Array<String>]
514
514
  # Which collection ids to import. Unspecified means all collections included
@@ -559,7 +559,7 @@ module Google
559
559
  # Cloud Storage.
560
560
  #
561
561
  # @param name [String]
562
- # Database to export. Should be of the form:
562
+ # Required. Database to export. Should be of the form:
563
563
  # `projects/{project_id}/databases/{database_id}`.
564
564
  # @param collection_ids [Array<String>]
565
565
  # Which collection ids to export. Unspecified means all collections.
@@ -605,7 +605,7 @@ module Google
605
605
  # Gets the metadata and configuration for a Field.
606
606
  #
607
607
  # @param name [String]
608
- # A name of the form
608
+ # Required. A name of the form
609
609
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
610
610
  # @param options [Google::Gax::CallOptions]
611
611
  # Overrides the default settings for this call, e.g, timeout,
@@ -641,7 +641,7 @@ module Google
641
641
  # `indexConfig.usesAncestorConfig:false`.
642
642
  #
643
643
  # @param parent [String]
644
- # A parent name of the form
644
+ # Required. A parent name of the form
645
645
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
646
646
  # @param filter [String]
647
647
  # The filter to apply to list results. Currently,
@@ -716,7 +716,7 @@ module Google
716
716
  # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
717
717
  #
718
718
  # @param field [Google::Firestore::Admin::V1::Field | Hash]
719
- # The field to be updated.
719
+ # Required. The field to be updated.
720
720
  # A hash of the same form as `Google::Firestore::Admin::V1::Field`
721
721
  # can also be provided.
722
722
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
@@ -4,6 +4,7 @@
4
4
  "retry_codes": {
5
5
  "idempotent": [
6
6
  "DEADLINE_EXCEEDED",
7
+ "INTERNAL",
7
8
  "UNAVAILABLE"
8
9
  ],
9
10
  "non_idempotent": []
@@ -13,9 +14,9 @@
13
14
  "initial_retry_delay_millis": 100,
14
15
  "retry_delay_multiplier": 1.3,
15
16
  "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 20000,
17
+ "initial_rpc_timeout_millis": 60000,
17
18
  "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 20000,
19
+ "max_rpc_timeout_millis": 60000,
19
20
  "total_timeout_millis": 600000
20
21
  }
21
22
  },
@@ -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.
@@ -672,7 +672,7 @@ module Google
672
672
  ensure_service!
673
673
  grpc = service.list_documents \
674
674
  parent, collection_id, token: token, max: max
675
- DocumentReference::List.from_grpc grpc, service, parent, collection_id
675
+ DocumentReference::List.from_grpc grpc, self, parent, collection_id
676
676
  end
677
677
 
678
678
  protected
@@ -85,10 +85,10 @@ module Google
85
85
  # end
86
86
  def next
87
87
  return nil unless next?
88
- ensure_service!
88
+ ensure_client!
89
89
  options = { token: token, max: @max }
90
- grpc = @service.list_documents @parent, @collection_id, options
91
- self.class.from_grpc grpc, @service, @parent, @collection_id, @max
90
+ grpc = @client.service.list_documents @parent, @collection_id, options
91
+ self.class.from_grpc grpc, @client, @parent, @collection_id, @max
92
92
  end
93
93
 
94
94
  ##
@@ -163,16 +163,16 @@ module Google
163
163
  ##
164
164
  # @private New DocumentReference::List from a
165
165
  # Google::Firestore::V1::ListDocumentsResponse object.
166
- def self.from_grpc grpc, service, parent, collection_id, max = nil
166
+ def self.from_grpc grpc, client, parent, collection_id, max = nil
167
167
  documents = List.new(Array(grpc.documents).map do |document|
168
- DocumentReference.from_path document.name, service
168
+ DocumentReference.from_path document.name, client
169
169
  end)
170
170
  documents.instance_variable_set :@parent, parent
171
171
  documents.instance_variable_set :@collection_id, collection_id
172
172
  token = grpc.next_page_token
173
173
  token = nil if token == "".freeze
174
174
  documents.instance_variable_set :@token, token
175
- documents.instance_variable_set :@service, service
175
+ documents.instance_variable_set :@client, client
176
176
  documents.instance_variable_set :@max, max
177
177
  documents
178
178
  end
@@ -180,9 +180,9 @@ module Google
180
180
  protected
181
181
 
182
182
  ##
183
- # Raise an error unless an active service is available.
184
- def ensure_service!
185
- raise "Must have active connection" unless @service
183
+ # Raise an error unless an active client is available.
184
+ def ensure_client!
185
+ raise "Must have active connection" unless @client
186
186
  end
187
187
  end
188
188
  end
@@ -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.