google-cloud-firestore 0.24.2 → 0.25.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 -0
- data/CHANGELOG.md +26 -0
- data/EMULATOR.md +49 -0
- data/lib/google-cloud-firestore.rb +6 -1
- data/lib/google/cloud/firestore.rb +36 -8
- data/lib/google/cloud/firestore/batch.rb +1 -1
- data/lib/google/cloud/firestore/client.rb +152 -4
- data/lib/google/cloud/firestore/collection_reference.rb +1 -1
- data/lib/google/cloud/firestore/commit_response.rb +1 -1
- data/lib/google/cloud/firestore/convert.rb +53 -38
- data/lib/google/cloud/firestore/credentials.rb +2 -2
- data/lib/google/cloud/firestore/document_reference.rb +2 -1
- data/lib/google/cloud/firestore/document_snapshot.rb +5 -5
- data/lib/google/cloud/firestore/field_path.rb +2 -2
- data/lib/google/cloud/firestore/field_value.rb +139 -9
- data/lib/google/cloud/firestore/query.rb +21 -15
- data/lib/google/cloud/firestore/query_snapshot.rb +1 -1
- data/lib/google/cloud/firestore/service.rb +31 -13
- data/lib/google/cloud/firestore/transaction.rb +39 -5
- data/lib/google/cloud/firestore/v1.rb +152 -0
- data/lib/google/cloud/firestore/v1/credentials.rb +42 -0
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/common.rb +64 -0
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/document.rb +136 -0
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb +574 -0
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/query.rb +219 -0
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/write.rb +237 -0
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/any.rb +130 -0
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/empty.rb +29 -0
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/timestamp.rb +109 -0
- data/lib/google/cloud/firestore/v1/doc/google/protobuf/wrappers.rb +26 -0
- data/lib/google/cloud/firestore/v1/doc/google/rpc/status.rb +84 -0
- data/lib/google/cloud/firestore/v1/firestore_client.rb +1044 -0
- data/lib/google/cloud/firestore/v1/firestore_client_config.json +100 -0
- data/lib/google/cloud/firestore/v1beta1.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/credentials.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/common.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/document.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/firestore.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +41 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/wrappers.rb +1 -65
- data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +1 -1
- data/lib/google/cloud/firestore/v1beta1/firestore_client_config.json +1 -1
- data/lib/google/cloud/firestore/version.rb +1 -1
- data/lib/google/cloud/firestore/watch/enumerator_queue.rb +0 -2
- data/lib/google/cloud/firestore/watch/inventory.rb +2 -2
- data/lib/google/cloud/firestore/watch/listener.rb +16 -17
- data/lib/google/cloud/firestore/watch/order.rb +1 -1
- data/lib/google/firestore/v1/common_pb.rb +45 -0
- data/lib/google/firestore/v1/document_pb.rb +50 -0
- data/lib/google/firestore/v1/firestore_pb.rb +220 -0
- data/lib/google/firestore/v1/firestore_services_pb.rb +87 -0
- data/lib/google/firestore/v1/query_pb.rb +105 -0
- data/lib/google/firestore/v1/write_pb.rb +79 -0
- data/lib/google/firestore/v1beta1/firestore_services_pb.rb +2 -1
- data/lib/google/firestore/v1beta1/write_pb.rb +3 -0
- metadata +26 -5
@@ -0,0 +1,45 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/firestore/v1/common.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/protobuf/timestamp_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_message "google.firestore.v1.DocumentMask" do
|
11
|
+
repeated :field_paths, :string, 1
|
12
|
+
end
|
13
|
+
add_message "google.firestore.v1.Precondition" do
|
14
|
+
oneof :condition_type do
|
15
|
+
optional :exists, :bool, 1
|
16
|
+
optional :update_time, :message, 2, "google.protobuf.Timestamp"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
add_message "google.firestore.v1.TransactionOptions" do
|
20
|
+
oneof :mode do
|
21
|
+
optional :read_only, :message, 2, "google.firestore.v1.TransactionOptions.ReadOnly"
|
22
|
+
optional :read_write, :message, 3, "google.firestore.v1.TransactionOptions.ReadWrite"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
add_message "google.firestore.v1.TransactionOptions.ReadWrite" do
|
26
|
+
optional :retry_transaction, :bytes, 1
|
27
|
+
end
|
28
|
+
add_message "google.firestore.v1.TransactionOptions.ReadOnly" do
|
29
|
+
oneof :consistency_selector do
|
30
|
+
optional :read_time, :message, 2, "google.protobuf.Timestamp"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
module Google
|
36
|
+
module Firestore
|
37
|
+
module V1
|
38
|
+
DocumentMask = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentMask").msgclass
|
39
|
+
Precondition = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Precondition").msgclass
|
40
|
+
TransactionOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions").msgclass
|
41
|
+
TransactionOptions::ReadWrite = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions.ReadWrite").msgclass
|
42
|
+
TransactionOptions::ReadOnly = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions.ReadOnly").msgclass
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/firestore/v1/document.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/protobuf/struct_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
require 'google/type/latlng_pb'
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_message "google.firestore.v1.Document" do
|
13
|
+
optional :name, :string, 1
|
14
|
+
map :fields, :string, :message, 2, "google.firestore.v1.Value"
|
15
|
+
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
16
|
+
optional :update_time, :message, 4, "google.protobuf.Timestamp"
|
17
|
+
end
|
18
|
+
add_message "google.firestore.v1.Value" do
|
19
|
+
oneof :value_type do
|
20
|
+
optional :null_value, :enum, 11, "google.protobuf.NullValue"
|
21
|
+
optional :boolean_value, :bool, 1
|
22
|
+
optional :integer_value, :int64, 2
|
23
|
+
optional :double_value, :double, 3
|
24
|
+
optional :timestamp_value, :message, 10, "google.protobuf.Timestamp"
|
25
|
+
optional :string_value, :string, 17
|
26
|
+
optional :bytes_value, :bytes, 18
|
27
|
+
optional :reference_value, :string, 5
|
28
|
+
optional :geo_point_value, :message, 8, "google.type.LatLng"
|
29
|
+
optional :array_value, :message, 9, "google.firestore.v1.ArrayValue"
|
30
|
+
optional :map_value, :message, 6, "google.firestore.v1.MapValue"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
add_message "google.firestore.v1.ArrayValue" do
|
34
|
+
repeated :values, :message, 1, "google.firestore.v1.Value"
|
35
|
+
end
|
36
|
+
add_message "google.firestore.v1.MapValue" do
|
37
|
+
map :fields, :string, :message, 1, "google.firestore.v1.Value"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
module Google
|
42
|
+
module Firestore
|
43
|
+
module V1
|
44
|
+
Document = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Document").msgclass
|
45
|
+
Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Value").msgclass
|
46
|
+
ArrayValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ArrayValue").msgclass
|
47
|
+
MapValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.MapValue").msgclass
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,220 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/firestore/v1/firestore.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/firestore/v1/common_pb'
|
9
|
+
require 'google/firestore/v1/document_pb'
|
10
|
+
require 'google/firestore/v1/query_pb'
|
11
|
+
require 'google/firestore/v1/write_pb'
|
12
|
+
require 'google/protobuf/empty_pb'
|
13
|
+
require 'google/protobuf/timestamp_pb'
|
14
|
+
require 'google/rpc/status_pb'
|
15
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
|
+
add_message "google.firestore.v1.GetDocumentRequest" do
|
17
|
+
optional :name, :string, 1
|
18
|
+
optional :mask, :message, 2, "google.firestore.v1.DocumentMask"
|
19
|
+
oneof :consistency_selector do
|
20
|
+
optional :transaction, :bytes, 3
|
21
|
+
optional :read_time, :message, 5, "google.protobuf.Timestamp"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
add_message "google.firestore.v1.ListDocumentsRequest" do
|
25
|
+
optional :parent, :string, 1
|
26
|
+
optional :collection_id, :string, 2
|
27
|
+
optional :page_size, :int32, 3
|
28
|
+
optional :page_token, :string, 4
|
29
|
+
optional :order_by, :string, 6
|
30
|
+
optional :mask, :message, 7, "google.firestore.v1.DocumentMask"
|
31
|
+
optional :show_missing, :bool, 12
|
32
|
+
oneof :consistency_selector do
|
33
|
+
optional :transaction, :bytes, 8
|
34
|
+
optional :read_time, :message, 10, "google.protobuf.Timestamp"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
add_message "google.firestore.v1.ListDocumentsResponse" do
|
38
|
+
repeated :documents, :message, 1, "google.firestore.v1.Document"
|
39
|
+
optional :next_page_token, :string, 2
|
40
|
+
end
|
41
|
+
add_message "google.firestore.v1.CreateDocumentRequest" do
|
42
|
+
optional :parent, :string, 1
|
43
|
+
optional :collection_id, :string, 2
|
44
|
+
optional :document_id, :string, 3
|
45
|
+
optional :document, :message, 4, "google.firestore.v1.Document"
|
46
|
+
optional :mask, :message, 5, "google.firestore.v1.DocumentMask"
|
47
|
+
end
|
48
|
+
add_message "google.firestore.v1.UpdateDocumentRequest" do
|
49
|
+
optional :document, :message, 1, "google.firestore.v1.Document"
|
50
|
+
optional :update_mask, :message, 2, "google.firestore.v1.DocumentMask"
|
51
|
+
optional :mask, :message, 3, "google.firestore.v1.DocumentMask"
|
52
|
+
optional :current_document, :message, 4, "google.firestore.v1.Precondition"
|
53
|
+
end
|
54
|
+
add_message "google.firestore.v1.DeleteDocumentRequest" do
|
55
|
+
optional :name, :string, 1
|
56
|
+
optional :current_document, :message, 2, "google.firestore.v1.Precondition"
|
57
|
+
end
|
58
|
+
add_message "google.firestore.v1.BatchGetDocumentsRequest" do
|
59
|
+
optional :database, :string, 1
|
60
|
+
repeated :documents, :string, 2
|
61
|
+
optional :mask, :message, 3, "google.firestore.v1.DocumentMask"
|
62
|
+
oneof :consistency_selector do
|
63
|
+
optional :transaction, :bytes, 4
|
64
|
+
optional :new_transaction, :message, 5, "google.firestore.v1.TransactionOptions"
|
65
|
+
optional :read_time, :message, 7, "google.protobuf.Timestamp"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
add_message "google.firestore.v1.BatchGetDocumentsResponse" do
|
69
|
+
optional :transaction, :bytes, 3
|
70
|
+
optional :read_time, :message, 4, "google.protobuf.Timestamp"
|
71
|
+
oneof :result do
|
72
|
+
optional :found, :message, 1, "google.firestore.v1.Document"
|
73
|
+
optional :missing, :string, 2
|
74
|
+
end
|
75
|
+
end
|
76
|
+
add_message "google.firestore.v1.BeginTransactionRequest" do
|
77
|
+
optional :database, :string, 1
|
78
|
+
optional :options, :message, 2, "google.firestore.v1.TransactionOptions"
|
79
|
+
end
|
80
|
+
add_message "google.firestore.v1.BeginTransactionResponse" do
|
81
|
+
optional :transaction, :bytes, 1
|
82
|
+
end
|
83
|
+
add_message "google.firestore.v1.CommitRequest" do
|
84
|
+
optional :database, :string, 1
|
85
|
+
repeated :writes, :message, 2, "google.firestore.v1.Write"
|
86
|
+
optional :transaction, :bytes, 3
|
87
|
+
end
|
88
|
+
add_message "google.firestore.v1.CommitResponse" do
|
89
|
+
repeated :write_results, :message, 1, "google.firestore.v1.WriteResult"
|
90
|
+
optional :commit_time, :message, 2, "google.protobuf.Timestamp"
|
91
|
+
end
|
92
|
+
add_message "google.firestore.v1.RollbackRequest" do
|
93
|
+
optional :database, :string, 1
|
94
|
+
optional :transaction, :bytes, 2
|
95
|
+
end
|
96
|
+
add_message "google.firestore.v1.RunQueryRequest" do
|
97
|
+
optional :parent, :string, 1
|
98
|
+
oneof :query_type do
|
99
|
+
optional :structured_query, :message, 2, "google.firestore.v1.StructuredQuery"
|
100
|
+
end
|
101
|
+
oneof :consistency_selector do
|
102
|
+
optional :transaction, :bytes, 5
|
103
|
+
optional :new_transaction, :message, 6, "google.firestore.v1.TransactionOptions"
|
104
|
+
optional :read_time, :message, 7, "google.protobuf.Timestamp"
|
105
|
+
end
|
106
|
+
end
|
107
|
+
add_message "google.firestore.v1.RunQueryResponse" do
|
108
|
+
optional :transaction, :bytes, 2
|
109
|
+
optional :document, :message, 1, "google.firestore.v1.Document"
|
110
|
+
optional :read_time, :message, 3, "google.protobuf.Timestamp"
|
111
|
+
optional :skipped_results, :int32, 4
|
112
|
+
end
|
113
|
+
add_message "google.firestore.v1.WriteRequest" do
|
114
|
+
optional :database, :string, 1
|
115
|
+
optional :stream_id, :string, 2
|
116
|
+
repeated :writes, :message, 3, "google.firestore.v1.Write"
|
117
|
+
optional :stream_token, :bytes, 4
|
118
|
+
map :labels, :string, :string, 5
|
119
|
+
end
|
120
|
+
add_message "google.firestore.v1.WriteResponse" do
|
121
|
+
optional :stream_id, :string, 1
|
122
|
+
optional :stream_token, :bytes, 2
|
123
|
+
repeated :write_results, :message, 3, "google.firestore.v1.WriteResult"
|
124
|
+
optional :commit_time, :message, 4, "google.protobuf.Timestamp"
|
125
|
+
end
|
126
|
+
add_message "google.firestore.v1.ListenRequest" do
|
127
|
+
optional :database, :string, 1
|
128
|
+
map :labels, :string, :string, 4
|
129
|
+
oneof :target_change do
|
130
|
+
optional :add_target, :message, 2, "google.firestore.v1.Target"
|
131
|
+
optional :remove_target, :int32, 3
|
132
|
+
end
|
133
|
+
end
|
134
|
+
add_message "google.firestore.v1.ListenResponse" do
|
135
|
+
oneof :response_type do
|
136
|
+
optional :target_change, :message, 2, "google.firestore.v1.TargetChange"
|
137
|
+
optional :document_change, :message, 3, "google.firestore.v1.DocumentChange"
|
138
|
+
optional :document_delete, :message, 4, "google.firestore.v1.DocumentDelete"
|
139
|
+
optional :document_remove, :message, 6, "google.firestore.v1.DocumentRemove"
|
140
|
+
optional :filter, :message, 5, "google.firestore.v1.ExistenceFilter"
|
141
|
+
end
|
142
|
+
end
|
143
|
+
add_message "google.firestore.v1.Target" do
|
144
|
+
optional :target_id, :int32, 5
|
145
|
+
optional :once, :bool, 6
|
146
|
+
oneof :target_type do
|
147
|
+
optional :query, :message, 2, "google.firestore.v1.Target.QueryTarget"
|
148
|
+
optional :documents, :message, 3, "google.firestore.v1.Target.DocumentsTarget"
|
149
|
+
end
|
150
|
+
oneof :resume_type do
|
151
|
+
optional :resume_token, :bytes, 4
|
152
|
+
optional :read_time, :message, 11, "google.protobuf.Timestamp"
|
153
|
+
end
|
154
|
+
end
|
155
|
+
add_message "google.firestore.v1.Target.DocumentsTarget" do
|
156
|
+
repeated :documents, :string, 2
|
157
|
+
end
|
158
|
+
add_message "google.firestore.v1.Target.QueryTarget" do
|
159
|
+
optional :parent, :string, 1
|
160
|
+
oneof :query_type do
|
161
|
+
optional :structured_query, :message, 2, "google.firestore.v1.StructuredQuery"
|
162
|
+
end
|
163
|
+
end
|
164
|
+
add_message "google.firestore.v1.TargetChange" do
|
165
|
+
optional :target_change_type, :enum, 1, "google.firestore.v1.TargetChange.TargetChangeType"
|
166
|
+
repeated :target_ids, :int32, 2
|
167
|
+
optional :cause, :message, 3, "google.rpc.Status"
|
168
|
+
optional :resume_token, :bytes, 4
|
169
|
+
optional :read_time, :message, 6, "google.protobuf.Timestamp"
|
170
|
+
end
|
171
|
+
add_enum "google.firestore.v1.TargetChange.TargetChangeType" do
|
172
|
+
value :NO_CHANGE, 0
|
173
|
+
value :ADD, 1
|
174
|
+
value :REMOVE, 2
|
175
|
+
value :CURRENT, 3
|
176
|
+
value :RESET, 4
|
177
|
+
end
|
178
|
+
add_message "google.firestore.v1.ListCollectionIdsRequest" do
|
179
|
+
optional :parent, :string, 1
|
180
|
+
optional :page_size, :int32, 2
|
181
|
+
optional :page_token, :string, 3
|
182
|
+
end
|
183
|
+
add_message "google.firestore.v1.ListCollectionIdsResponse" do
|
184
|
+
repeated :collection_ids, :string, 1
|
185
|
+
optional :next_page_token, :string, 2
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
module Google
|
190
|
+
module Firestore
|
191
|
+
module V1
|
192
|
+
GetDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.GetDocumentRequest").msgclass
|
193
|
+
ListDocumentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ListDocumentsRequest").msgclass
|
194
|
+
ListDocumentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ListDocumentsResponse").msgclass
|
195
|
+
CreateDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.CreateDocumentRequest").msgclass
|
196
|
+
UpdateDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.UpdateDocumentRequest").msgclass
|
197
|
+
DeleteDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DeleteDocumentRequest").msgclass
|
198
|
+
BatchGetDocumentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BatchGetDocumentsRequest").msgclass
|
199
|
+
BatchGetDocumentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BatchGetDocumentsResponse").msgclass
|
200
|
+
BeginTransactionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BeginTransactionRequest").msgclass
|
201
|
+
BeginTransactionResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BeginTransactionResponse").msgclass
|
202
|
+
CommitRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.CommitRequest").msgclass
|
203
|
+
CommitResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.CommitResponse").msgclass
|
204
|
+
RollbackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.RollbackRequest").msgclass
|
205
|
+
RunQueryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.RunQueryRequest").msgclass
|
206
|
+
RunQueryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.RunQueryResponse").msgclass
|
207
|
+
WriteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.WriteRequest").msgclass
|
208
|
+
WriteResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.WriteResponse").msgclass
|
209
|
+
ListenRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ListenRequest").msgclass
|
210
|
+
ListenResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ListenResponse").msgclass
|
211
|
+
Target = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Target").msgclass
|
212
|
+
Target::DocumentsTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Target.DocumentsTarget").msgclass
|
213
|
+
Target::QueryTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Target.QueryTarget").msgclass
|
214
|
+
TargetChange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TargetChange").msgclass
|
215
|
+
TargetChange::TargetChangeType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TargetChange.TargetChangeType").enummodule
|
216
|
+
ListCollectionIdsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ListCollectionIdsRequest").msgclass
|
217
|
+
ListCollectionIdsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ListCollectionIdsResponse").msgclass
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/firestore/v1/firestore.proto for package 'google.firestore.v1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2018 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
|
21
|
+
require 'grpc'
|
22
|
+
require 'google/firestore/v1/firestore_pb'
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Firestore
|
26
|
+
module V1
|
27
|
+
module Firestore
|
28
|
+
# The Cloud Firestore service.
|
29
|
+
#
|
30
|
+
# This service exposes several types of comparable timestamps:
|
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.
|
44
|
+
class Service
|
45
|
+
|
46
|
+
include GRPC::GenericService
|
47
|
+
|
48
|
+
self.marshal_class_method = :encode
|
49
|
+
self.unmarshal_class_method = :decode
|
50
|
+
self.service_name = 'google.firestore.v1.Firestore'
|
51
|
+
|
52
|
+
# Gets a single document.
|
53
|
+
rpc :GetDocument, GetDocumentRequest, Document
|
54
|
+
# Lists documents.
|
55
|
+
rpc :ListDocuments, ListDocumentsRequest, ListDocumentsResponse
|
56
|
+
# Creates a new document.
|
57
|
+
rpc :CreateDocument, CreateDocumentRequest, Document
|
58
|
+
# Updates or inserts a document.
|
59
|
+
rpc :UpdateDocument, UpdateDocumentRequest, Document
|
60
|
+
# Deletes a document.
|
61
|
+
rpc :DeleteDocument, DeleteDocumentRequest, Google::Protobuf::Empty
|
62
|
+
# Gets multiple documents.
|
63
|
+
#
|
64
|
+
# Documents returned by this method are not guaranteed to be returned in the
|
65
|
+
# same order that they were requested.
|
66
|
+
rpc :BatchGetDocuments, BatchGetDocumentsRequest, stream(BatchGetDocumentsResponse)
|
67
|
+
# Starts a new transaction.
|
68
|
+
rpc :BeginTransaction, BeginTransactionRequest, BeginTransactionResponse
|
69
|
+
# Commits a transaction, while optionally updating documents.
|
70
|
+
rpc :Commit, CommitRequest, CommitResponse
|
71
|
+
# Rolls back a transaction.
|
72
|
+
rpc :Rollback, RollbackRequest, Google::Protobuf::Empty
|
73
|
+
# Runs a query.
|
74
|
+
rpc :RunQuery, RunQueryRequest, stream(RunQueryResponse)
|
75
|
+
# Streams batches of document updates and deletes, in order.
|
76
|
+
rpc :Write, stream(WriteRequest), stream(WriteResponse)
|
77
|
+
# Listens to changes.
|
78
|
+
rpc :Listen, stream(ListenRequest), stream(ListenResponse)
|
79
|
+
# Lists all the collection IDs underneath a document.
|
80
|
+
rpc :ListCollectionIds, ListCollectionIdsRequest, ListCollectionIdsResponse
|
81
|
+
end
|
82
|
+
|
83
|
+
Stub = Service.rpc_stub_class
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/firestore/v1/query.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/firestore/v1/document_pb'
|
9
|
+
require 'google/protobuf/wrappers_pb'
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_message "google.firestore.v1.StructuredQuery" do
|
12
|
+
optional :select, :message, 1, "google.firestore.v1.StructuredQuery.Projection"
|
13
|
+
repeated :from, :message, 2, "google.firestore.v1.StructuredQuery.CollectionSelector"
|
14
|
+
optional :where, :message, 3, "google.firestore.v1.StructuredQuery.Filter"
|
15
|
+
repeated :order_by, :message, 4, "google.firestore.v1.StructuredQuery.Order"
|
16
|
+
optional :start_at, :message, 7, "google.firestore.v1.Cursor"
|
17
|
+
optional :end_at, :message, 8, "google.firestore.v1.Cursor"
|
18
|
+
optional :offset, :int32, 6
|
19
|
+
optional :limit, :message, 5, "google.protobuf.Int32Value"
|
20
|
+
end
|
21
|
+
add_message "google.firestore.v1.StructuredQuery.CollectionSelector" do
|
22
|
+
optional :collection_id, :string, 2
|
23
|
+
optional :all_descendants, :bool, 3
|
24
|
+
end
|
25
|
+
add_message "google.firestore.v1.StructuredQuery.Filter" do
|
26
|
+
oneof :filter_type do
|
27
|
+
optional :composite_filter, :message, 1, "google.firestore.v1.StructuredQuery.CompositeFilter"
|
28
|
+
optional :field_filter, :message, 2, "google.firestore.v1.StructuredQuery.FieldFilter"
|
29
|
+
optional :unary_filter, :message, 3, "google.firestore.v1.StructuredQuery.UnaryFilter"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
add_message "google.firestore.v1.StructuredQuery.CompositeFilter" do
|
33
|
+
optional :op, :enum, 1, "google.firestore.v1.StructuredQuery.CompositeFilter.Operator"
|
34
|
+
repeated :filters, :message, 2, "google.firestore.v1.StructuredQuery.Filter"
|
35
|
+
end
|
36
|
+
add_enum "google.firestore.v1.StructuredQuery.CompositeFilter.Operator" do
|
37
|
+
value :OPERATOR_UNSPECIFIED, 0
|
38
|
+
value :AND, 1
|
39
|
+
end
|
40
|
+
add_message "google.firestore.v1.StructuredQuery.FieldFilter" do
|
41
|
+
optional :field, :message, 1, "google.firestore.v1.StructuredQuery.FieldReference"
|
42
|
+
optional :op, :enum, 2, "google.firestore.v1.StructuredQuery.FieldFilter.Operator"
|
43
|
+
optional :value, :message, 3, "google.firestore.v1.Value"
|
44
|
+
end
|
45
|
+
add_enum "google.firestore.v1.StructuredQuery.FieldFilter.Operator" do
|
46
|
+
value :OPERATOR_UNSPECIFIED, 0
|
47
|
+
value :LESS_THAN, 1
|
48
|
+
value :LESS_THAN_OR_EQUAL, 2
|
49
|
+
value :GREATER_THAN, 3
|
50
|
+
value :GREATER_THAN_OR_EQUAL, 4
|
51
|
+
value :EQUAL, 5
|
52
|
+
value :ARRAY_CONTAINS, 7
|
53
|
+
end
|
54
|
+
add_message "google.firestore.v1.StructuredQuery.UnaryFilter" do
|
55
|
+
optional :op, :enum, 1, "google.firestore.v1.StructuredQuery.UnaryFilter.Operator"
|
56
|
+
oneof :operand_type do
|
57
|
+
optional :field, :message, 2, "google.firestore.v1.StructuredQuery.FieldReference"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
add_enum "google.firestore.v1.StructuredQuery.UnaryFilter.Operator" do
|
61
|
+
value :OPERATOR_UNSPECIFIED, 0
|
62
|
+
value :IS_NAN, 2
|
63
|
+
value :IS_NULL, 3
|
64
|
+
end
|
65
|
+
add_message "google.firestore.v1.StructuredQuery.Order" do
|
66
|
+
optional :field, :message, 1, "google.firestore.v1.StructuredQuery.FieldReference"
|
67
|
+
optional :direction, :enum, 2, "google.firestore.v1.StructuredQuery.Direction"
|
68
|
+
end
|
69
|
+
add_message "google.firestore.v1.StructuredQuery.FieldReference" do
|
70
|
+
optional :field_path, :string, 2
|
71
|
+
end
|
72
|
+
add_message "google.firestore.v1.StructuredQuery.Projection" do
|
73
|
+
repeated :fields, :message, 2, "google.firestore.v1.StructuredQuery.FieldReference"
|
74
|
+
end
|
75
|
+
add_enum "google.firestore.v1.StructuredQuery.Direction" do
|
76
|
+
value :DIRECTION_UNSPECIFIED, 0
|
77
|
+
value :ASCENDING, 1
|
78
|
+
value :DESCENDING, 2
|
79
|
+
end
|
80
|
+
add_message "google.firestore.v1.Cursor" do
|
81
|
+
repeated :values, :message, 1, "google.firestore.v1.Value"
|
82
|
+
optional :before, :bool, 2
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
module Google
|
87
|
+
module Firestore
|
88
|
+
module V1
|
89
|
+
StructuredQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery").msgclass
|
90
|
+
StructuredQuery::CollectionSelector = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.CollectionSelector").msgclass
|
91
|
+
StructuredQuery::Filter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Filter").msgclass
|
92
|
+
StructuredQuery::CompositeFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.CompositeFilter").msgclass
|
93
|
+
StructuredQuery::CompositeFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.CompositeFilter.Operator").enummodule
|
94
|
+
StructuredQuery::FieldFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldFilter").msgclass
|
95
|
+
StructuredQuery::FieldFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldFilter.Operator").enummodule
|
96
|
+
StructuredQuery::UnaryFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.UnaryFilter").msgclass
|
97
|
+
StructuredQuery::UnaryFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.UnaryFilter.Operator").enummodule
|
98
|
+
StructuredQuery::Order = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Order").msgclass
|
99
|
+
StructuredQuery::FieldReference = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldReference").msgclass
|
100
|
+
StructuredQuery::Projection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Projection").msgclass
|
101
|
+
StructuredQuery::Direction = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Direction").enummodule
|
102
|
+
Cursor = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Cursor").msgclass
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|