google-cloud-firestore-v1 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +15 -33
- data/README.md +7 -2
- data/lib/google/cloud/firestore/v1/firestore/client.rb +432 -152
- data/lib/google/cloud/firestore/v1/version.rb +1 -1
- data/lib/google/cloud/firestore/v1.rb +2 -0
- data/lib/google/firestore/v1/common_pb.rb +1 -1
- data/lib/google/firestore/v1/document_pb.rb +1 -1
- data/lib/google/firestore/v1/firestore_pb.rb +10 -0
- data/lib/google/firestore/v1/firestore_services_pb.rb +1 -1
- data/lib/google/firestore/v1/query_pb.rb +2 -1
- data/lib/google/firestore/v1/write_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/firestore/v1/common.rb +1 -1
- data/proto_docs/google/firestore/v1/firestore.rb +16 -3
- data/proto_docs/google/firestore/v1/query.rb +5 -2
- data/proto_docs/google/firestore/v1/write.rb +2 -1
- data/proto_docs/google/protobuf/any.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +2 -2
- metadata +13 -7
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/protobuf/timestamp_pb'
|
7
|
-
|
7
|
+
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/firestore/v1/common.proto", :syntax => :proto3) do
|
10
10
|
add_message "google.firestore.v1.DocumentMask" do
|
@@ -6,7 +6,7 @@ require 'google/protobuf'
|
|
6
6
|
require 'google/protobuf/struct_pb'
|
7
7
|
require 'google/protobuf/timestamp_pb'
|
8
8
|
require 'google/type/latlng_pb'
|
9
|
-
|
9
|
+
|
10
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
11
|
add_file("google/firestore/v1/document.proto", :syntax => :proto3) do
|
12
12
|
add_message "google.firestore.v1.Document" do
|
@@ -13,6 +13,7 @@ require 'google/firestore/v1/write_pb'
|
|
13
13
|
require 'google/protobuf/empty_pb'
|
14
14
|
require 'google/protobuf/timestamp_pb'
|
15
15
|
require 'google/rpc/status_pb'
|
16
|
+
|
16
17
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
18
|
add_file("google/firestore/v1/firestore.proto", :syntax => :proto3) do
|
18
19
|
add_message "google.firestore.v1.GetDocumentRequest" do
|
@@ -111,6 +112,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
111
112
|
optional :document, :message, 1, "google.firestore.v1.Document"
|
112
113
|
optional :read_time, :message, 3, "google.protobuf.Timestamp"
|
113
114
|
optional :skipped_results, :int32, 4
|
115
|
+
oneof :continuation_selector do
|
116
|
+
optional :done, :bool, 6
|
117
|
+
end
|
114
118
|
end
|
115
119
|
add_message "google.firestore.v1.PartitionQueryRequest" do
|
116
120
|
optional :parent, :string, 1
|
@@ -120,6 +124,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
120
124
|
oneof :query_type do
|
121
125
|
optional :structured_query, :message, 2, "google.firestore.v1.StructuredQuery"
|
122
126
|
end
|
127
|
+
oneof :consistency_selector do
|
128
|
+
optional :read_time, :message, 6, "google.protobuf.Timestamp"
|
129
|
+
end
|
123
130
|
end
|
124
131
|
add_message "google.firestore.v1.PartitionQueryResponse" do
|
125
132
|
repeated :partitions, :message, 1, "google.firestore.v1.Cursor"
|
@@ -194,6 +201,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
194
201
|
optional :parent, :string, 1
|
195
202
|
optional :page_size, :int32, 2
|
196
203
|
optional :page_token, :string, 3
|
204
|
+
oneof :consistency_selector do
|
205
|
+
optional :read_time, :message, 4, "google.protobuf.Timestamp"
|
206
|
+
end
|
197
207
|
end
|
198
208
|
add_message "google.firestore.v1.ListCollectionIdsResponse" do
|
199
209
|
repeated :collection_ids, :string, 1
|
@@ -3,9 +3,10 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
+
require 'google/api/field_behavior_pb'
|
6
7
|
require 'google/firestore/v1/document_pb'
|
7
8
|
require 'google/protobuf/wrappers_pb'
|
8
|
-
|
9
|
+
|
9
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
11
|
add_file("google/firestore/v1/query.proto", :syntax => :proto3) do
|
11
12
|
add_message "google.firestore.v1.StructuredQuery" do
|
@@ -6,7 +6,7 @@ require 'google/protobuf'
|
|
6
6
|
require 'google/firestore/v1/common_pb'
|
7
7
|
require 'google/firestore/v1/document_pb'
|
8
8
|
require 'google/protobuf/timestamp_pb'
|
9
|
-
|
9
|
+
|
10
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
11
|
add_file("google/firestore/v1/write.proto", :syntax => :proto3) do
|
12
12
|
add_message "google.firestore.v1.Write" do
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -43,7 +43,7 @@ module Google
|
|
43
43
|
# @!attribute [rw] update_time
|
44
44
|
# @return [::Google::Protobuf::Timestamp]
|
45
45
|
# When set, the target document must exist and have been last updated at
|
46
|
-
# that time.
|
46
|
+
# that time. Timestamp must be microsecond aligned.
|
47
47
|
class Precondition
|
48
48
|
include ::Google::Protobuf::MessageExts
|
49
49
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -319,7 +319,9 @@ module Google
|
|
319
319
|
# A structured query.
|
320
320
|
# @!attribute [rw] transaction
|
321
321
|
# @return [::String]
|
322
|
-
#
|
322
|
+
# Run the query within an already active transaction.
|
323
|
+
#
|
324
|
+
# The value here is the opaque transaction ID to execute the query in.
|
323
325
|
# @!attribute [rw] new_transaction
|
324
326
|
# @return [::Google::Cloud::Firestore::V1::TransactionOptions]
|
325
327
|
# Starts a new transaction and reads the documents.
|
@@ -344,8 +346,7 @@ module Google
|
|
344
346
|
# If set, no other fields will be set in this response.
|
345
347
|
# @!attribute [rw] document
|
346
348
|
# @return [::Google::Cloud::Firestore::V1::Document]
|
347
|
-
# A query result.
|
348
|
-
# Not set when reporting partial progress.
|
349
|
+
# A query result, not set when reporting partial progress.
|
349
350
|
# @!attribute [rw] read_time
|
350
351
|
# @return [::Google::Protobuf::Timestamp]
|
351
352
|
# The time at which the document was read. This may be monotonically
|
@@ -359,6 +360,10 @@ module Google
|
|
359
360
|
# @return [::Integer]
|
360
361
|
# The number of results that have been skipped due to an offset between
|
361
362
|
# the last response and the current response.
|
363
|
+
# @!attribute [rw] done
|
364
|
+
# @return [::Boolean]
|
365
|
+
# If present, Firestore has completely finished the request and no more
|
366
|
+
# documents will be returned.
|
362
367
|
class RunQueryResponse
|
363
368
|
include ::Google::Protobuf::MessageExts
|
364
369
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -411,6 +416,10 @@ module Google
|
|
411
416
|
# to PartitionQuery will return up to 8 partitions and a `next_page_token`
|
412
417
|
# if more results exist. A second call to PartitionQuery will return up to
|
413
418
|
# 2 partitions, to complete the total of 10 specified in `partition_count`.
|
419
|
+
# @!attribute [rw] read_time
|
420
|
+
# @return [::Google::Protobuf::Timestamp]
|
421
|
+
# Reads documents as they were at the given time.
|
422
|
+
# This may not be older than 270 seconds.
|
414
423
|
class PartitionQueryRequest
|
415
424
|
include ::Google::Protobuf::MessageExts
|
416
425
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -725,6 +734,10 @@ module Google
|
|
725
734
|
# @return [::String]
|
726
735
|
# A page token. Must be a value from
|
727
736
|
# {::Google::Cloud::Firestore::V1::ListCollectionIdsResponse ListCollectionIdsResponse}.
|
737
|
+
# @!attribute [rw] read_time
|
738
|
+
# @return [::Google::Protobuf::Timestamp]
|
739
|
+
# Reads documents as they were at the given time.
|
740
|
+
# This may not be older than 270 seconds.
|
728
741
|
class ListCollectionIdsRequest
|
729
742
|
include ::Google::Protobuf::MessageExts
|
730
743
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -110,7 +110,10 @@ module Google
|
|
110
110
|
# @!attribute [rw] filters
|
111
111
|
# @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Filter>]
|
112
112
|
# The list of filters to combine.
|
113
|
-
#
|
113
|
+
#
|
114
|
+
# Requires:
|
115
|
+
#
|
116
|
+
# * At least one filter is present.
|
114
117
|
class CompositeFilter
|
115
118
|
include ::Google::Protobuf::MessageExts
|
116
119
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -120,7 +123,7 @@ module Google
|
|
120
123
|
# Unspecified. This value must not be used.
|
121
124
|
OPERATOR_UNSPECIFIED = 0
|
122
125
|
|
123
|
-
#
|
126
|
+
# Documents are required to satisfy all of the combined filters.
|
124
127
|
AND = 1
|
125
128
|
end
|
126
129
|
end
|
@@ -158,7 +158,8 @@ module Google
|
|
158
158
|
SERVER_VALUE_UNSPECIFIED = 0
|
159
159
|
|
160
160
|
# The time at which the server processed the request, with millisecond
|
161
|
-
# precision.
|
161
|
+
# precision. If used on multiple fields (same or different documents) in
|
162
|
+
# a transaction, all the fields will get the same server timestamp.
|
162
163
|
REQUEST_TIME = 1
|
163
164
|
end
|
164
165
|
end
|
@@ -44,7 +44,7 @@ module Google
|
|
44
44
|
# foo = any.unpack(Foo.class);
|
45
45
|
# }
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# Example 3: Pack and unpack a message in Python.
|
48
48
|
#
|
49
49
|
# foo = Foo(...)
|
50
50
|
# any = Any()
|
@@ -54,7 +54,7 @@ module Google
|
|
54
54
|
# any.Unpack(foo)
|
55
55
|
# ...
|
56
56
|
#
|
57
|
-
#
|
57
|
+
# Example 4: Pack and unpack a message in Go
|
58
58
|
#
|
59
59
|
# foo := &pb.Foo{...}
|
60
60
|
# any, err := anypb.New(foo)
|
@@ -75,7 +75,7 @@ module Google
|
|
75
75
|
#
|
76
76
|
#
|
77
77
|
# JSON
|
78
|
-
#
|
78
|
+
#
|
79
79
|
# The JSON representation of an `Any` value uses the regular
|
80
80
|
# representation of the deserialized, embedded message, with an
|
81
81
|
# additional field `@type` which contains the type URL. Example:
|
@@ -46,8 +46,8 @@ module Google
|
|
46
46
|
|
47
47
|
# `Value` represents a dynamically typed value which can be either
|
48
48
|
# null, a number, a string, a boolean, a recursive struct value, or a
|
49
|
-
# list of values. A producer of value is expected to set one of
|
50
|
-
# variants
|
49
|
+
# list of values. A producer of value is expected to set one of these
|
50
|
+
# variants. Absence of any variant indicates an error.
|
51
51
|
#
|
52
52
|
# The JSON representation for `Value` is JSON value.
|
53
53
|
# @!attribute [rw] null_value
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-firestore-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.7'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
215
|
- !ruby/object:Gem::Version
|
210
216
|
version: '0'
|
211
217
|
requirements: []
|
212
|
-
rubygems_version: 3.
|
218
|
+
rubygems_version: 3.3.14
|
213
219
|
signing_key:
|
214
220
|
specification_version: 4
|
215
221
|
summary: API Client library for the Cloud Firestore V1 API
|