google-cloud-firestore-v1 0.9.0 → 0.11.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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/README.md +2 -2
  4. data/lib/google/cloud/firestore/v1/firestore/client.rb +81 -29
  5. data/lib/google/cloud/firestore/v1/firestore/rest/client.rb +1887 -0
  6. data/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb +933 -0
  7. data/lib/google/cloud/firestore/v1/firestore/rest.rb +58 -0
  8. data/lib/google/cloud/firestore/v1/firestore.rb +6 -0
  9. data/lib/google/cloud/firestore/v1/rest.rb +37 -0
  10. data/lib/google/cloud/firestore/v1/version.rb +1 -1
  11. data/lib/google/cloud/firestore/v1.rb +5 -0
  12. data/lib/google/firestore/v1/aggregation_result_pb.rb +25 -4
  13. data/lib/google/firestore/v1/bloom_filter_pb.rb +43 -0
  14. data/lib/google/firestore/v1/common_pb.rb +25 -24
  15. data/lib/google/firestore/v1/document_pb.rb +26 -28
  16. data/lib/google/firestore/v1/firestore_pb.rb +33 -219
  17. data/lib/google/firestore/v1/firestore_services_pb.rb +3 -3
  18. data/lib/google/firestore/v1/query_pb.rb +28 -96
  19. data/lib/google/firestore/v1/write_pb.rb +29 -53
  20. data/proto_docs/google/api/client.rb +81 -4
  21. data/proto_docs/google/api/field_behavior.rb +14 -0
  22. data/proto_docs/google/firestore/v1/bloom_filter.rb +79 -0
  23. data/proto_docs/google/firestore/v1/common.rb +7 -1
  24. data/proto_docs/google/firestore/v1/document.rb +12 -12
  25. data/proto_docs/google/firestore/v1/firestore.rb +58 -11
  26. data/proto_docs/google/firestore/v1/query.rb +82 -12
  27. data/proto_docs/google/firestore/v1/write.rb +18 -0
  28. data/proto_docs/google/protobuf/any.rb +7 -4
  29. data/proto_docs/google/protobuf/struct.rb +1 -1
  30. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  31. metadata +15 -8
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/firestore/v1/version"
24
+
25
+ require "google/cloud/firestore/v1/firestore/credentials"
26
+ require "google/cloud/firestore/v1/firestore/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module Firestore
31
+ module V1
32
+ ##
33
+ # The Cloud Firestore service.
34
+ #
35
+ # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
36
+ # document database that simplifies storing, syncing, and querying data for
37
+ # your mobile, web, and IoT apps at global scale. Its client libraries provide
38
+ # live synchronization and offline support, while its security features and
39
+ # integrations with Firebase and Google Cloud Platform accelerate building
40
+ # truly serverless apps.
41
+ #
42
+ # To load this service and instantiate a REST client:
43
+ #
44
+ # require "google/cloud/firestore/v1/firestore/rest"
45
+ # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new
46
+ #
47
+ module Firestore
48
+ # Client for the REST transport
49
+ module Rest
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
58
+ require "google/cloud/firestore/v1/firestore/rest/helpers" if ::File.file? helper_path
@@ -24,6 +24,7 @@ require "google/cloud/firestore/v1/version"
24
24
 
25
25
  require "google/cloud/firestore/v1/firestore/credentials"
26
26
  require "google/cloud/firestore/v1/firestore/client"
27
+ require "google/cloud/firestore/v1/firestore/rest"
27
28
 
28
29
  module Google
29
30
  module Cloud
@@ -44,6 +45,11 @@ module Google
44
45
  # require "google/cloud/firestore/v1/firestore"
45
46
  # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new
46
47
  #
48
+ # @example Load this service and instantiate a REST client
49
+ #
50
+ # require "google/cloud/firestore/v1/firestore/rest"
51
+ # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new
52
+ #
47
53
  module Firestore
48
54
  end
49
55
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/firestore/v1/firestore/rest"
20
+ require "google/cloud/firestore/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Firestore
25
+ ##
26
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/cloud/firestore/v1/rest"
31
+ # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new
32
+ #
33
+ module V1
34
+ end
35
+ end
36
+ end
37
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Firestore
23
23
  module V1
24
- VERSION = "0.9.0"
24
+ VERSION = "0.11.0"
25
25
  end
26
26
  end
27
27
  end
@@ -30,6 +30,11 @@ module Google
30
30
  # require "google/cloud/firestore/v1"
31
31
  # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new
32
32
  #
33
+ # @example Load this package, including all its services, and instantiate a REST client
34
+ #
35
+ # require "google/cloud/firestore/v1"
36
+ # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new
37
+ #
33
38
  module V1
34
39
  end
35
40
  end
@@ -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/aggregation_result.proto
3
4
 
@@ -5,12 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/firestore/v1/document_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/firestore/v1/aggregation_result.proto", :syntax => :proto3) do
10
- add_message "google.firestore.v1.AggregationResult" do
11
- map :aggregate_fields, :string, :message, 2, "google.firestore.v1.Value"
9
+
10
+ descriptor_data = "\n,google/firestore/v1/aggregation_result.proto\x12\x13google.firestore.v1\x1a\"google/firestore/v1/document.proto\"\xbe\x01\n\x11\x41ggregationResult\x12U\n\x10\x61ggregate_fields\x18\x02 \x03(\x0b\x32;.google.firestore.v1.AggregationResult.AggregateFieldsEntry\x1aR\n\x14\x41ggregateFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\x42\xce\x01\n\x17\x63om.google.firestore.v1B\x16\x41ggregationResultProtoP\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"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.firestore.v1.Value", "google/firestore/v1/document.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
12
31
  end
13
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
14
35
  end
15
36
 
16
37
  module Google
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/firestore/v1/bloom_filter.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+
8
+ descriptor_data = "\n&google/firestore/v1/bloom_filter.proto\x12\x13google.firestore.v1\".\n\x0b\x42itSequence\x12\x0e\n\x06\x62itmap\x18\x01 \x01(\x0c\x12\x0f\n\x07padding\x18\x02 \x01(\x05\"Q\n\x0b\x42loomFilter\x12.\n\x04\x62its\x18\x01 \x01(\x0b\x32 .google.firestore.v1.BitSequence\x12\x12\n\nhash_count\x18\x02 \x01(\x05\x42\xc8\x01\n\x17\x63om.google.firestore.v1B\x10\x42loomFilterProtoP\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"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
29
+ end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
32
+ end
33
+
34
+ module Google
35
+ module Cloud
36
+ module Firestore
37
+ module V1
38
+ BitSequence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BitSequence").msgclass
39
+ BloomFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BloomFilter").msgclass
40
+ end
41
+ end
42
+ end
43
+ end
@@ -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/common.proto
3
4
 
@@ -5,32 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/timestamp_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/firestore/v1/common.proto", :syntax => :proto3) do
10
- add_message "google.firestore.v1.DocumentMask" do
11
- repeated :field_paths, :string, 1
12
- end
13
- add_message "google.firestore.v1.Precondition" do
14
- oneof :condition_type do
15
- optional :exists, :bool, 1
16
- optional :update_time, :message, 2, "google.protobuf.Timestamp"
17
- end
18
- end
19
- add_message "google.firestore.v1.TransactionOptions" do
20
- oneof :mode do
21
- optional :read_only, :message, 2, "google.firestore.v1.TransactionOptions.ReadOnly"
22
- optional :read_write, :message, 3, "google.firestore.v1.TransactionOptions.ReadWrite"
23
- end
24
- end
25
- add_message "google.firestore.v1.TransactionOptions.ReadWrite" do
26
- optional :retry_transaction, :bytes, 1
27
- end
28
- add_message "google.firestore.v1.TransactionOptions.ReadOnly" do
29
- oneof :consistency_selector do
30
- optional :read_time, :message, 2, "google.protobuf.Timestamp"
31
- end
9
+
10
+ descriptor_data = "\n google/firestore/v1/common.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"#\n\x0c\x44ocumentMask\x12\x13\n\x0b\x66ield_paths\x18\x01 \x03(\t\"e\n\x0cPrecondition\x12\x10\n\x06\x65xists\x18\x01 \x01(\x08H\x00\x12\x31\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x10\n\x0e\x63ondition_type\"\xa9\x02\n\x12TransactionOptions\x12\x45\n\tread_only\x18\x02 \x01(\x0b\x32\x30.google.firestore.v1.TransactionOptions.ReadOnlyH\x00\x12G\n\nread_write\x18\x03 \x01(\x0b\x32\x31.google.firestore.v1.TransactionOptions.ReadWriteH\x00\x1a&\n\tReadWrite\x12\x19\n\x11retry_transaction\x18\x01 \x01(\x0c\x1aS\n\x08ReadOnly\x12/\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selectorB\x06\n\x04modeB\xc3\x01\n\x17\x63om.google.firestore.v1B\x0b\x43ommonProtoP\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"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
32
31
  end
33
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
34
35
  end
35
36
 
36
37
  module Google
@@ -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/document.proto
3
4
 
@@ -7,36 +8,33 @@ require 'google/protobuf/struct_pb'
7
8
  require 'google/protobuf/timestamp_pb'
8
9
  require 'google/type/latlng_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/firestore/v1/document.proto", :syntax => :proto3) do
12
- add_message "google.firestore.v1.Document" do
13
- optional :name, :string, 1
14
- map :fields, :string, :message, 2, "google.firestore.v1.Value"
15
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
16
- optional :update_time, :message, 4, "google.protobuf.Timestamp"
17
- end
18
- add_message "google.firestore.v1.Value" do
19
- oneof :value_type do
20
- optional :null_value, :enum, 11, "google.protobuf.NullValue"
21
- optional :boolean_value, :bool, 1
22
- optional :integer_value, :int64, 2
23
- optional :double_value, :double, 3
24
- optional :timestamp_value, :message, 10, "google.protobuf.Timestamp"
25
- optional :string_value, :string, 17
26
- optional :bytes_value, :bytes, 18
27
- optional :reference_value, :string, 5
28
- optional :geo_point_value, :message, 8, "google.type.LatLng"
29
- optional :array_value, :message, 9, "google.firestore.v1.ArrayValue"
30
- optional :map_value, :message, 6, "google.firestore.v1.MapValue"
31
- end
32
- end
33
- add_message "google.firestore.v1.ArrayValue" do
34
- repeated :values, :message, 1, "google.firestore.v1.Value"
35
- end
36
- add_message "google.firestore.v1.MapValue" do
37
- map :fields, :string, :message, 1, "google.firestore.v1.Value"
11
+
12
+ descriptor_data = "\n\"google/firestore/v1/document.proto\x12\x13google.firestore.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18google/type/latlng.proto\"\x80\x02\n\x08\x44ocument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x06\x66ields\x18\x02 \x03(\x0b\x32).google.firestore.v1.Document.FieldsEntry\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aI\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\"\xae\x03\n\x05Value\x12\x30\n\nnull_value\x18\x0b \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x17\n\rboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x16\n\x0cstring_value\x18\x11 \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x12 \x01(\x0cH\x00\x12\x19\n\x0freference_value\x18\x05 \x01(\tH\x00\x12.\n\x0fgeo_point_value\x18\x08 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x12\x36\n\x0b\x61rray_value\x18\t \x01(\x0b\x32\x1f.google.firestore.v1.ArrayValueH\x00\x12\x32\n\tmap_value\x18\x06 \x01(\x0b\x32\x1d.google.firestore.v1.MapValueH\x00\x42\x0c\n\nvalue_type\"8\n\nArrayValue\x12*\n\x06values\x18\x01 \x03(\x0b\x32\x1a.google.firestore.v1.Value\"\x90\x01\n\x08MapValue\x12\x39\n\x06\x66ields\x18\x01 \x03(\x0b\x32).google.firestore.v1.MapValue.FieldsEntry\x1aI\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\x42\xc5\x01\n\x17\x63om.google.firestore.v1B\rDocumentProtoP\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 => e
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.Timestamp", "google/protobuf/timestamp.proto"],
28
+ ["google.type.LatLng", "google/type/latlng.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}"
38
34
  end
39
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."
40
38
  end
41
39
 
42
40
  module Google