google-cloud-firestore-v1 0.10.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/README.md +2 -2
- data/lib/google/cloud/firestore/v1/firestore/client.rb +81 -29
- data/lib/google/cloud/firestore/v1/firestore/rest/client.rb +307 -20
- data/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb +37 -16
- data/lib/google/cloud/firestore/v1/version.rb +1 -1
- data/lib/google/firestore/v1/aggregation_result_pb.rb +25 -4
- data/lib/google/firestore/v1/bloom_filter_pb.rb +43 -0
- data/lib/google/firestore/v1/common_pb.rb +25 -24
- data/lib/google/firestore/v1/document_pb.rb +26 -28
- data/lib/google/firestore/v1/firestore_pb.rb +33 -219
- data/lib/google/firestore/v1/firestore_services_pb.rb +3 -3
- data/lib/google/firestore/v1/query_pb.rb +28 -96
- data/lib/google/firestore/v1/write_pb.rb +29 -53
- data/proto_docs/google/api/client.rb +81 -4
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/firestore/v1/bloom_filter.rb +79 -0
- data/proto_docs/google/firestore/v1/common.rb +7 -1
- data/proto_docs/google/firestore/v1/document.rb +12 -12
- data/proto_docs/google/firestore/v1/firestore.rb +58 -11
- data/proto_docs/google/firestore/v1/query.rb +82 -12
- data/proto_docs/google/firestore/v1/write.rb +18 -0
- data/proto_docs/google/protobuf/any.rb +9 -5
- data/proto_docs/google/protobuf/struct.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +11 -8
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/firestore/v1/firestore.proto
|
3
4
|
|
@@ -13,229 +14,42 @@ require 'google/firestore/v1/query_pb'
|
|
13
14
|
require 'google/firestore/v1/write_pb'
|
14
15
|
require 'google/protobuf/empty_pb'
|
15
16
|
require 'google/protobuf/timestamp_pb'
|
17
|
+
require 'google/protobuf/wrappers_pb'
|
16
18
|
require 'google/rpc/status_pb'
|
17
19
|
|
18
|
-
|
19
|
-
add_file("google/firestore/v1/firestore.proto", :syntax => :proto3) do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
optional :collection_id, :string, 2
|
48
|
-
optional :document_id, :string, 3
|
49
|
-
optional :document, :message, 4, "google.firestore.v1.Document"
|
50
|
-
optional :mask, :message, 5, "google.firestore.v1.DocumentMask"
|
51
|
-
end
|
52
|
-
add_message "google.firestore.v1.UpdateDocumentRequest" do
|
53
|
-
optional :document, :message, 1, "google.firestore.v1.Document"
|
54
|
-
optional :update_mask, :message, 2, "google.firestore.v1.DocumentMask"
|
55
|
-
optional :mask, :message, 3, "google.firestore.v1.DocumentMask"
|
56
|
-
optional :current_document, :message, 4, "google.firestore.v1.Precondition"
|
57
|
-
end
|
58
|
-
add_message "google.firestore.v1.DeleteDocumentRequest" do
|
59
|
-
optional :name, :string, 1
|
60
|
-
optional :current_document, :message, 2, "google.firestore.v1.Precondition"
|
61
|
-
end
|
62
|
-
add_message "google.firestore.v1.BatchGetDocumentsRequest" do
|
63
|
-
optional :database, :string, 1
|
64
|
-
repeated :documents, :string, 2
|
65
|
-
optional :mask, :message, 3, "google.firestore.v1.DocumentMask"
|
66
|
-
oneof :consistency_selector do
|
67
|
-
optional :transaction, :bytes, 4
|
68
|
-
optional :new_transaction, :message, 5, "google.firestore.v1.TransactionOptions"
|
69
|
-
optional :read_time, :message, 7, "google.protobuf.Timestamp"
|
70
|
-
end
|
71
|
-
end
|
72
|
-
add_message "google.firestore.v1.BatchGetDocumentsResponse" do
|
73
|
-
optional :transaction, :bytes, 3
|
74
|
-
optional :read_time, :message, 4, "google.protobuf.Timestamp"
|
75
|
-
oneof :result do
|
76
|
-
optional :found, :message, 1, "google.firestore.v1.Document"
|
77
|
-
optional :missing, :string, 2
|
78
|
-
end
|
79
|
-
end
|
80
|
-
add_message "google.firestore.v1.BeginTransactionRequest" do
|
81
|
-
optional :database, :string, 1
|
82
|
-
optional :options, :message, 2, "google.firestore.v1.TransactionOptions"
|
83
|
-
end
|
84
|
-
add_message "google.firestore.v1.BeginTransactionResponse" do
|
85
|
-
optional :transaction, :bytes, 1
|
86
|
-
end
|
87
|
-
add_message "google.firestore.v1.CommitRequest" do
|
88
|
-
optional :database, :string, 1
|
89
|
-
repeated :writes, :message, 2, "google.firestore.v1.Write"
|
90
|
-
optional :transaction, :bytes, 3
|
91
|
-
end
|
92
|
-
add_message "google.firestore.v1.CommitResponse" do
|
93
|
-
repeated :write_results, :message, 1, "google.firestore.v1.WriteResult"
|
94
|
-
optional :commit_time, :message, 2, "google.protobuf.Timestamp"
|
95
|
-
end
|
96
|
-
add_message "google.firestore.v1.RollbackRequest" do
|
97
|
-
optional :database, :string, 1
|
98
|
-
optional :transaction, :bytes, 2
|
99
|
-
end
|
100
|
-
add_message "google.firestore.v1.RunQueryRequest" do
|
101
|
-
optional :parent, :string, 1
|
102
|
-
oneof :query_type do
|
103
|
-
optional :structured_query, :message, 2, "google.firestore.v1.StructuredQuery"
|
104
|
-
end
|
105
|
-
oneof :consistency_selector do
|
106
|
-
optional :transaction, :bytes, 5
|
107
|
-
optional :new_transaction, :message, 6, "google.firestore.v1.TransactionOptions"
|
108
|
-
optional :read_time, :message, 7, "google.protobuf.Timestamp"
|
109
|
-
end
|
110
|
-
end
|
111
|
-
add_message "google.firestore.v1.RunQueryResponse" do
|
112
|
-
optional :transaction, :bytes, 2
|
113
|
-
optional :document, :message, 1, "google.firestore.v1.Document"
|
114
|
-
optional :read_time, :message, 3, "google.protobuf.Timestamp"
|
115
|
-
optional :skipped_results, :int32, 4
|
116
|
-
oneof :continuation_selector do
|
117
|
-
optional :done, :bool, 6
|
118
|
-
end
|
119
|
-
end
|
120
|
-
add_message "google.firestore.v1.RunAggregationQueryRequest" do
|
121
|
-
optional :parent, :string, 1
|
122
|
-
oneof :query_type do
|
123
|
-
optional :structured_aggregation_query, :message, 2, "google.firestore.v1.StructuredAggregationQuery"
|
124
|
-
end
|
125
|
-
oneof :consistency_selector do
|
126
|
-
optional :transaction, :bytes, 4
|
127
|
-
optional :new_transaction, :message, 5, "google.firestore.v1.TransactionOptions"
|
128
|
-
optional :read_time, :message, 6, "google.protobuf.Timestamp"
|
129
|
-
end
|
130
|
-
end
|
131
|
-
add_message "google.firestore.v1.RunAggregationQueryResponse" do
|
132
|
-
optional :result, :message, 1, "google.firestore.v1.AggregationResult"
|
133
|
-
optional :transaction, :bytes, 2
|
134
|
-
optional :read_time, :message, 3, "google.protobuf.Timestamp"
|
135
|
-
end
|
136
|
-
add_message "google.firestore.v1.PartitionQueryRequest" do
|
137
|
-
optional :parent, :string, 1
|
138
|
-
optional :partition_count, :int64, 3
|
139
|
-
optional :page_token, :string, 4
|
140
|
-
optional :page_size, :int32, 5
|
141
|
-
oneof :query_type do
|
142
|
-
optional :structured_query, :message, 2, "google.firestore.v1.StructuredQuery"
|
143
|
-
end
|
144
|
-
oneof :consistency_selector do
|
145
|
-
optional :read_time, :message, 6, "google.protobuf.Timestamp"
|
146
|
-
end
|
147
|
-
end
|
148
|
-
add_message "google.firestore.v1.PartitionQueryResponse" do
|
149
|
-
repeated :partitions, :message, 1, "google.firestore.v1.Cursor"
|
150
|
-
optional :next_page_token, :string, 2
|
151
|
-
end
|
152
|
-
add_message "google.firestore.v1.WriteRequest" do
|
153
|
-
optional :database, :string, 1
|
154
|
-
optional :stream_id, :string, 2
|
155
|
-
repeated :writes, :message, 3, "google.firestore.v1.Write"
|
156
|
-
optional :stream_token, :bytes, 4
|
157
|
-
map :labels, :string, :string, 5
|
158
|
-
end
|
159
|
-
add_message "google.firestore.v1.WriteResponse" do
|
160
|
-
optional :stream_id, :string, 1
|
161
|
-
optional :stream_token, :bytes, 2
|
162
|
-
repeated :write_results, :message, 3, "google.firestore.v1.WriteResult"
|
163
|
-
optional :commit_time, :message, 4, "google.protobuf.Timestamp"
|
164
|
-
end
|
165
|
-
add_message "google.firestore.v1.ListenRequest" do
|
166
|
-
optional :database, :string, 1
|
167
|
-
map :labels, :string, :string, 4
|
168
|
-
oneof :target_change do
|
169
|
-
optional :add_target, :message, 2, "google.firestore.v1.Target"
|
170
|
-
optional :remove_target, :int32, 3
|
171
|
-
end
|
172
|
-
end
|
173
|
-
add_message "google.firestore.v1.ListenResponse" do
|
174
|
-
oneof :response_type do
|
175
|
-
optional :target_change, :message, 2, "google.firestore.v1.TargetChange"
|
176
|
-
optional :document_change, :message, 3, "google.firestore.v1.DocumentChange"
|
177
|
-
optional :document_delete, :message, 4, "google.firestore.v1.DocumentDelete"
|
178
|
-
optional :document_remove, :message, 6, "google.firestore.v1.DocumentRemove"
|
179
|
-
optional :filter, :message, 5, "google.firestore.v1.ExistenceFilter"
|
180
|
-
end
|
181
|
-
end
|
182
|
-
add_message "google.firestore.v1.Target" do
|
183
|
-
optional :target_id, :int32, 5
|
184
|
-
optional :once, :bool, 6
|
185
|
-
oneof :target_type do
|
186
|
-
optional :query, :message, 2, "google.firestore.v1.Target.QueryTarget"
|
187
|
-
optional :documents, :message, 3, "google.firestore.v1.Target.DocumentsTarget"
|
188
|
-
end
|
189
|
-
oneof :resume_type do
|
190
|
-
optional :resume_token, :bytes, 4
|
191
|
-
optional :read_time, :message, 11, "google.protobuf.Timestamp"
|
192
|
-
end
|
193
|
-
end
|
194
|
-
add_message "google.firestore.v1.Target.DocumentsTarget" do
|
195
|
-
repeated :documents, :string, 2
|
196
|
-
end
|
197
|
-
add_message "google.firestore.v1.Target.QueryTarget" do
|
198
|
-
optional :parent, :string, 1
|
199
|
-
oneof :query_type do
|
200
|
-
optional :structured_query, :message, 2, "google.firestore.v1.StructuredQuery"
|
201
|
-
end
|
202
|
-
end
|
203
|
-
add_message "google.firestore.v1.TargetChange" do
|
204
|
-
optional :target_change_type, :enum, 1, "google.firestore.v1.TargetChange.TargetChangeType"
|
205
|
-
repeated :target_ids, :int32, 2
|
206
|
-
optional :cause, :message, 3, "google.rpc.Status"
|
207
|
-
optional :resume_token, :bytes, 4
|
208
|
-
optional :read_time, :message, 6, "google.protobuf.Timestamp"
|
209
|
-
end
|
210
|
-
add_enum "google.firestore.v1.TargetChange.TargetChangeType" do
|
211
|
-
value :NO_CHANGE, 0
|
212
|
-
value :ADD, 1
|
213
|
-
value :REMOVE, 2
|
214
|
-
value :CURRENT, 3
|
215
|
-
value :RESET, 4
|
216
|
-
end
|
217
|
-
add_message "google.firestore.v1.ListCollectionIdsRequest" do
|
218
|
-
optional :parent, :string, 1
|
219
|
-
optional :page_size, :int32, 2
|
220
|
-
optional :page_token, :string, 3
|
221
|
-
oneof :consistency_selector do
|
222
|
-
optional :read_time, :message, 4, "google.protobuf.Timestamp"
|
223
|
-
end
|
224
|
-
end
|
225
|
-
add_message "google.firestore.v1.ListCollectionIdsResponse" do
|
226
|
-
repeated :collection_ids, :string, 1
|
227
|
-
optional :next_page_token, :string, 2
|
228
|
-
end
|
229
|
-
add_message "google.firestore.v1.BatchWriteRequest" do
|
230
|
-
optional :database, :string, 1
|
231
|
-
repeated :writes, :message, 2, "google.firestore.v1.Write"
|
232
|
-
map :labels, :string, :string, 3
|
233
|
-
end
|
234
|
-
add_message "google.firestore.v1.BatchWriteResponse" do
|
235
|
-
repeated :write_results, :message, 1, "google.firestore.v1.WriteResult"
|
236
|
-
repeated :status, :message, 2, "google.rpc.Status"
|
20
|
+
|
21
|
+
descriptor_data = "\n#google/firestore/v1/firestore.proto\x12\x13google.firestore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/firestore/v1/aggregation_result.proto\x1a google/firestore/v1/common.proto\x1a\"google/firestore/v1/document.proto\x1a\x1fgoogle/firestore/v1/query.proto\x1a\x1fgoogle/firestore/v1/write.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xb9\x01\n\x12GetDocumentRequest\x12\x12\n\x04name\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12/\n\x04mask\x18\x02 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12\x15\n\x0btransaction\x18\x03 \x01(\x0cH\x00\x12/\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"\xc1\x02\n\x14ListDocumentsRequest\x12\x14\n\x06parent\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x1b\n\rcollection_id\x18\x02 \x01(\tB\x04\xe2\x41\x01\x01\x12\x17\n\tpage_size\x18\x03 \x01(\x05\x42\x04\xe2\x41\x01\x01\x12\x18\n\npage_token\x18\x04 \x01(\tB\x04\xe2\x41\x01\x01\x12\x16\n\x08order_by\x18\x06 \x01(\tB\x04\xe2\x41\x01\x01\x12\x35\n\x04mask\x18\x07 \x01(\x0b\x32!.google.firestore.v1.DocumentMaskB\x04\xe2\x41\x01\x01\x12\x15\n\x0btransaction\x18\x08 \x01(\x0cH\x00\x12/\n\tread_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x14\n\x0cshow_missing\x18\x0c \x01(\x08\x42\x16\n\x14\x63onsistency_selector\"b\n\x15ListDocumentsResponse\x12\x30\n\tdocuments\x18\x01 \x03(\x0b\x32\x1d.google.firestore.v1.Document\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n\x15\x43reateDocumentRequest\x12\x14\n\x06parent\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x1b\n\rcollection_id\x18\x02 \x01(\tB\x04\xe2\x41\x01\x02\x12\x13\n\x0b\x64ocument_id\x18\x03 \x01(\t\x12\x35\n\x08\x64ocument\x18\x04 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentB\x04\xe2\x41\x01\x02\x12/\n\x04mask\x18\x05 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\"\xf4\x01\n\x15UpdateDocumentRequest\x12\x35\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentB\x04\xe2\x41\x01\x02\x12\x36\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12/\n\x04mask\x18\x03 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12;\n\x10\x63urrent_document\x18\x04 \x01(\x0b\x32!.google.firestore.v1.Precondition\"h\n\x15\x44\x65leteDocumentRequest\x12\x12\n\x04name\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12;\n\x10\x63urrent_document\x18\x02 \x01(\x0b\x32!.google.firestore.v1.Precondition\"\x9a\x02\n\x18\x42\x61tchGetDocumentsRequest\x12\x16\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x11\n\tdocuments\x18\x02 \x03(\t\x12/\n\x04mask\x18\x03 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12\x15\n\x0btransaction\x18\x04 \x01(\x0cH\x00\x12\x42\n\x0fnew_transaction\x18\x05 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x00\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"\xac\x01\n\x19\x42\x61tchGetDocumentsResponse\x12.\n\x05\x66ound\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentH\x00\x12\x11\n\x07missing\x18\x02 \x01(\tH\x00\x12\x13\n\x0btransaction\x18\x03 \x01(\x0c\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x08\n\x06result\"k\n\x17\x42\x65ginTransactionRequest\x12\x16\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x38\n\x07options\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptions\"/\n\x18\x42\x65ginTransactionResponse\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\"h\n\rCommitRequest\x12\x16\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12*\n\x06writes\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x13\n\x0btransaction\x18\x03 \x01(\x0c\"z\n\x0e\x43ommitResponse\x12\x37\n\rwrite_results\x18\x01 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12/\n\x0b\x63ommit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\x0fRollbackRequest\x12\x16\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x19\n\x0btransaction\x18\x02 \x01(\x0c\x42\x04\xe2\x41\x01\x02\"\x9b\x02\n\x0fRunQueryRequest\x12\x14\n\x06parent\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12\x15\n\x0btransaction\x18\x05 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x06 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"\xc9\x01\n\x10RunQueryResponse\x12\x13\n\x0btransaction\x18\x02 \x01(\x0c\x12/\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.Document\x12-\n\tread_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fskipped_results\x18\x04 \x01(\x05\x12\x0e\n\x04\x64one\x18\x06 \x01(\x08H\x00\x42\x17\n\x15\x63ontinuation_selector\"\xbd\x02\n\x1aRunAggregationQueryRequest\x12\x14\n\x06parent\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12W\n\x1cstructured_aggregation_query\x18\x02 \x01(\x0b\x32/.google.firestore.v1.StructuredAggregationQueryH\x00\x12\x15\n\x0btransaction\x18\x04 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x05 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"\x99\x01\n\x1bRunAggregationQueryResponse\x12\x36\n\x06result\x18\x01 \x01(\x0b\x32&.google.firestore.v1.AggregationResult\x12\x13\n\x0btransaction\x18\x02 \x01(\x0c\x12-\n\tread_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x86\x02\n\x15PartitionQueryRequest\x12\x14\n\x06parent\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12\x17\n\x0fpartition_count\x18\x03 \x01(\x03\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12/\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"b\n\x16PartitionQueryResponse\x12/\n\npartitions\x18\x01 \x03(\x0b\x32\x1b.google.firestore.v1.Cursor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe9\x01\n\x0cWriteRequest\x12\x16\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x11\n\tstream_id\x18\x02 \x01(\t\x12*\n\x06writes\x18\x03 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x14\n\x0cstream_token\x18\x04 \x01(\x0c\x12=\n\x06labels\x18\x05 \x03(\x0b\x32-.google.firestore.v1.WriteRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\rWriteResponse\x12\x11\n\tstream_id\x18\x01 \x01(\t\x12\x14\n\x0cstream_token\x18\x02 \x01(\x0c\x12\x37\n\rwrite_results\x18\x03 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12/\n\x0b\x63ommit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xf3\x01\n\rListenRequest\x12\x16\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x31\n\nadd_target\x18\x02 \x01(\x0b\x32\x1b.google.firestore.v1.TargetH\x00\x12\x17\n\rremove_target\x18\x03 \x01(\x05H\x00\x12>\n\x06labels\x18\x04 \x03(\x0b\x32..google.firestore.v1.ListenRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0f\n\rtarget_change\"\xd5\x02\n\x0eListenResponse\x12:\n\rtarget_change\x18\x02 \x01(\x0b\x32!.google.firestore.v1.TargetChangeH\x00\x12>\n\x0f\x64ocument_change\x18\x03 \x01(\x0b\x32#.google.firestore.v1.DocumentChangeH\x00\x12>\n\x0f\x64ocument_delete\x18\x04 \x01(\x0b\x32#.google.firestore.v1.DocumentDeleteH\x00\x12>\n\x0f\x64ocument_remove\x18\x06 \x01(\x0b\x32#.google.firestore.v1.DocumentRemoveH\x00\x12\x36\n\x06\x66ilter\x18\x05 \x01(\x0b\x32$.google.firestore.v1.ExistenceFilterH\x00\x42\x0f\n\rresponse_type\"\xd6\x03\n\x06Target\x12\x38\n\x05query\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.Target.QueryTargetH\x00\x12@\n\tdocuments\x18\x03 \x01(\x0b\x32+.google.firestore.v1.Target.DocumentsTargetH\x00\x12\x16\n\x0cresume_token\x18\x04 \x01(\x0cH\x01\x12/\n\tread_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x11\n\ttarget_id\x18\x05 \x01(\x05\x12\x0c\n\x04once\x18\x06 \x01(\x08\x12\x33\n\x0e\x65xpected_count\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x1a$\n\x0f\x44ocumentsTarget\x12\x11\n\tdocuments\x18\x02 \x03(\t\x1am\n\x0bQueryTarget\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x42\x0c\n\nquery_typeB\r\n\x0btarget_typeB\r\n\x0bresume_type\"\xaa\x02\n\x0cTargetChange\x12N\n\x12target_change_type\x18\x01 \x01(\x0e\x32\x32.google.firestore.v1.TargetChange.TargetChangeType\x12\x12\n\ntarget_ids\x18\x02 \x03(\x05\x12!\n\x05\x63\x61use\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0cresume_token\x18\x04 \x01(\x0c\x12-\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"N\n\x10TargetChangeType\x12\r\n\tNO_CHANGE\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x12\x0b\n\x07\x43URRENT\x10\x03\x12\t\n\x05RESET\x10\x04\"\xa0\x01\n\x18ListCollectionIdsRequest\x12\x14\n\x06parent\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"L\n\x19ListCollectionIdsResponse\x12\x16\n\x0e\x63ollection_ids\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xca\x01\n\x11\x42\x61tchWriteRequest\x12\x16\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x12*\n\x06writes\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x42\n\x06labels\x18\x03 \x03(\x0b\x32\x32.google.firestore.v1.BatchWriteRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\x12\x42\x61tchWriteResponse\x12\x37\n\rwrite_results\x18\x01 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12\"\n\x06status\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status2\xda\x19\n\tFirestore\x12\x8f\x01\n\x0bGetDocument\x12\'.google.firestore.v1.GetDocumentRequest\x1a\x1d.google.firestore.v1.Document\"8\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/databases/*/documents/*/**}\x12\xf5\x01\n\rListDocuments\x12).google.firestore.v1.ListDocumentsRequest\x1a*.google.firestore.v1.ListDocumentsResponse\"\x8c\x01\x82\xd3\xe4\x93\x02\x85\x01\x12\x42/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}Z?\x12=/v1/{parent=projects/*/databases/*/documents}/{collection_id}\x12\xbf\x01\n\x0eUpdateDocument\x12*.google.firestore.v1.UpdateDocumentRequest\x1a\x1d.google.firestore.v1.Document\"b\xda\x41\x14\x64ocument,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x39/v1/{document.name=projects/*/databases/*/documents/*/**}:\x08\x64ocument\x12\x95\x01\n\x0e\x44\x65leteDocument\x12*.google.firestore.v1.DeleteDocumentRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/databases/*/documents/*/**}\x12\xb9\x01\n\x11\x42\x61tchGetDocuments\x12-.google.firestore.v1.BatchGetDocumentsRequest\x1a..google.firestore.v1.BatchGetDocumentsResponse\"C\x82\xd3\xe4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:batchGet:\x01*0\x01\x12\xc7\x01\n\x10\x42\x65ginTransaction\x12,.google.firestore.v1.BeginTransactionRequest\x1a-.google.firestore.v1.BeginTransactionResponse\"V\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/databases/*}/documents:beginTransaction:\x01*\x12\xa6\x01\n\x06\x43ommit\x12\".google.firestore.v1.CommitRequest\x1a#.google.firestore.v1.CommitResponse\"S\xda\x41\x0f\x64\x61tabase,writes\x82\xd3\xe4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:commit:\x01*\x12\xa4\x01\n\x08Rollback\x12$.google.firestore.v1.RollbackRequest\x1a\x16.google.protobuf.Empty\"Z\xda\x41\x14\x64\x61tabase,transaction\x82\xd3\xe4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:rollback:\x01*\x12\xdf\x01\n\x08RunQuery\x12$.google.firestore.v1.RunQueryRequest\x1a%.google.firestore.v1.RunQueryResponse\"\x83\x01\x82\xd3\xe4\x93\x02}\"6/v1/{parent=projects/*/databases/*/documents}:runQuery:\x01*Z@\";/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery:\x01*0\x01\x12\x97\x02\n\x13RunAggregationQuery\x12/.google.firestore.v1.RunAggregationQueryRequest\x1a\x30.google.firestore.v1.RunAggregationQueryResponse\"\x9a\x01\x82\xd3\xe4\x93\x02\x93\x01\"A/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery:\x01*ZK\"F/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery:\x01*0\x01\x12\xfc\x01\n\x0ePartitionQuery\x12*.google.firestore.v1.PartitionQueryRequest\x1a+.google.firestore.v1.PartitionQueryResponse\"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01\"</v1/{parent=projects/*/databases/*/documents}:partitionQuery:\x01*ZF\"A/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery:\x01*\x12\x94\x01\n\x05Write\x12!.google.firestore.v1.WriteRequest\x1a\".google.firestore.v1.WriteResponse\"@\x82\xd3\xe4\x93\x02:\"5/v1/{database=projects/*/databases/*}/documents:write:\x01*(\x01\x30\x01\x12\x98\x01\n\x06Listen\x12\".google.firestore.v1.ListenRequest\x1a#.google.firestore.v1.ListenResponse\"A\x82\xd3\xe4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:listen:\x01*(\x01\x30\x01\x12\x94\x02\n\x11ListCollectionIds\x12-.google.firestore.v1.ListCollectionIdsRequest\x1a..google.firestore.v1.ListCollectionIdsResponse\"\x9f\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8f\x01\"?/v1/{parent=projects/*/databases/*/documents}:listCollectionIds:\x01*ZI\"D/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds:\x01*\x12\xa4\x01\n\nBatchWrite\x12&.google.firestore.v1.BatchWriteRequest\x1a\'.google.firestore.v1.BatchWriteResponse\"E\x82\xd3\xe4\x93\x02?\":/v1/{database=projects/*/databases/*}/documents:batchWrite:\x01*\x12\xaf\x01\n\x0e\x43reateDocument\x12*.google.firestore.v1.CreateDocumentRequest\x1a\x1d.google.firestore.v1.Document\"R\x82\xd3\xe4\x93\x02L\"@/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}:\x08\x64ocument\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xbf\x01\n\x17\x63om.google.firestore.v1B\x0e\x46irestoreProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3"
|
22
|
+
|
23
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
24
|
+
|
25
|
+
begin
|
26
|
+
pool.add_serialized_file(descriptor_data)
|
27
|
+
rescue TypeError
|
28
|
+
# Compatibility code: will be removed in the next major version.
|
29
|
+
require 'google/protobuf/descriptor_pb'
|
30
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
31
|
+
parsed.clear_dependency
|
32
|
+
serialized = parsed.class.encode(parsed)
|
33
|
+
file = pool.add_serialized_file(serialized)
|
34
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
35
|
+
imports = [
|
36
|
+
["google.firestore.v1.DocumentMask", "google/firestore/v1/common.proto"],
|
37
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
38
|
+
["google.firestore.v1.Document", "google/firestore/v1/document.proto"],
|
39
|
+
["google.firestore.v1.Write", "google/firestore/v1/write.proto"],
|
40
|
+
["google.firestore.v1.StructuredQuery", "google/firestore/v1/query.proto"],
|
41
|
+
["google.firestore.v1.AggregationResult", "google/firestore/v1/aggregation_result.proto"],
|
42
|
+
["google.protobuf.Int32Value", "google/protobuf/wrappers.proto"],
|
43
|
+
["google.rpc.Status", "google/rpc/status.proto"],
|
44
|
+
]
|
45
|
+
imports.each do |type_name, expected_filename|
|
46
|
+
import_file = pool.lookup(type_name).file_descriptor
|
47
|
+
if import_file.name != expected_filename
|
48
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
237
49
|
end
|
238
50
|
end
|
51
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
52
|
+
warn "This will become an error in the next major version."
|
239
53
|
end
|
240
54
|
|
241
55
|
module Google
|
@@ -82,10 +82,10 @@ module Google
|
|
82
82
|
# can be used by RunQuery as starting/end points for the query results.
|
83
83
|
rpc :PartitionQuery, ::Google::Cloud::Firestore::V1::PartitionQueryRequest, ::Google::Cloud::Firestore::V1::PartitionQueryResponse
|
84
84
|
# Streams batches of document updates and deletes, in order. This method is
|
85
|
-
# only available via
|
85
|
+
# only available via gRPC or WebChannel (not REST).
|
86
86
|
rpc :Write, stream(::Google::Cloud::Firestore::V1::WriteRequest), stream(::Google::Cloud::Firestore::V1::WriteResponse)
|
87
|
-
# Listens to changes. This method is only available via
|
88
|
-
# REST).
|
87
|
+
# Listens to changes. This method is only available via gRPC or WebChannel
|
88
|
+
# (not REST).
|
89
89
|
rpc :Listen, stream(::Google::Cloud::Firestore::V1::ListenRequest), stream(::Google::Cloud::Firestore::V1::ListenResponse)
|
90
90
|
# Lists all the collection IDs underneath a document.
|
91
91
|
rpc :ListCollectionIds, ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest, ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/firestore/v1/query.proto
|
3
4
|
|
@@ -7,104 +8,33 @@ require 'google/api/field_behavior_pb'
|
|
7
8
|
require 'google/firestore/v1/document_pb'
|
8
9
|
require 'google/protobuf/wrappers_pb'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
add_message "google.firestore.v1.StructuredQuery.CompositeFilter" do
|
34
|
-
optional :op, :enum, 1, "google.firestore.v1.StructuredQuery.CompositeFilter.Operator"
|
35
|
-
repeated :filters, :message, 2, "google.firestore.v1.StructuredQuery.Filter"
|
36
|
-
end
|
37
|
-
add_enum "google.firestore.v1.StructuredQuery.CompositeFilter.Operator" do
|
38
|
-
value :OPERATOR_UNSPECIFIED, 0
|
39
|
-
value :AND, 1
|
40
|
-
value :OR, 2
|
41
|
-
end
|
42
|
-
add_message "google.firestore.v1.StructuredQuery.FieldFilter" do
|
43
|
-
optional :field, :message, 1, "google.firestore.v1.StructuredQuery.FieldReference"
|
44
|
-
optional :op, :enum, 2, "google.firestore.v1.StructuredQuery.FieldFilter.Operator"
|
45
|
-
optional :value, :message, 3, "google.firestore.v1.Value"
|
46
|
-
end
|
47
|
-
add_enum "google.firestore.v1.StructuredQuery.FieldFilter.Operator" do
|
48
|
-
value :OPERATOR_UNSPECIFIED, 0
|
49
|
-
value :LESS_THAN, 1
|
50
|
-
value :LESS_THAN_OR_EQUAL, 2
|
51
|
-
value :GREATER_THAN, 3
|
52
|
-
value :GREATER_THAN_OR_EQUAL, 4
|
53
|
-
value :EQUAL, 5
|
54
|
-
value :NOT_EQUAL, 6
|
55
|
-
value :ARRAY_CONTAINS, 7
|
56
|
-
value :IN, 8
|
57
|
-
value :ARRAY_CONTAINS_ANY, 9
|
58
|
-
value :NOT_IN, 10
|
59
|
-
end
|
60
|
-
add_message "google.firestore.v1.StructuredQuery.UnaryFilter" do
|
61
|
-
optional :op, :enum, 1, "google.firestore.v1.StructuredQuery.UnaryFilter.Operator"
|
62
|
-
oneof :operand_type do
|
63
|
-
optional :field, :message, 2, "google.firestore.v1.StructuredQuery.FieldReference"
|
64
|
-
end
|
65
|
-
end
|
66
|
-
add_enum "google.firestore.v1.StructuredQuery.UnaryFilter.Operator" do
|
67
|
-
value :OPERATOR_UNSPECIFIED, 0
|
68
|
-
value :IS_NAN, 2
|
69
|
-
value :IS_NULL, 3
|
70
|
-
value :IS_NOT_NAN, 4
|
71
|
-
value :IS_NOT_NULL, 5
|
72
|
-
end
|
73
|
-
add_message "google.firestore.v1.StructuredQuery.Order" do
|
74
|
-
optional :field, :message, 1, "google.firestore.v1.StructuredQuery.FieldReference"
|
75
|
-
optional :direction, :enum, 2, "google.firestore.v1.StructuredQuery.Direction"
|
76
|
-
end
|
77
|
-
add_message "google.firestore.v1.StructuredQuery.FieldReference" do
|
78
|
-
optional :field_path, :string, 2
|
79
|
-
end
|
80
|
-
add_message "google.firestore.v1.StructuredQuery.Projection" do
|
81
|
-
repeated :fields, :message, 2, "google.firestore.v1.StructuredQuery.FieldReference"
|
82
|
-
end
|
83
|
-
add_enum "google.firestore.v1.StructuredQuery.Direction" do
|
84
|
-
value :DIRECTION_UNSPECIFIED, 0
|
85
|
-
value :ASCENDING, 1
|
86
|
-
value :DESCENDING, 2
|
87
|
-
end
|
88
|
-
add_message "google.firestore.v1.StructuredAggregationQuery" do
|
89
|
-
repeated :aggregations, :message, 3, "google.firestore.v1.StructuredAggregationQuery.Aggregation"
|
90
|
-
oneof :query_type do
|
91
|
-
optional :structured_query, :message, 1, "google.firestore.v1.StructuredQuery"
|
92
|
-
end
|
93
|
-
end
|
94
|
-
add_message "google.firestore.v1.StructuredAggregationQuery.Aggregation" do
|
95
|
-
optional :alias, :string, 7
|
96
|
-
oneof :operator do
|
97
|
-
optional :count, :message, 1, "google.firestore.v1.StructuredAggregationQuery.Aggregation.Count"
|
98
|
-
end
|
99
|
-
end
|
100
|
-
add_message "google.firestore.v1.StructuredAggregationQuery.Aggregation.Count" do
|
101
|
-
optional :up_to, :message, 1, "google.protobuf.Int64Value"
|
102
|
-
end
|
103
|
-
add_message "google.firestore.v1.Cursor" do
|
104
|
-
repeated :values, :message, 1, "google.firestore.v1.Value"
|
105
|
-
optional :before, :bool, 2
|
11
|
+
|
12
|
+
descriptor_data = "\n\x1fgoogle/firestore/v1/query.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\"google/firestore/v1/document.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x0f\n\x0fStructuredQuery\x12?\n\x06select\x18\x01 \x01(\x0b\x32/.google.firestore.v1.StructuredQuery.Projection\x12\x45\n\x04\x66rom\x18\x02 \x03(\x0b\x32\x37.google.firestore.v1.StructuredQuery.CollectionSelector\x12:\n\x05where\x18\x03 \x01(\x0b\x32+.google.firestore.v1.StructuredQuery.Filter\x12<\n\x08order_by\x18\x04 \x03(\x0b\x32*.google.firestore.v1.StructuredQuery.Order\x12-\n\x08start_at\x18\x07 \x01(\x0b\x32\x1b.google.firestore.v1.Cursor\x12+\n\x06\x65nd_at\x18\x08 \x01(\x0b\x32\x1b.google.firestore.v1.Cursor\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12*\n\x05limit\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x1a\x44\n\x12\x43ollectionSelector\x12\x15\n\rcollection_id\x18\x02 \x01(\t\x12\x17\n\x0f\x61ll_descendants\x18\x03 \x01(\x08\x1a\xfd\x01\n\x06\x46ilter\x12P\n\x10\x63omposite_filter\x18\x01 \x01(\x0b\x32\x34.google.firestore.v1.StructuredQuery.CompositeFilterH\x00\x12H\n\x0c\x66ield_filter\x18\x02 \x01(\x0b\x32\x30.google.firestore.v1.StructuredQuery.FieldFilterH\x00\x12H\n\x0cunary_filter\x18\x03 \x01(\x0b\x32\x30.google.firestore.v1.StructuredQuery.UnaryFilterH\x00\x42\r\n\x0b\x66ilter_type\x1a\xd1\x01\n\x0f\x43ompositeFilter\x12I\n\x02op\x18\x01 \x01(\x0e\x32=.google.firestore.v1.StructuredQuery.CompositeFilter.Operator\x12<\n\x07\x66ilters\x18\x02 \x03(\x0b\x32+.google.firestore.v1.StructuredQuery.Filter\"5\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x12\x06\n\x02OR\x10\x02\x1a\x98\x03\n\x0b\x46ieldFilter\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\x12\x45\n\x02op\x18\x02 \x01(\x0e\x32\x39.google.firestore.v1.StructuredQuery.FieldFilter.Operator\x12)\n\x05value\x18\x03 \x01(\x0b\x32\x1a.google.firestore.v1.Value\"\xd2\x01\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\r\n\tLESS_THAN\x10\x01\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\t\n\x05\x45QUAL\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x12\x12\n\x0e\x41RRAY_CONTAINS\x10\x07\x12\x06\n\x02IN\x10\x08\x12\x16\n\x12\x41RRAY_CONTAINS_ANY\x10\t\x12\n\n\x06NOT_IN\x10\n\x1a\x8a\x02\n\x0bUnaryFilter\x12\x45\n\x02op\x18\x01 \x01(\x0e\x32\x39.google.firestore.v1.StructuredQuery.UnaryFilter.Operator\x12\x44\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReferenceH\x00\"^\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\n\n\x06IS_NAN\x10\x02\x12\x0b\n\x07IS_NULL\x10\x03\x12\x0e\n\nIS_NOT_NAN\x10\x04\x12\x0f\n\x0bIS_NOT_NULL\x10\x05\x42\x0e\n\x0coperand_type\x1a\x8e\x01\n\x05Order\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\x12\x41\n\tdirection\x18\x02 \x01(\x0e\x32..google.firestore.v1.StructuredQuery.Direction\x1a$\n\x0e\x46ieldReference\x12\x12\n\nfield_path\x18\x02 \x01(\t\x1aQ\n\nProjection\x12\x43\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\"E\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"\xbb\x05\n\x1aStructuredAggregationQuery\x12@\n\x10structured_query\x18\x01 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12W\n\x0c\x61ggregations\x18\x03 \x03(\x0b\x32;.google.firestore.v1.StructuredAggregationQuery.AggregationB\x04\xe2\x41\x01\x01\x1a\xf3\x03\n\x0b\x41ggregation\x12R\n\x05\x63ount\x18\x01 \x01(\x0b\x32\x41.google.firestore.v1.StructuredAggregationQuery.Aggregation.CountH\x00\x12N\n\x03sum\x18\x02 \x01(\x0b\x32?.google.firestore.v1.StructuredAggregationQuery.Aggregation.SumH\x00\x12N\n\x03\x61vg\x18\x03 \x01(\x0b\x32?.google.firestore.v1.StructuredAggregationQuery.Aggregation.AvgH\x00\x12\x13\n\x05\x61lias\x18\x07 \x01(\tB\x04\xe2\x41\x01\x01\x1a\x39\n\x05\x43ount\x12\x30\n\x05up_to\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x04\xe2\x41\x01\x01\x1aI\n\x03Sum\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\x1aI\n\x03\x41vg\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReferenceB\n\n\x08operatorB\x0c\n\nquery_type\"D\n\x06\x43ursor\x12*\n\x06values\x18\x01 \x03(\x0b\x32\x1a.google.firestore.v1.Value\x12\x0e\n\x06\x62\x65\x66ore\x18\x02 \x01(\x08\x42\xc2\x01\n\x17\x63om.google.firestore.v1B\nQueryProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.protobuf.Int32Value", "google/protobuf/wrappers.proto"],
|
28
|
+
["google.firestore.v1.Value", "google/firestore/v1/document.proto"],
|
29
|
+
]
|
30
|
+
imports.each do |type_name, expected_filename|
|
31
|
+
import_file = pool.lookup(type_name).file_descriptor
|
32
|
+
if import_file.name != expected_filename
|
33
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
106
34
|
end
|
107
35
|
end
|
36
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
37
|
+
warn "This will become an error in the next major version."
|
108
38
|
end
|
109
39
|
|
110
40
|
module Google
|
@@ -127,6 +57,8 @@ module Google
|
|
127
57
|
StructuredAggregationQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredAggregationQuery").msgclass
|
128
58
|
StructuredAggregationQuery::Aggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredAggregationQuery.Aggregation").msgclass
|
129
59
|
StructuredAggregationQuery::Aggregation::Count = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredAggregationQuery.Aggregation.Count").msgclass
|
60
|
+
StructuredAggregationQuery::Aggregation::Sum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum").msgclass
|
61
|
+
StructuredAggregationQuery::Aggregation::Avg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg").msgclass
|
130
62
|
Cursor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Cursor").msgclass
|
131
63
|
end
|
132
64
|
end
|
@@ -1,67 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/firestore/v1/write.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
7
|
+
require 'google/firestore/v1/bloom_filter_pb'
|
6
8
|
require 'google/firestore/v1/common_pb'
|
7
9
|
require 'google/firestore/v1/document_pb'
|
8
10
|
require 'google/protobuf/timestamp_pb'
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
36
|
-
end
|
37
|
-
add_enum "google.firestore.v1.DocumentTransform.FieldTransform.ServerValue" do
|
38
|
-
value :SERVER_VALUE_UNSPECIFIED, 0
|
39
|
-
value :REQUEST_TIME, 1
|
40
|
-
end
|
41
|
-
add_message "google.firestore.v1.WriteResult" do
|
42
|
-
optional :update_time, :message, 1, "google.protobuf.Timestamp"
|
43
|
-
repeated :transform_results, :message, 2, "google.firestore.v1.Value"
|
44
|
-
end
|
45
|
-
add_message "google.firestore.v1.DocumentChange" do
|
46
|
-
optional :document, :message, 1, "google.firestore.v1.Document"
|
47
|
-
repeated :target_ids, :int32, 5
|
48
|
-
repeated :removed_target_ids, :int32, 6
|
49
|
-
end
|
50
|
-
add_message "google.firestore.v1.DocumentDelete" do
|
51
|
-
optional :document, :string, 1
|
52
|
-
repeated :removed_target_ids, :int32, 6
|
53
|
-
optional :read_time, :message, 4, "google.protobuf.Timestamp"
|
54
|
-
end
|
55
|
-
add_message "google.firestore.v1.DocumentRemove" do
|
56
|
-
optional :document, :string, 1
|
57
|
-
repeated :removed_target_ids, :int32, 2
|
58
|
-
optional :read_time, :message, 4, "google.protobuf.Timestamp"
|
59
|
-
end
|
60
|
-
add_message "google.firestore.v1.ExistenceFilter" do
|
61
|
-
optional :target_id, :int32, 1
|
62
|
-
optional :count, :int32, 2
|
12
|
+
|
13
|
+
descriptor_data = "\n\x1fgoogle/firestore/v1/write.proto\x12\x13google.firestore.v1\x1a&google/firestore/v1/bloom_filter.proto\x1a google/firestore/v1/common.proto\x1a\"google/firestore/v1/document.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdb\x02\n\x05Write\x12/\n\x06update\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentH\x00\x12\x10\n\x06\x64\x65lete\x18\x02 \x01(\tH\x00\x12;\n\ttransform\x18\x06 \x01(\x0b\x32&.google.firestore.v1.DocumentTransformH\x00\x12\x36\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12P\n\x11update_transforms\x18\x07 \x03(\x0b\x32\x35.google.firestore.v1.DocumentTransform.FieldTransform\x12;\n\x10\x63urrent_document\x18\x04 \x01(\x0b\x32!.google.firestore.v1.PreconditionB\x0b\n\toperation\"\xe5\x04\n\x11\x44ocumentTransform\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12O\n\x10\x66ield_transforms\x18\x02 \x03(\x0b\x32\x35.google.firestore.v1.DocumentTransform.FieldTransform\x1a\xec\x03\n\x0e\x46ieldTransform\x12\x12\n\nfield_path\x18\x01 \x01(\t\x12`\n\x13set_to_server_value\x18\x02 \x01(\x0e\x32\x41.google.firestore.v1.DocumentTransform.FieldTransform.ServerValueH\x00\x12/\n\tincrement\x18\x03 \x01(\x0b\x32\x1a.google.firestore.v1.ValueH\x00\x12-\n\x07maximum\x18\x04 \x01(\x0b\x32\x1a.google.firestore.v1.ValueH\x00\x12-\n\x07minimum\x18\x05 \x01(\x0b\x32\x1a.google.firestore.v1.ValueH\x00\x12\x42\n\x17\x61ppend_missing_elements\x18\x06 \x01(\x0b\x32\x1f.google.firestore.v1.ArrayValueH\x00\x12@\n\x15remove_all_from_array\x18\x07 \x01(\x0b\x32\x1f.google.firestore.v1.ArrayValueH\x00\"=\n\x0bServerValue\x12\x1c\n\x18SERVER_VALUE_UNSPECIFIED\x10\x00\x12\x10\n\x0cREQUEST_TIME\x10\x01\x42\x10\n\x0etransform_type\"u\n\x0bWriteResult\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11transform_results\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.Value\"q\n\x0e\x44ocumentChange\x12/\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.Document\x12\x12\n\ntarget_ids\x18\x05 \x03(\x05\x12\x1a\n\x12removed_target_ids\x18\x06 \x03(\x05\"m\n\x0e\x44ocumentDelete\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x1a\n\x12removed_target_ids\x18\x06 \x03(\x05\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"m\n\x0e\x44ocumentRemove\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x1a\n\x12removed_target_ids\x18\x02 \x03(\x05\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"n\n\x0f\x45xistenceFilter\x12\x11\n\ttarget_id\x18\x01 \x01(\x05\x12\r\n\x05\x63ount\x18\x02 \x01(\x05\x12\x39\n\x0funchanged_names\x18\x03 \x01(\x0b\x32 .google.firestore.v1.BloomFilterB\xc2\x01\n\x17\x63om.google.firestore.v1B\nWriteProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.firestore.v1.Document", "google/firestore/v1/document.proto"],
|
29
|
+
["google.firestore.v1.DocumentMask", "google/firestore/v1/common.proto"],
|
30
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
31
|
+
["google.firestore.v1.BloomFilter", "google/firestore/v1/bloom_filter.proto"],
|
32
|
+
]
|
33
|
+
imports.each do |type_name, expected_filename|
|
34
|
+
import_file = pool.lookup(type_name).file_descriptor
|
35
|
+
if import_file.name != expected_filename
|
36
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
63
37
|
end
|
64
38
|
end
|
39
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
40
|
+
warn "This will become an error in the next major version."
|
65
41
|
end
|
66
42
|
|
67
43
|
module Google
|