google-cloud-firestore 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +8 -0
- data/LICENSE +201 -0
- data/README.md +30 -0
- data/lib/google-cloud-firestore.rb +106 -0
- data/lib/google/cloud/firestore.rb +514 -0
- data/lib/google/cloud/firestore/batch.rb +462 -0
- data/lib/google/cloud/firestore/client.rb +449 -0
- data/lib/google/cloud/firestore/collection_reference.rb +249 -0
- data/lib/google/cloud/firestore/commit_response.rb +145 -0
- data/lib/google/cloud/firestore/convert.rb +561 -0
- data/lib/google/cloud/firestore/credentials.rb +35 -0
- data/lib/google/cloud/firestore/document_reference.rb +468 -0
- data/lib/google/cloud/firestore/document_snapshot.rb +324 -0
- data/lib/google/cloud/firestore/field_path.rb +216 -0
- data/lib/google/cloud/firestore/field_value.rb +113 -0
- data/lib/google/cloud/firestore/generate.rb +35 -0
- data/lib/google/cloud/firestore/query.rb +651 -0
- data/lib/google/cloud/firestore/service.rb +176 -0
- data/lib/google/cloud/firestore/transaction.rb +726 -0
- data/lib/google/cloud/firestore/v1beta1.rb +121 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/common.rb +63 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/document.rb +134 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/firestore.rb +584 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +215 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +167 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +124 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +106 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/wrappers.rb +89 -0
- data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +83 -0
- data/lib/google/cloud/firestore/v1beta1/doc/overview.rb +53 -0
- data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +974 -0
- data/lib/google/cloud/firestore/v1beta1/firestore_client_config.json +100 -0
- data/lib/google/cloud/firestore/version.rb +22 -0
- data/lib/google/firestore/v1beta1/common_pb.rb +44 -0
- data/lib/google/firestore/v1beta1/document_pb.rb +49 -0
- data/lib/google/firestore/v1beta1/firestore_pb.rb +219 -0
- data/lib/google/firestore/v1beta1/firestore_services_pb.rb +87 -0
- data/lib/google/firestore/v1beta1/query_pb.rb +103 -0
- data/lib/google/firestore/v1beta1/write_pb.rb +73 -0
- metadata +251 -0
@@ -0,0 +1,100 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.firestore.v1beta1.Firestore": {
|
4
|
+
"retry_codes": {
|
5
|
+
"idempotent": [
|
6
|
+
"DEADLINE_EXCEEDED",
|
7
|
+
"UNAVAILABLE"
|
8
|
+
],
|
9
|
+
"non_idempotent": []
|
10
|
+
},
|
11
|
+
"retry_params": {
|
12
|
+
"default": {
|
13
|
+
"initial_retry_delay_millis": 100,
|
14
|
+
"retry_delay_multiplier": 1.3,
|
15
|
+
"max_retry_delay_millis": 60000,
|
16
|
+
"initial_rpc_timeout_millis": 20000,
|
17
|
+
"rpc_timeout_multiplier": 1.0,
|
18
|
+
"max_rpc_timeout_millis": 20000,
|
19
|
+
"total_timeout_millis": 600000
|
20
|
+
},
|
21
|
+
"streaming": {
|
22
|
+
"initial_retry_delay_millis": 100,
|
23
|
+
"retry_delay_multiplier": 1.3,
|
24
|
+
"max_retry_delay_millis": 60000,
|
25
|
+
"initial_rpc_timeout_millis": 300000,
|
26
|
+
"rpc_timeout_multiplier": 1.0,
|
27
|
+
"max_rpc_timeout_millis": 300000,
|
28
|
+
"total_timeout_millis": 600000
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"methods": {
|
32
|
+
"GetDocument": {
|
33
|
+
"timeout_millis": 60000,
|
34
|
+
"retry_codes_name": "idempotent",
|
35
|
+
"retry_params_name": "default"
|
36
|
+
},
|
37
|
+
"ListDocuments": {
|
38
|
+
"timeout_millis": 60000,
|
39
|
+
"retry_codes_name": "idempotent",
|
40
|
+
"retry_params_name": "default"
|
41
|
+
},
|
42
|
+
"CreateDocument": {
|
43
|
+
"timeout_millis": 60000,
|
44
|
+
"retry_codes_name": "non_idempotent",
|
45
|
+
"retry_params_name": "default"
|
46
|
+
},
|
47
|
+
"UpdateDocument": {
|
48
|
+
"timeout_millis": 60000,
|
49
|
+
"retry_codes_name": "non_idempotent",
|
50
|
+
"retry_params_name": "default"
|
51
|
+
},
|
52
|
+
"DeleteDocument": {
|
53
|
+
"timeout_millis": 60000,
|
54
|
+
"retry_codes_name": "idempotent",
|
55
|
+
"retry_params_name": "default"
|
56
|
+
},
|
57
|
+
"BatchGetDocuments": {
|
58
|
+
"timeout_millis": 300000,
|
59
|
+
"retry_codes_name": "idempotent",
|
60
|
+
"retry_params_name": "streaming"
|
61
|
+
},
|
62
|
+
"BeginTransaction": {
|
63
|
+
"timeout_millis": 60000,
|
64
|
+
"retry_codes_name": "idempotent",
|
65
|
+
"retry_params_name": "default"
|
66
|
+
},
|
67
|
+
"Commit": {
|
68
|
+
"timeout_millis": 60000,
|
69
|
+
"retry_codes_name": "non_idempotent",
|
70
|
+
"retry_params_name": "default"
|
71
|
+
},
|
72
|
+
"Rollback": {
|
73
|
+
"timeout_millis": 60000,
|
74
|
+
"retry_codes_name": "idempotent",
|
75
|
+
"retry_params_name": "default"
|
76
|
+
},
|
77
|
+
"RunQuery": {
|
78
|
+
"timeout_millis": 60000,
|
79
|
+
"retry_codes_name": "idempotent",
|
80
|
+
"retry_params_name": "default"
|
81
|
+
},
|
82
|
+
"Write": {
|
83
|
+
"timeout_millis": 300000,
|
84
|
+
"retry_codes_name": "non_idempotent",
|
85
|
+
"retry_params_name": "streaming"
|
86
|
+
},
|
87
|
+
"Listen": {
|
88
|
+
"timeout_millis": 300000,
|
89
|
+
"retry_codes_name": "idempotent",
|
90
|
+
"retry_params_name": "streaming"
|
91
|
+
},
|
92
|
+
"ListCollectionIds": {
|
93
|
+
"timeout_millis": 60000,
|
94
|
+
"retry_codes_name": "idempotent",
|
95
|
+
"retry_params_name": "default"
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Copyright 2017 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Firestore
|
19
|
+
VERSION = "0.20.0"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/firestore/v1beta1/common.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_message "google.firestore.v1beta1.DocumentMask" do
|
10
|
+
repeated :field_paths, :string, 1
|
11
|
+
end
|
12
|
+
add_message "google.firestore.v1beta1.Precondition" do
|
13
|
+
oneof :condition_type do
|
14
|
+
optional :exists, :bool, 1
|
15
|
+
optional :update_time, :message, 2, "google.protobuf.Timestamp"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
add_message "google.firestore.v1beta1.TransactionOptions" do
|
19
|
+
oneof :mode do
|
20
|
+
optional :read_only, :message, 2, "google.firestore.v1beta1.TransactionOptions.ReadOnly"
|
21
|
+
optional :read_write, :message, 3, "google.firestore.v1beta1.TransactionOptions.ReadWrite"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
add_message "google.firestore.v1beta1.TransactionOptions.ReadWrite" do
|
25
|
+
optional :retry_transaction, :bytes, 1
|
26
|
+
end
|
27
|
+
add_message "google.firestore.v1beta1.TransactionOptions.ReadOnly" do
|
28
|
+
oneof :consistency_selector do
|
29
|
+
optional :read_time, :message, 2, "google.protobuf.Timestamp"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
module Google
|
35
|
+
module Firestore
|
36
|
+
module V1beta1
|
37
|
+
DocumentMask = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentMask").msgclass
|
38
|
+
Precondition = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Precondition").msgclass
|
39
|
+
TransactionOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TransactionOptions").msgclass
|
40
|
+
TransactionOptions::ReadWrite = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TransactionOptions.ReadWrite").msgclass
|
41
|
+
TransactionOptions::ReadOnly = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TransactionOptions.ReadOnly").msgclass
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/firestore/v1beta1/document.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/protobuf/struct_pb'
|
8
|
+
require 'google/protobuf/timestamp_pb'
|
9
|
+
require 'google/type/latlng_pb'
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_message "google.firestore.v1beta1.Document" do
|
12
|
+
optional :name, :string, 1
|
13
|
+
map :fields, :string, :message, 2, "google.firestore.v1beta1.Value"
|
14
|
+
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
15
|
+
optional :update_time, :message, 4, "google.protobuf.Timestamp"
|
16
|
+
end
|
17
|
+
add_message "google.firestore.v1beta1.Value" do
|
18
|
+
oneof :value_type do
|
19
|
+
optional :null_value, :enum, 11, "google.protobuf.NullValue"
|
20
|
+
optional :boolean_value, :bool, 1
|
21
|
+
optional :integer_value, :int64, 2
|
22
|
+
optional :double_value, :double, 3
|
23
|
+
optional :timestamp_value, :message, 10, "google.protobuf.Timestamp"
|
24
|
+
optional :string_value, :string, 17
|
25
|
+
optional :bytes_value, :bytes, 18
|
26
|
+
optional :reference_value, :string, 5
|
27
|
+
optional :geo_point_value, :message, 8, "google.type.LatLng"
|
28
|
+
optional :array_value, :message, 9, "google.firestore.v1beta1.ArrayValue"
|
29
|
+
optional :map_value, :message, 6, "google.firestore.v1beta1.MapValue"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
add_message "google.firestore.v1beta1.ArrayValue" do
|
33
|
+
repeated :values, :message, 1, "google.firestore.v1beta1.Value"
|
34
|
+
end
|
35
|
+
add_message "google.firestore.v1beta1.MapValue" do
|
36
|
+
map :fields, :string, :message, 1, "google.firestore.v1beta1.Value"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
module Google
|
41
|
+
module Firestore
|
42
|
+
module V1beta1
|
43
|
+
Document = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Document").msgclass
|
44
|
+
Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Value").msgclass
|
45
|
+
ArrayValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ArrayValue").msgclass
|
46
|
+
MapValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.MapValue").msgclass
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,219 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/firestore/v1beta1/firestore.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/firestore/v1beta1/common_pb'
|
8
|
+
require 'google/firestore/v1beta1/document_pb'
|
9
|
+
require 'google/firestore/v1beta1/query_pb'
|
10
|
+
require 'google/firestore/v1beta1/write_pb'
|
11
|
+
require 'google/protobuf/empty_pb'
|
12
|
+
require 'google/protobuf/timestamp_pb'
|
13
|
+
require 'google/rpc/status_pb'
|
14
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
|
+
add_message "google.firestore.v1beta1.GetDocumentRequest" do
|
16
|
+
optional :name, :string, 1
|
17
|
+
optional :mask, :message, 2, "google.firestore.v1beta1.DocumentMask"
|
18
|
+
oneof :consistency_selector do
|
19
|
+
optional :transaction, :bytes, 3
|
20
|
+
optional :read_time, :message, 5, "google.protobuf.Timestamp"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
add_message "google.firestore.v1beta1.ListDocumentsRequest" do
|
24
|
+
optional :parent, :string, 1
|
25
|
+
optional :collection_id, :string, 2
|
26
|
+
optional :page_size, :int32, 3
|
27
|
+
optional :page_token, :string, 4
|
28
|
+
optional :order_by, :string, 6
|
29
|
+
optional :mask, :message, 7, "google.firestore.v1beta1.DocumentMask"
|
30
|
+
optional :show_missing, :bool, 12
|
31
|
+
oneof :consistency_selector do
|
32
|
+
optional :transaction, :bytes, 8
|
33
|
+
optional :read_time, :message, 10, "google.protobuf.Timestamp"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
add_message "google.firestore.v1beta1.ListDocumentsResponse" do
|
37
|
+
repeated :documents, :message, 1, "google.firestore.v1beta1.Document"
|
38
|
+
optional :next_page_token, :string, 2
|
39
|
+
end
|
40
|
+
add_message "google.firestore.v1beta1.CreateDocumentRequest" do
|
41
|
+
optional :parent, :string, 1
|
42
|
+
optional :collection_id, :string, 2
|
43
|
+
optional :document_id, :string, 3
|
44
|
+
optional :document, :message, 4, "google.firestore.v1beta1.Document"
|
45
|
+
optional :mask, :message, 5, "google.firestore.v1beta1.DocumentMask"
|
46
|
+
end
|
47
|
+
add_message "google.firestore.v1beta1.UpdateDocumentRequest" do
|
48
|
+
optional :document, :message, 1, "google.firestore.v1beta1.Document"
|
49
|
+
optional :update_mask, :message, 2, "google.firestore.v1beta1.DocumentMask"
|
50
|
+
optional :mask, :message, 3, "google.firestore.v1beta1.DocumentMask"
|
51
|
+
optional :current_document, :message, 4, "google.firestore.v1beta1.Precondition"
|
52
|
+
end
|
53
|
+
add_message "google.firestore.v1beta1.DeleteDocumentRequest" do
|
54
|
+
optional :name, :string, 1
|
55
|
+
optional :current_document, :message, 2, "google.firestore.v1beta1.Precondition"
|
56
|
+
end
|
57
|
+
add_message "google.firestore.v1beta1.BatchGetDocumentsRequest" do
|
58
|
+
optional :database, :string, 1
|
59
|
+
repeated :documents, :string, 2
|
60
|
+
optional :mask, :message, 3, "google.firestore.v1beta1.DocumentMask"
|
61
|
+
oneof :consistency_selector do
|
62
|
+
optional :transaction, :bytes, 4
|
63
|
+
optional :new_transaction, :message, 5, "google.firestore.v1beta1.TransactionOptions"
|
64
|
+
optional :read_time, :message, 7, "google.protobuf.Timestamp"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
add_message "google.firestore.v1beta1.BatchGetDocumentsResponse" do
|
68
|
+
optional :transaction, :bytes, 3
|
69
|
+
optional :read_time, :message, 4, "google.protobuf.Timestamp"
|
70
|
+
oneof :result do
|
71
|
+
optional :found, :message, 1, "google.firestore.v1beta1.Document"
|
72
|
+
optional :missing, :string, 2
|
73
|
+
end
|
74
|
+
end
|
75
|
+
add_message "google.firestore.v1beta1.BeginTransactionRequest" do
|
76
|
+
optional :database, :string, 1
|
77
|
+
optional :options, :message, 2, "google.firestore.v1beta1.TransactionOptions"
|
78
|
+
end
|
79
|
+
add_message "google.firestore.v1beta1.BeginTransactionResponse" do
|
80
|
+
optional :transaction, :bytes, 1
|
81
|
+
end
|
82
|
+
add_message "google.firestore.v1beta1.CommitRequest" do
|
83
|
+
optional :database, :string, 1
|
84
|
+
repeated :writes, :message, 2, "google.firestore.v1beta1.Write"
|
85
|
+
optional :transaction, :bytes, 3
|
86
|
+
end
|
87
|
+
add_message "google.firestore.v1beta1.CommitResponse" do
|
88
|
+
repeated :write_results, :message, 1, "google.firestore.v1beta1.WriteResult"
|
89
|
+
optional :commit_time, :message, 2, "google.protobuf.Timestamp"
|
90
|
+
end
|
91
|
+
add_message "google.firestore.v1beta1.RollbackRequest" do
|
92
|
+
optional :database, :string, 1
|
93
|
+
optional :transaction, :bytes, 2
|
94
|
+
end
|
95
|
+
add_message "google.firestore.v1beta1.RunQueryRequest" do
|
96
|
+
optional :parent, :string, 1
|
97
|
+
oneof :query_type do
|
98
|
+
optional :structured_query, :message, 2, "google.firestore.v1beta1.StructuredQuery"
|
99
|
+
end
|
100
|
+
oneof :consistency_selector do
|
101
|
+
optional :transaction, :bytes, 5
|
102
|
+
optional :new_transaction, :message, 6, "google.firestore.v1beta1.TransactionOptions"
|
103
|
+
optional :read_time, :message, 7, "google.protobuf.Timestamp"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
add_message "google.firestore.v1beta1.RunQueryResponse" do
|
107
|
+
optional :transaction, :bytes, 2
|
108
|
+
optional :document, :message, 1, "google.firestore.v1beta1.Document"
|
109
|
+
optional :read_time, :message, 3, "google.protobuf.Timestamp"
|
110
|
+
optional :skipped_results, :int32, 4
|
111
|
+
end
|
112
|
+
add_message "google.firestore.v1beta1.WriteRequest" do
|
113
|
+
optional :database, :string, 1
|
114
|
+
optional :stream_id, :string, 2
|
115
|
+
repeated :writes, :message, 3, "google.firestore.v1beta1.Write"
|
116
|
+
optional :stream_token, :bytes, 4
|
117
|
+
map :labels, :string, :string, 5
|
118
|
+
end
|
119
|
+
add_message "google.firestore.v1beta1.WriteResponse" do
|
120
|
+
optional :stream_id, :string, 1
|
121
|
+
optional :stream_token, :bytes, 2
|
122
|
+
repeated :write_results, :message, 3, "google.firestore.v1beta1.WriteResult"
|
123
|
+
optional :commit_time, :message, 4, "google.protobuf.Timestamp"
|
124
|
+
end
|
125
|
+
add_message "google.firestore.v1beta1.ListenRequest" do
|
126
|
+
optional :database, :string, 1
|
127
|
+
map :labels, :string, :string, 4
|
128
|
+
oneof :target_change do
|
129
|
+
optional :add_target, :message, 2, "google.firestore.v1beta1.Target"
|
130
|
+
optional :remove_target, :int32, 3
|
131
|
+
end
|
132
|
+
end
|
133
|
+
add_message "google.firestore.v1beta1.ListenResponse" do
|
134
|
+
oneof :response_type do
|
135
|
+
optional :target_change, :message, 2, "google.firestore.v1beta1.TargetChange"
|
136
|
+
optional :document_change, :message, 3, "google.firestore.v1beta1.DocumentChange"
|
137
|
+
optional :document_delete, :message, 4, "google.firestore.v1beta1.DocumentDelete"
|
138
|
+
optional :document_remove, :message, 6, "google.firestore.v1beta1.DocumentRemove"
|
139
|
+
optional :filter, :message, 5, "google.firestore.v1beta1.ExistenceFilter"
|
140
|
+
end
|
141
|
+
end
|
142
|
+
add_message "google.firestore.v1beta1.Target" do
|
143
|
+
optional :target_id, :int32, 5
|
144
|
+
optional :once, :bool, 6
|
145
|
+
oneof :target_type do
|
146
|
+
optional :query, :message, 2, "google.firestore.v1beta1.Target.QueryTarget"
|
147
|
+
optional :documents, :message, 3, "google.firestore.v1beta1.Target.DocumentsTarget"
|
148
|
+
end
|
149
|
+
oneof :resume_type do
|
150
|
+
optional :resume_token, :bytes, 4
|
151
|
+
optional :read_time, :message, 11, "google.protobuf.Timestamp"
|
152
|
+
end
|
153
|
+
end
|
154
|
+
add_message "google.firestore.v1beta1.Target.DocumentsTarget" do
|
155
|
+
repeated :documents, :string, 2
|
156
|
+
end
|
157
|
+
add_message "google.firestore.v1beta1.Target.QueryTarget" do
|
158
|
+
optional :parent, :string, 1
|
159
|
+
oneof :query_type do
|
160
|
+
optional :structured_query, :message, 2, "google.firestore.v1beta1.StructuredQuery"
|
161
|
+
end
|
162
|
+
end
|
163
|
+
add_message "google.firestore.v1beta1.TargetChange" do
|
164
|
+
optional :target_change_type, :enum, 1, "google.firestore.v1beta1.TargetChange.TargetChangeType"
|
165
|
+
repeated :target_ids, :int32, 2
|
166
|
+
optional :cause, :message, 3, "google.rpc.Status"
|
167
|
+
optional :resume_token, :bytes, 4
|
168
|
+
optional :read_time, :message, 6, "google.protobuf.Timestamp"
|
169
|
+
end
|
170
|
+
add_enum "google.firestore.v1beta1.TargetChange.TargetChangeType" do
|
171
|
+
value :NO_CHANGE, 0
|
172
|
+
value :ADD, 1
|
173
|
+
value :REMOVE, 2
|
174
|
+
value :CURRENT, 3
|
175
|
+
value :RESET, 4
|
176
|
+
end
|
177
|
+
add_message "google.firestore.v1beta1.ListCollectionIdsRequest" do
|
178
|
+
optional :parent, :string, 1
|
179
|
+
optional :page_size, :int32, 2
|
180
|
+
optional :page_token, :string, 3
|
181
|
+
end
|
182
|
+
add_message "google.firestore.v1beta1.ListCollectionIdsResponse" do
|
183
|
+
repeated :collection_ids, :string, 1
|
184
|
+
optional :next_page_token, :string, 2
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
module Google
|
189
|
+
module Firestore
|
190
|
+
module V1beta1
|
191
|
+
GetDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.GetDocumentRequest").msgclass
|
192
|
+
ListDocumentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListDocumentsRequest").msgclass
|
193
|
+
ListDocumentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListDocumentsResponse").msgclass
|
194
|
+
CreateDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.CreateDocumentRequest").msgclass
|
195
|
+
UpdateDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.UpdateDocumentRequest").msgclass
|
196
|
+
DeleteDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DeleteDocumentRequest").msgclass
|
197
|
+
BatchGetDocumentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BatchGetDocumentsRequest").msgclass
|
198
|
+
BatchGetDocumentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BatchGetDocumentsResponse").msgclass
|
199
|
+
BeginTransactionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BeginTransactionRequest").msgclass
|
200
|
+
BeginTransactionResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BeginTransactionResponse").msgclass
|
201
|
+
CommitRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.CommitRequest").msgclass
|
202
|
+
CommitResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.CommitResponse").msgclass
|
203
|
+
RollbackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.RollbackRequest").msgclass
|
204
|
+
RunQueryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.RunQueryRequest").msgclass
|
205
|
+
RunQueryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.RunQueryResponse").msgclass
|
206
|
+
WriteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.WriteRequest").msgclass
|
207
|
+
WriteResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.WriteResponse").msgclass
|
208
|
+
ListenRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListenRequest").msgclass
|
209
|
+
ListenResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListenResponse").msgclass
|
210
|
+
Target = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Target").msgclass
|
211
|
+
Target::DocumentsTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Target.DocumentsTarget").msgclass
|
212
|
+
Target::QueryTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Target.QueryTarget").msgclass
|
213
|
+
TargetChange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TargetChange").msgclass
|
214
|
+
TargetChange::TargetChangeType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TargetChange.TargetChangeType").enummodule
|
215
|
+
ListCollectionIdsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListCollectionIdsRequest").msgclass
|
216
|
+
ListCollectionIdsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListCollectionIdsResponse").msgclass
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/firestore/v1beta1/firestore.proto for package 'google.firestore.v1beta1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2017 Google Inc.
|
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
|
+
# https://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
|
+
require 'grpc'
|
20
|
+
require 'google/firestore/v1beta1/firestore_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Firestore
|
24
|
+
module V1beta1
|
25
|
+
module Firestore
|
26
|
+
# Specification of the Firestore API.
|
27
|
+
#
|
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.v1beta1.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
|