google-cloud-firestore 1.4.2 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +51 -0
  4. data/TROUBLESHOOTING.md +2 -8
  5. data/lib/google-cloud-firestore.rb +15 -21
  6. data/lib/google/cloud/firestore.rb +12 -23
  7. data/lib/google/cloud/firestore/client.rb +12 -14
  8. data/lib/google/cloud/firestore/collection_reference.rb +1 -0
  9. data/lib/google/cloud/firestore/collection_reference_list.rb +137 -0
  10. data/lib/google/cloud/firestore/convert.rb +39 -39
  11. data/lib/google/cloud/firestore/credentials.rb +2 -2
  12. data/lib/google/cloud/firestore/document_reference.rb +8 -8
  13. data/lib/google/cloud/firestore/document_reference/list.rb +2 -2
  14. data/lib/google/cloud/firestore/document_snapshot.rb +4 -4
  15. data/lib/google/cloud/firestore/query.rb +114 -22
  16. data/lib/google/cloud/firestore/service.rb +63 -104
  17. data/lib/google/cloud/firestore/transaction.rb +2 -2
  18. data/lib/google/cloud/firestore/version.rb +1 -1
  19. data/lib/google/cloud/firestore/watch/inventory.rb +2 -0
  20. data/lib/google/cloud/firestore/watch/listener.rb +9 -9
  21. data/lib/google/cloud/firestore/watch/order.rb +1 -1
  22. metadata +9 -107
  23. data/lib/google/cloud/firestore/admin.rb +0 -144
  24. data/lib/google/cloud/firestore/admin/v1.rb +0 -151
  25. data/lib/google/cloud/firestore/admin/v1/credentials.rb +0 -44
  26. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/field.rb +0 -86
  27. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/firestore_admin.rb +0 -161
  28. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/index.rb +0 -142
  29. data/lib/google/cloud/firestore/admin/v1/doc/google/longrunning/operations.rb +0 -51
  30. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/any.rb +0 -131
  31. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/empty.rb +0 -29
  32. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/field_mask.rb +0 -222
  33. data/lib/google/cloud/firestore/admin/v1/doc/google/rpc/status.rb +0 -39
  34. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client.rb +0 -902
  35. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client_config.json +0 -71
  36. data/lib/google/cloud/firestore/v1.rb +0 -152
  37. data/lib/google/cloud/firestore/v1/credentials.rb +0 -42
  38. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/common.rb +0 -64
  39. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/document.rb +0 -136
  40. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb +0 -566
  41. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/query.rb +0 -227
  42. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/write.rb +0 -241
  43. data/lib/google/cloud/firestore/v1/doc/google/protobuf/any.rb +0 -131
  44. data/lib/google/cloud/firestore/v1/doc/google/protobuf/empty.rb +0 -29
  45. data/lib/google/cloud/firestore/v1/doc/google/protobuf/timestamp.rb +0 -113
  46. data/lib/google/cloud/firestore/v1/doc/google/protobuf/wrappers.rb +0 -26
  47. data/lib/google/cloud/firestore/v1/doc/google/rpc/status.rb +0 -39
  48. data/lib/google/cloud/firestore/v1/firestore_client.rb +0 -1011
  49. data/lib/google/cloud/firestore/v1/firestore_client_config.json +0 -100
  50. data/lib/google/cloud/firestore/v1beta1.rb +0 -162
  51. data/lib/google/cloud/firestore/v1beta1/credentials.rb +0 -42
  52. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/common.rb +0 -64
  53. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/document.rb +0 -136
  54. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/firestore.rb +0 -564
  55. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +0 -227
  56. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +0 -237
  57. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +0 -131
  58. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/empty.rb +0 -29
  59. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
  60. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/wrappers.rb +0 -26
  61. data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +0 -39
  62. data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +0 -1021
  63. data/lib/google/cloud/firestore/v1beta1/firestore_client_config.json +0 -100
  64. data/lib/google/firestore/admin/v1/field_pb.rb +0 -32
  65. data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +0 -84
  66. data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +0 -94
  67. data/lib/google/firestore/admin/v1/index_pb.rb +0 -58
  68. data/lib/google/firestore/admin/v1/location_pb.rb +0 -22
  69. data/lib/google/firestore/admin/v1/operation_pb.rb +0 -90
  70. data/lib/google/firestore/v1/common_pb.rb +0 -45
  71. data/lib/google/firestore/v1/document_pb.rb +0 -50
  72. data/lib/google/firestore/v1/firestore_pb.rb +0 -222
  73. data/lib/google/firestore/v1/firestore_services_pb.rb +0 -80
  74. data/lib/google/firestore/v1/query_pb.rb +0 -107
  75. data/lib/google/firestore/v1/write_pb.rb +0 -80
  76. data/lib/google/firestore/v1beta1/common_pb.rb +0 -45
  77. data/lib/google/firestore/v1beta1/document_pb.rb +0 -50
  78. data/lib/google/firestore/v1beta1/firestore_pb.rb +0 -222
  79. data/lib/google/firestore/v1beta1/firestore_services_pb.rb +0 -89
  80. data/lib/google/firestore/v1beta1/query_pb.rb +0 -107
  81. data/lib/google/firestore/v1beta1/write_pb.rb +0 -79
@@ -1,80 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/firestore/v1/write.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/firestore/v1/common_pb'
8
- require 'google/firestore/v1/document_pb'
9
- require 'google/protobuf/timestamp_pb'
10
- require 'google/api/annotations_pb'
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_message "google.firestore.v1.Write" do
13
- optional :update_mask, :message, 3, "google.firestore.v1.DocumentMask"
14
- repeated :update_transforms, :message, 7, "google.firestore.v1.DocumentTransform.FieldTransform"
15
- optional :current_document, :message, 4, "google.firestore.v1.Precondition"
16
- oneof :operation do
17
- optional :update, :message, 1, "google.firestore.v1.Document"
18
- optional :delete, :string, 2
19
- optional :transform, :message, 6, "google.firestore.v1.DocumentTransform"
20
- end
21
- end
22
- add_message "google.firestore.v1.DocumentTransform" do
23
- optional :document, :string, 1
24
- repeated :field_transforms, :message, 2, "google.firestore.v1.DocumentTransform.FieldTransform"
25
- end
26
- add_message "google.firestore.v1.DocumentTransform.FieldTransform" do
27
- optional :field_path, :string, 1
28
- oneof :transform_type do
29
- optional :set_to_server_value, :enum, 2, "google.firestore.v1.DocumentTransform.FieldTransform.ServerValue"
30
- optional :increment, :message, 3, "google.firestore.v1.Value"
31
- optional :maximum, :message, 4, "google.firestore.v1.Value"
32
- optional :minimum, :message, 5, "google.firestore.v1.Value"
33
- optional :append_missing_elements, :message, 6, "google.firestore.v1.ArrayValue"
34
- optional :remove_all_from_array, :message, 7, "google.firestore.v1.ArrayValue"
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
63
- end
64
- end
65
-
66
- module Google
67
- module Firestore
68
- module V1
69
- Write = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Write").msgclass
70
- DocumentTransform = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentTransform").msgclass
71
- DocumentTransform::FieldTransform = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentTransform.FieldTransform").msgclass
72
- DocumentTransform::FieldTransform::ServerValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentTransform.FieldTransform.ServerValue").enummodule
73
- WriteResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.WriteResult").msgclass
74
- DocumentChange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentChange").msgclass
75
- DocumentDelete = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentDelete").msgclass
76
- DocumentRemove = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentRemove").msgclass
77
- ExistenceFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ExistenceFilter").msgclass
78
- end
79
- end
80
- end
@@ -1,45 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/firestore/v1beta1/common.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/protobuf/timestamp_pb'
8
- require 'google/api/annotations_pb'
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_message "google.firestore.v1beta1.DocumentMask" do
11
- repeated :field_paths, :string, 1
12
- end
13
- add_message "google.firestore.v1beta1.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.v1beta1.TransactionOptions" do
20
- oneof :mode do
21
- optional :read_only, :message, 2, "google.firestore.v1beta1.TransactionOptions.ReadOnly"
22
- optional :read_write, :message, 3, "google.firestore.v1beta1.TransactionOptions.ReadWrite"
23
- end
24
- end
25
- add_message "google.firestore.v1beta1.TransactionOptions.ReadWrite" do
26
- optional :retry_transaction, :bytes, 1
27
- end
28
- add_message "google.firestore.v1beta1.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 V1beta1
38
- DocumentMask = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentMask").msgclass
39
- Precondition = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Precondition").msgclass
40
- TransactionOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TransactionOptions").msgclass
41
- TransactionOptions::ReadWrite = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TransactionOptions.ReadWrite").msgclass
42
- TransactionOptions::ReadOnly = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TransactionOptions.ReadOnly").msgclass
43
- end
44
- end
45
- end
@@ -1,50 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/firestore/v1beta1/document.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/protobuf/struct_pb'
8
- require 'google/protobuf/timestamp_pb'
9
- require 'google/type/latlng_pb'
10
- require 'google/api/annotations_pb'
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_message "google.firestore.v1beta1.Document" do
13
- optional :name, :string, 1
14
- map :fields, :string, :message, 2, "google.firestore.v1beta1.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.v1beta1.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.v1beta1.ArrayValue"
30
- optional :map_value, :message, 6, "google.firestore.v1beta1.MapValue"
31
- end
32
- end
33
- add_message "google.firestore.v1beta1.ArrayValue" do
34
- repeated :values, :message, 1, "google.firestore.v1beta1.Value"
35
- end
36
- add_message "google.firestore.v1beta1.MapValue" do
37
- map :fields, :string, :message, 1, "google.firestore.v1beta1.Value"
38
- end
39
- end
40
-
41
- module Google
42
- module Firestore
43
- module V1beta1
44
- Document = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Document").msgclass
45
- Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Value").msgclass
46
- ArrayValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ArrayValue").msgclass
47
- MapValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.MapValue").msgclass
48
- end
49
- end
50
- end
@@ -1,222 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/firestore/v1beta1/firestore.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/firestore/v1beta1/common_pb'
11
- require 'google/firestore/v1beta1/document_pb'
12
- require 'google/firestore/v1beta1/query_pb'
13
- require 'google/firestore/v1beta1/write_pb'
14
- require 'google/protobuf/empty_pb'
15
- require 'google/protobuf/timestamp_pb'
16
- require 'google/rpc/status_pb'
17
- Google::Protobuf::DescriptorPool.generated_pool.build do
18
- add_message "google.firestore.v1beta1.GetDocumentRequest" do
19
- optional :name, :string, 1
20
- optional :mask, :message, 2, "google.firestore.v1beta1.DocumentMask"
21
- oneof :consistency_selector do
22
- optional :transaction, :bytes, 3
23
- optional :read_time, :message, 5, "google.protobuf.Timestamp"
24
- end
25
- end
26
- add_message "google.firestore.v1beta1.ListDocumentsRequest" do
27
- optional :parent, :string, 1
28
- optional :collection_id, :string, 2
29
- optional :page_size, :int32, 3
30
- optional :page_token, :string, 4
31
- optional :order_by, :string, 6
32
- optional :mask, :message, 7, "google.firestore.v1beta1.DocumentMask"
33
- optional :show_missing, :bool, 12
34
- oneof :consistency_selector do
35
- optional :transaction, :bytes, 8
36
- optional :read_time, :message, 10, "google.protobuf.Timestamp"
37
- end
38
- end
39
- add_message "google.firestore.v1beta1.ListDocumentsResponse" do
40
- repeated :documents, :message, 1, "google.firestore.v1beta1.Document"
41
- optional :next_page_token, :string, 2
42
- end
43
- add_message "google.firestore.v1beta1.CreateDocumentRequest" do
44
- optional :parent, :string, 1
45
- optional :collection_id, :string, 2
46
- optional :document_id, :string, 3
47
- optional :document, :message, 4, "google.firestore.v1beta1.Document"
48
- optional :mask, :message, 5, "google.firestore.v1beta1.DocumentMask"
49
- end
50
- add_message "google.firestore.v1beta1.UpdateDocumentRequest" do
51
- optional :document, :message, 1, "google.firestore.v1beta1.Document"
52
- optional :update_mask, :message, 2, "google.firestore.v1beta1.DocumentMask"
53
- optional :mask, :message, 3, "google.firestore.v1beta1.DocumentMask"
54
- optional :current_document, :message, 4, "google.firestore.v1beta1.Precondition"
55
- end
56
- add_message "google.firestore.v1beta1.DeleteDocumentRequest" do
57
- optional :name, :string, 1
58
- optional :current_document, :message, 2, "google.firestore.v1beta1.Precondition"
59
- end
60
- add_message "google.firestore.v1beta1.BatchGetDocumentsRequest" do
61
- optional :database, :string, 1
62
- repeated :documents, :string, 2
63
- optional :mask, :message, 3, "google.firestore.v1beta1.DocumentMask"
64
- oneof :consistency_selector do
65
- optional :transaction, :bytes, 4
66
- optional :new_transaction, :message, 5, "google.firestore.v1beta1.TransactionOptions"
67
- optional :read_time, :message, 7, "google.protobuf.Timestamp"
68
- end
69
- end
70
- add_message "google.firestore.v1beta1.BatchGetDocumentsResponse" do
71
- optional :transaction, :bytes, 3
72
- optional :read_time, :message, 4, "google.protobuf.Timestamp"
73
- oneof :result do
74
- optional :found, :message, 1, "google.firestore.v1beta1.Document"
75
- optional :missing, :string, 2
76
- end
77
- end
78
- add_message "google.firestore.v1beta1.BeginTransactionRequest" do
79
- optional :database, :string, 1
80
- optional :options, :message, 2, "google.firestore.v1beta1.TransactionOptions"
81
- end
82
- add_message "google.firestore.v1beta1.BeginTransactionResponse" do
83
- optional :transaction, :bytes, 1
84
- end
85
- add_message "google.firestore.v1beta1.CommitRequest" do
86
- optional :database, :string, 1
87
- repeated :writes, :message, 2, "google.firestore.v1beta1.Write"
88
- optional :transaction, :bytes, 3
89
- end
90
- add_message "google.firestore.v1beta1.CommitResponse" do
91
- repeated :write_results, :message, 1, "google.firestore.v1beta1.WriteResult"
92
- optional :commit_time, :message, 2, "google.protobuf.Timestamp"
93
- end
94
- add_message "google.firestore.v1beta1.RollbackRequest" do
95
- optional :database, :string, 1
96
- optional :transaction, :bytes, 2
97
- end
98
- add_message "google.firestore.v1beta1.RunQueryRequest" do
99
- optional :parent, :string, 1
100
- oneof :query_type do
101
- optional :structured_query, :message, 2, "google.firestore.v1beta1.StructuredQuery"
102
- end
103
- oneof :consistency_selector do
104
- optional :transaction, :bytes, 5
105
- optional :new_transaction, :message, 6, "google.firestore.v1beta1.TransactionOptions"
106
- optional :read_time, :message, 7, "google.protobuf.Timestamp"
107
- end
108
- end
109
- add_message "google.firestore.v1beta1.RunQueryResponse" do
110
- optional :transaction, :bytes, 2
111
- optional :document, :message, 1, "google.firestore.v1beta1.Document"
112
- optional :read_time, :message, 3, "google.protobuf.Timestamp"
113
- optional :skipped_results, :int32, 4
114
- end
115
- add_message "google.firestore.v1beta1.WriteRequest" do
116
- optional :database, :string, 1
117
- optional :stream_id, :string, 2
118
- repeated :writes, :message, 3, "google.firestore.v1beta1.Write"
119
- optional :stream_token, :bytes, 4
120
- map :labels, :string, :string, 5
121
- end
122
- add_message "google.firestore.v1beta1.WriteResponse" do
123
- optional :stream_id, :string, 1
124
- optional :stream_token, :bytes, 2
125
- repeated :write_results, :message, 3, "google.firestore.v1beta1.WriteResult"
126
- optional :commit_time, :message, 4, "google.protobuf.Timestamp"
127
- end
128
- add_message "google.firestore.v1beta1.ListenRequest" do
129
- optional :database, :string, 1
130
- map :labels, :string, :string, 4
131
- oneof :target_change do
132
- optional :add_target, :message, 2, "google.firestore.v1beta1.Target"
133
- optional :remove_target, :int32, 3
134
- end
135
- end
136
- add_message "google.firestore.v1beta1.ListenResponse" do
137
- oneof :response_type do
138
- optional :target_change, :message, 2, "google.firestore.v1beta1.TargetChange"
139
- optional :document_change, :message, 3, "google.firestore.v1beta1.DocumentChange"
140
- optional :document_delete, :message, 4, "google.firestore.v1beta1.DocumentDelete"
141
- optional :document_remove, :message, 6, "google.firestore.v1beta1.DocumentRemove"
142
- optional :filter, :message, 5, "google.firestore.v1beta1.ExistenceFilter"
143
- end
144
- end
145
- add_message "google.firestore.v1beta1.Target" do
146
- optional :target_id, :int32, 5
147
- optional :once, :bool, 6
148
- oneof :target_type do
149
- optional :query, :message, 2, "google.firestore.v1beta1.Target.QueryTarget"
150
- optional :documents, :message, 3, "google.firestore.v1beta1.Target.DocumentsTarget"
151
- end
152
- oneof :resume_type do
153
- optional :resume_token, :bytes, 4
154
- optional :read_time, :message, 11, "google.protobuf.Timestamp"
155
- end
156
- end
157
- add_message "google.firestore.v1beta1.Target.DocumentsTarget" do
158
- repeated :documents, :string, 2
159
- end
160
- add_message "google.firestore.v1beta1.Target.QueryTarget" do
161
- optional :parent, :string, 1
162
- oneof :query_type do
163
- optional :structured_query, :message, 2, "google.firestore.v1beta1.StructuredQuery"
164
- end
165
- end
166
- add_message "google.firestore.v1beta1.TargetChange" do
167
- optional :target_change_type, :enum, 1, "google.firestore.v1beta1.TargetChange.TargetChangeType"
168
- repeated :target_ids, :int32, 2
169
- optional :cause, :message, 3, "google.rpc.Status"
170
- optional :resume_token, :bytes, 4
171
- optional :read_time, :message, 6, "google.protobuf.Timestamp"
172
- end
173
- add_enum "google.firestore.v1beta1.TargetChange.TargetChangeType" do
174
- value :NO_CHANGE, 0
175
- value :ADD, 1
176
- value :REMOVE, 2
177
- value :CURRENT, 3
178
- value :RESET, 4
179
- end
180
- add_message "google.firestore.v1beta1.ListCollectionIdsRequest" do
181
- optional :parent, :string, 1
182
- optional :page_size, :int32, 2
183
- optional :page_token, :string, 3
184
- end
185
- add_message "google.firestore.v1beta1.ListCollectionIdsResponse" do
186
- repeated :collection_ids, :string, 1
187
- optional :next_page_token, :string, 2
188
- end
189
- end
190
-
191
- module Google
192
- module Firestore
193
- module V1beta1
194
- GetDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.GetDocumentRequest").msgclass
195
- ListDocumentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListDocumentsRequest").msgclass
196
- ListDocumentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListDocumentsResponse").msgclass
197
- CreateDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.CreateDocumentRequest").msgclass
198
- UpdateDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.UpdateDocumentRequest").msgclass
199
- DeleteDocumentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DeleteDocumentRequest").msgclass
200
- BatchGetDocumentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BatchGetDocumentsRequest").msgclass
201
- BatchGetDocumentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BatchGetDocumentsResponse").msgclass
202
- BeginTransactionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BeginTransactionRequest").msgclass
203
- BeginTransactionResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.BeginTransactionResponse").msgclass
204
- CommitRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.CommitRequest").msgclass
205
- CommitResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.CommitResponse").msgclass
206
- RollbackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.RollbackRequest").msgclass
207
- RunQueryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.RunQueryRequest").msgclass
208
- RunQueryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.RunQueryResponse").msgclass
209
- WriteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.WriteRequest").msgclass
210
- WriteResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.WriteResponse").msgclass
211
- ListenRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListenRequest").msgclass
212
- ListenResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListenResponse").msgclass
213
- Target = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Target").msgclass
214
- Target::DocumentsTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Target.DocumentsTarget").msgclass
215
- Target::QueryTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Target.QueryTarget").msgclass
216
- TargetChange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TargetChange").msgclass
217
- TargetChange::TargetChangeType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.TargetChange.TargetChangeType").enummodule
218
- ListCollectionIdsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListCollectionIdsRequest").msgclass
219
- ListCollectionIdsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ListCollectionIdsResponse").msgclass
220
- end
221
- end
222
- end
@@ -1,89 +0,0 @@
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 2019 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/v1beta1/firestore_pb'
23
-
24
- module Google
25
- module Firestore
26
- module V1beta1
27
- module Firestore
28
- # Specification of the Firestore API.
29
- #
30
- # The Cloud Firestore service.
31
- #
32
- # This service exposes several types of comparable timestamps:
33
- #
34
- # * `create_time` - The time at which a document was created. Changes only
35
- # when a document is deleted, then re-created. Increases in a strict
36
- # monotonic fashion.
37
- # * `update_time` - The time at which a document was last updated. Changes
38
- # every time a document is modified. Does not change when a write results
39
- # in no modifications. Increases in a strict monotonic fashion.
40
- # * `read_time` - The time at which a particular state was observed. Used
41
- # to denote a consistent snapshot of the database or the time at which a
42
- # Document was observed to not exist.
43
- # * `commit_time` - The time at which the writes in a transaction were
44
- # committed. Any read with an equal or greater `read_time` is guaranteed
45
- # to see the effects of the transaction.
46
- class Service
47
-
48
- include GRPC::GenericService
49
-
50
- self.marshal_class_method = :encode
51
- self.unmarshal_class_method = :decode
52
- self.service_name = 'google.firestore.v1beta1.Firestore'
53
-
54
- # Gets a single document.
55
- rpc :GetDocument, GetDocumentRequest, Document
56
- # Lists documents.
57
- rpc :ListDocuments, ListDocumentsRequest, ListDocumentsResponse
58
- # Creates a new document.
59
- rpc :CreateDocument, CreateDocumentRequest, Document
60
- # Updates or inserts a document.
61
- rpc :UpdateDocument, UpdateDocumentRequest, Document
62
- # Deletes a document.
63
- rpc :DeleteDocument, DeleteDocumentRequest, Google::Protobuf::Empty
64
- # Gets multiple documents.
65
- #
66
- # Documents returned by this method are not guaranteed to be returned in the
67
- # same order that they were requested.
68
- rpc :BatchGetDocuments, BatchGetDocumentsRequest, stream(BatchGetDocumentsResponse)
69
- # Starts a new transaction.
70
- rpc :BeginTransaction, BeginTransactionRequest, BeginTransactionResponse
71
- # Commits a transaction, while optionally updating documents.
72
- rpc :Commit, CommitRequest, CommitResponse
73
- # Rolls back a transaction.
74
- rpc :Rollback, RollbackRequest, Google::Protobuf::Empty
75
- # Runs a query.
76
- rpc :RunQuery, RunQueryRequest, stream(RunQueryResponse)
77
- # Streams batches of document updates and deletes, in order.
78
- rpc :Write, stream(WriteRequest), stream(WriteResponse)
79
- # Listens to changes.
80
- rpc :Listen, stream(ListenRequest), stream(ListenResponse)
81
- # Lists all the collection IDs underneath a document.
82
- rpc :ListCollectionIds, ListCollectionIdsRequest, ListCollectionIdsResponse
83
- end
84
-
85
- Stub = Service.rpc_stub_class
86
- end
87
- end
88
- end
89
- end