google-cloud-firestore-admin-v1 0.1.2 → 0.3.2
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 +4 -4
- data/AUTHENTICATION.md +8 -8
- data/LICENSE.md +188 -190
- data/README.md +67 -3
- data/lib/google/cloud/firestore/admin/v1.rb +3 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +26 -35
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb +96 -11
- data/lib/google/cloud/firestore/admin/v1/version.rb +1 -1
- data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +9 -9
- data/proto_docs/google/api/field_behavior.rb +12 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/google/type/latlng.rb +2 -2
- metadata +21 -11
|
@@ -62,7 +62,7 @@ module Google
|
|
|
62
62
|
parent_config = while namespace.any?
|
|
63
63
|
parent_name = namespace.join "::"
|
|
64
64
|
parent_const = const_get parent_name
|
|
65
|
-
break parent_const.configure if parent_const
|
|
65
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
66
66
|
namespace.pop
|
|
67
67
|
end
|
|
68
68
|
default_config = Client::Configuration.new parent_config
|
|
@@ -71,44 +71,29 @@ module Google
|
|
|
71
71
|
|
|
72
72
|
default_config.rpcs.list_indexes.timeout = 60.0
|
|
73
73
|
default_config.rpcs.list_indexes.retry_policy = {
|
|
74
|
-
initial_delay: 0.1,
|
|
75
|
-
max_delay: 60.0,
|
|
76
|
-
multiplier: 1.3,
|
|
77
|
-
retry_codes: [14, 13, 4]
|
|
74
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4]
|
|
78
75
|
}
|
|
79
76
|
|
|
80
77
|
default_config.rpcs.get_index.timeout = 60.0
|
|
81
78
|
default_config.rpcs.get_index.retry_policy = {
|
|
82
|
-
initial_delay: 0.1,
|
|
83
|
-
max_delay: 60.0,
|
|
84
|
-
multiplier: 1.3,
|
|
85
|
-
retry_codes: [14, 13, 4]
|
|
79
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4]
|
|
86
80
|
}
|
|
87
81
|
|
|
88
82
|
default_config.rpcs.delete_index.timeout = 60.0
|
|
89
83
|
default_config.rpcs.delete_index.retry_policy = {
|
|
90
|
-
initial_delay: 0.1,
|
|
91
|
-
max_delay: 60.0,
|
|
92
|
-
multiplier: 1.3,
|
|
93
|
-
retry_codes: [14, 13, 4]
|
|
84
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4]
|
|
94
85
|
}
|
|
95
86
|
|
|
96
87
|
default_config.rpcs.get_field.timeout = 60.0
|
|
97
88
|
default_config.rpcs.get_field.retry_policy = {
|
|
98
|
-
initial_delay: 0.1,
|
|
99
|
-
max_delay: 60.0,
|
|
100
|
-
multiplier: 1.3,
|
|
101
|
-
retry_codes: [14, 13, 4]
|
|
89
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4]
|
|
102
90
|
}
|
|
103
91
|
|
|
104
92
|
default_config.rpcs.update_field.timeout = 60.0
|
|
105
93
|
|
|
106
94
|
default_config.rpcs.list_fields.timeout = 60.0
|
|
107
95
|
default_config.rpcs.list_fields.retry_policy = {
|
|
108
|
-
initial_delay: 0.1,
|
|
109
|
-
max_delay: 60.0,
|
|
110
|
-
multiplier: 1.3,
|
|
111
|
-
retry_codes: [14, 13, 4]
|
|
96
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4]
|
|
112
97
|
}
|
|
113
98
|
|
|
114
99
|
default_config.rpcs.export_documents.timeout = 60.0
|
|
@@ -176,8 +161,14 @@ module Google
|
|
|
176
161
|
|
|
177
162
|
# Create credentials
|
|
178
163
|
credentials = @config.credentials
|
|
179
|
-
|
|
180
|
-
if
|
|
164
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
|
165
|
+
# but only if the default endpoint does not have a region prefix.
|
|
166
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
|
167
|
+
@config.endpoint == Client.configure.endpoint &&
|
|
168
|
+
!@config.endpoint.split(".").first.include?("-")
|
|
169
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
170
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
171
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
181
172
|
credentials = Credentials.new credentials, scope: @config.scope
|
|
182
173
|
end
|
|
183
174
|
@quota_project_id = @config.quota_project
|
|
@@ -981,7 +972,7 @@ module Google
|
|
|
981
972
|
config_attr :scope, nil, ::String, ::Array, nil
|
|
982
973
|
config_attr :lib_name, nil, ::String, nil
|
|
983
974
|
config_attr :lib_version, nil, ::String, nil
|
|
984
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
|
975
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
985
976
|
config_attr :interceptors, nil, ::Array, nil
|
|
986
977
|
config_attr :timeout, nil, ::Numeric, nil
|
|
987
978
|
config_attr :metadata, nil, ::Hash, nil
|
|
@@ -1002,7 +993,7 @@ module Google
|
|
|
1002
993
|
def rpcs
|
|
1003
994
|
@rpcs ||= begin
|
|
1004
995
|
parent_rpcs = nil
|
|
1005
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
|
996
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1006
997
|
Rpcs.new parent_rpcs
|
|
1007
998
|
end
|
|
1008
999
|
end
|
|
@@ -1014,7 +1005,7 @@ module Google
|
|
|
1014
1005
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1015
1006
|
# the following configuration fields:
|
|
1016
1007
|
#
|
|
1017
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
|
1008
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1018
1009
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1019
1010
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1020
1011
|
# include the following keys:
|
|
@@ -1073,23 +1064,23 @@ module Google
|
|
|
1073
1064
|
|
|
1074
1065
|
# @private
|
|
1075
1066
|
def initialize parent_rpcs = nil
|
|
1076
|
-
create_index_config = parent_rpcs
|
|
1067
|
+
create_index_config = parent_rpcs.create_index if parent_rpcs.respond_to? :create_index
|
|
1077
1068
|
@create_index = ::Gapic::Config::Method.new create_index_config
|
|
1078
|
-
list_indexes_config = parent_rpcs
|
|
1069
|
+
list_indexes_config = parent_rpcs.list_indexes if parent_rpcs.respond_to? :list_indexes
|
|
1079
1070
|
@list_indexes = ::Gapic::Config::Method.new list_indexes_config
|
|
1080
|
-
get_index_config = parent_rpcs
|
|
1071
|
+
get_index_config = parent_rpcs.get_index if parent_rpcs.respond_to? :get_index
|
|
1081
1072
|
@get_index = ::Gapic::Config::Method.new get_index_config
|
|
1082
|
-
delete_index_config = parent_rpcs
|
|
1073
|
+
delete_index_config = parent_rpcs.delete_index if parent_rpcs.respond_to? :delete_index
|
|
1083
1074
|
@delete_index = ::Gapic::Config::Method.new delete_index_config
|
|
1084
|
-
get_field_config = parent_rpcs
|
|
1075
|
+
get_field_config = parent_rpcs.get_field if parent_rpcs.respond_to? :get_field
|
|
1085
1076
|
@get_field = ::Gapic::Config::Method.new get_field_config
|
|
1086
|
-
update_field_config = parent_rpcs
|
|
1077
|
+
update_field_config = parent_rpcs.update_field if parent_rpcs.respond_to? :update_field
|
|
1087
1078
|
@update_field = ::Gapic::Config::Method.new update_field_config
|
|
1088
|
-
list_fields_config = parent_rpcs
|
|
1079
|
+
list_fields_config = parent_rpcs.list_fields if parent_rpcs.respond_to? :list_fields
|
|
1089
1080
|
@list_fields = ::Gapic::Config::Method.new list_fields_config
|
|
1090
|
-
export_documents_config = parent_rpcs
|
|
1081
|
+
export_documents_config = parent_rpcs.export_documents if parent_rpcs.respond_to? :export_documents
|
|
1091
1082
|
@export_documents = ::Gapic::Config::Method.new export_documents_config
|
|
1092
|
-
import_documents_config = parent_rpcs
|
|
1083
|
+
import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents
|
|
1093
1084
|
@import_documents = ::Gapic::Config::Method.new import_documents_config
|
|
1094
1085
|
|
|
1095
1086
|
yield self if block_given?
|
|
@@ -83,7 +83,7 @@ module Google
|
|
|
83
83
|
# Create credentials
|
|
84
84
|
credentials = @config.credentials
|
|
85
85
|
credentials ||= Credentials.default scope: @config.scope
|
|
86
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
|
86
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
87
87
|
credentials = Credentials.new credentials, scope: @config.scope
|
|
88
88
|
end
|
|
89
89
|
@quota_project_id = @config.quota_project
|
|
@@ -104,8 +104,13 @@ module Google
|
|
|
104
104
|
# Lists operations that match the specified filter in the request. If the
|
|
105
105
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
106
106
|
#
|
|
107
|
-
# NOTE: the `name` binding
|
|
108
|
-
# to use different resource name schemes, such as `users/*/operations`.
|
|
107
|
+
# NOTE: the `name` binding allows API services to override the binding
|
|
108
|
+
# to use different resource name schemes, such as `users/*/operations`. To
|
|
109
|
+
# override the binding, API services can add a binding such as
|
|
110
|
+
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
|
111
|
+
# For backwards compatibility, the default name includes the operations
|
|
112
|
+
# collection id, however overriding users must ensure the name binding
|
|
113
|
+
# is the parent resource, without the operations collection id.
|
|
109
114
|
#
|
|
110
115
|
# @overload list_operations(request, options = nil)
|
|
111
116
|
# Pass arguments to `list_operations` via a request object, either of type
|
|
@@ -123,7 +128,7 @@ module Google
|
|
|
123
128
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
124
129
|
#
|
|
125
130
|
# @param name [::String]
|
|
126
|
-
# The name of the operation
|
|
131
|
+
# The name of the operation's parent resource.
|
|
127
132
|
# @param filter [::String]
|
|
128
133
|
# The standard list filter.
|
|
129
134
|
# @param page_size [::Integer]
|
|
@@ -391,6 +396,79 @@ module Google
|
|
|
391
396
|
raise ::Google::Cloud::Error.from_error(e)
|
|
392
397
|
end
|
|
393
398
|
|
|
399
|
+
##
|
|
400
|
+
# Waits until the specified long-running operation is done or reaches at most
|
|
401
|
+
# a specified timeout, returning the latest state. If the operation is
|
|
402
|
+
# already done, the latest state is immediately returned. If the timeout
|
|
403
|
+
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
|
404
|
+
# timeout is used. If the server does not support this method, it returns
|
|
405
|
+
# `google.rpc.Code.UNIMPLEMENTED`.
|
|
406
|
+
# Note that this method is on a best-effort basis. It may return the latest
|
|
407
|
+
# state before the specified timeout (including immediately), meaning even an
|
|
408
|
+
# immediate response is no guarantee that the operation is done.
|
|
409
|
+
#
|
|
410
|
+
# @overload wait_operation(request, options = nil)
|
|
411
|
+
# Pass arguments to `wait_operation` via a request object, either of type
|
|
412
|
+
# {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash.
|
|
413
|
+
#
|
|
414
|
+
# @param request [::Google::Longrunning::WaitOperationRequest, ::Hash]
|
|
415
|
+
# A request object representing the call parameters. Required. To specify no
|
|
416
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
417
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
418
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
419
|
+
#
|
|
420
|
+
# @overload wait_operation(name: nil, timeout: nil)
|
|
421
|
+
# Pass arguments to `wait_operation` via keyword arguments. Note that at
|
|
422
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
423
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
424
|
+
#
|
|
425
|
+
# @param name [::String]
|
|
426
|
+
# The name of the operation resource to wait on.
|
|
427
|
+
# @param timeout [::Google::Protobuf::Duration, ::Hash]
|
|
428
|
+
# The maximum duration to wait before timing out. If left blank, the wait
|
|
429
|
+
# will be at most the time permitted by the underlying HTTP/RPC protocol.
|
|
430
|
+
# If RPC context deadline is also specified, the shorter one will be used.
|
|
431
|
+
#
|
|
432
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
433
|
+
# @yieldparam response [::Gapic::Operation]
|
|
434
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
435
|
+
#
|
|
436
|
+
# @return [::Gapic::Operation]
|
|
437
|
+
#
|
|
438
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
439
|
+
#
|
|
440
|
+
def wait_operation request, options = nil
|
|
441
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
442
|
+
|
|
443
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest
|
|
444
|
+
|
|
445
|
+
# Converts hash and nil to an options object
|
|
446
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
447
|
+
|
|
448
|
+
# Customize the options with defaults
|
|
449
|
+
metadata = @config.rpcs.wait_operation.metadata.to_h
|
|
450
|
+
|
|
451
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
452
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
453
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
454
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
|
455
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
456
|
+
|
|
457
|
+
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
|
458
|
+
metadata: metadata,
|
|
459
|
+
retry_policy: @config.rpcs.wait_operation.retry_policy
|
|
460
|
+
options.apply_defaults metadata: @config.metadata,
|
|
461
|
+
retry_policy: @config.retry_policy
|
|
462
|
+
|
|
463
|
+
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
|
464
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
465
|
+
yield response, operation if block_given?
|
|
466
|
+
return response
|
|
467
|
+
end
|
|
468
|
+
rescue ::GRPC::BadStatus => e
|
|
469
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
470
|
+
end
|
|
471
|
+
|
|
394
472
|
##
|
|
395
473
|
# Configuration class for the Operations API.
|
|
396
474
|
#
|
|
@@ -483,7 +561,7 @@ module Google
|
|
|
483
561
|
config_attr :scope, nil, ::String, ::Array, nil
|
|
484
562
|
config_attr :lib_name, nil, ::String, nil
|
|
485
563
|
config_attr :lib_version, nil, ::String, nil
|
|
486
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
|
564
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
487
565
|
config_attr :interceptors, nil, ::Array, nil
|
|
488
566
|
config_attr :timeout, nil, ::Numeric, nil
|
|
489
567
|
config_attr :metadata, nil, ::Hash, nil
|
|
@@ -504,7 +582,7 @@ module Google
|
|
|
504
582
|
def rpcs
|
|
505
583
|
@rpcs ||= begin
|
|
506
584
|
parent_rpcs = nil
|
|
507
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
|
585
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
508
586
|
Rpcs.new parent_rpcs
|
|
509
587
|
end
|
|
510
588
|
end
|
|
@@ -516,7 +594,7 @@ module Google
|
|
|
516
594
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
517
595
|
# the following configuration fields:
|
|
518
596
|
#
|
|
519
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
|
597
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
520
598
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
521
599
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
522
600
|
# include the following keys:
|
|
@@ -547,17 +625,24 @@ module Google
|
|
|
547
625
|
# @return [::Gapic::Config::Method]
|
|
548
626
|
#
|
|
549
627
|
attr_reader :cancel_operation
|
|
628
|
+
##
|
|
629
|
+
# RPC-specific configuration for `wait_operation`
|
|
630
|
+
# @return [::Gapic::Config::Method]
|
|
631
|
+
#
|
|
632
|
+
attr_reader :wait_operation
|
|
550
633
|
|
|
551
634
|
# @private
|
|
552
635
|
def initialize parent_rpcs = nil
|
|
553
|
-
list_operations_config = parent_rpcs
|
|
636
|
+
list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations
|
|
554
637
|
@list_operations = ::Gapic::Config::Method.new list_operations_config
|
|
555
|
-
get_operation_config = parent_rpcs
|
|
638
|
+
get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation
|
|
556
639
|
@get_operation = ::Gapic::Config::Method.new get_operation_config
|
|
557
|
-
delete_operation_config = parent_rpcs
|
|
640
|
+
delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation
|
|
558
641
|
@delete_operation = ::Gapic::Config::Method.new delete_operation_config
|
|
559
|
-
cancel_operation_config = parent_rpcs
|
|
642
|
+
cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation
|
|
560
643
|
@cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
|
|
644
|
+
wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation
|
|
645
|
+
@wait_operation = ::Gapic::Config::Method.new wait_operation_config
|
|
561
646
|
|
|
562
647
|
yield self if block_given?
|
|
563
648
|
end
|
|
@@ -39,15 +39,15 @@ module Google
|
|
|
39
39
|
# Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
|
|
40
40
|
# which may be used to track the status of the creation. The metadata for
|
|
41
41
|
# the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
|
|
42
|
-
rpc :CreateIndex, Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, Google::Longrunning::Operation
|
|
42
|
+
rpc :CreateIndex, ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Google::Longrunning::Operation
|
|
43
43
|
# Lists composite indexes.
|
|
44
|
-
rpc :ListIndexes, Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, Google::Cloud::Firestore::Admin::V1::ListIndexesResponse
|
|
44
|
+
rpc :ListIndexes, ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse
|
|
45
45
|
# Gets a composite index.
|
|
46
|
-
rpc :GetIndex, Google::Cloud::Firestore::Admin::V1::GetIndexRequest, Google::Cloud::Firestore::Admin::V1::Index
|
|
46
|
+
rpc :GetIndex, ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Google::Cloud::Firestore::Admin::V1::Index
|
|
47
47
|
# Deletes a composite index.
|
|
48
|
-
rpc :DeleteIndex, Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, Google::Protobuf::Empty
|
|
48
|
+
rpc :DeleteIndex, ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Google::Protobuf::Empty
|
|
49
49
|
# Gets the metadata and configuration for a Field.
|
|
50
|
-
rpc :GetField, Google::Cloud::Firestore::Admin::V1::GetFieldRequest, Google::Cloud::Firestore::Admin::V1::Field
|
|
50
|
+
rpc :GetField, ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Google::Cloud::Firestore::Admin::V1::Field
|
|
51
51
|
# Updates a field configuration. Currently, field updates apply only to
|
|
52
52
|
# single field index configuration. However, calls to
|
|
53
53
|
# [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid
|
|
@@ -61,14 +61,14 @@ module Google
|
|
|
61
61
|
# To configure the default field settings for the database, use
|
|
62
62
|
# the special `Field` with resource name:
|
|
63
63
|
# `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
|
|
64
|
-
rpc :UpdateField, Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, Google::Longrunning::Operation
|
|
64
|
+
rpc :UpdateField, ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Google::Longrunning::Operation
|
|
65
65
|
# Lists the field configuration and metadata for this database.
|
|
66
66
|
#
|
|
67
67
|
# Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
|
|
68
68
|
# that have been explicitly overridden. To issue this query, call
|
|
69
69
|
# [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
|
|
70
70
|
# `indexConfig.usesAncestorConfig:false`.
|
|
71
|
-
rpc :ListFields, Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, Google::Cloud::Firestore::Admin::V1::ListFieldsResponse
|
|
71
|
+
rpc :ListFields, ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse
|
|
72
72
|
# Exports a copy of all or a subset of documents from Google Cloud Firestore
|
|
73
73
|
# to another storage system, such as Google Cloud Storage. Recent updates to
|
|
74
74
|
# documents may not be reflected in the export. The export occurs in the
|
|
@@ -77,13 +77,13 @@ module Google
|
|
|
77
77
|
# used once the associated operation is done. If an export operation is
|
|
78
78
|
# cancelled before completion it may leave partial data behind in Google
|
|
79
79
|
# Cloud Storage.
|
|
80
|
-
rpc :ExportDocuments, Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, Google::Longrunning::Operation
|
|
80
|
+
rpc :ExportDocuments, ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Google::Longrunning::Operation
|
|
81
81
|
# Imports documents into Google Cloud Firestore. Existing documents with the
|
|
82
82
|
# same name are overwritten. The import occurs in the background and its
|
|
83
83
|
# progress can be monitored and managed via the Operation resource that is
|
|
84
84
|
# created. If an ImportDocuments operation is cancelled, it is possible
|
|
85
85
|
# that a subset of the data has already been imported to Cloud Firestore.
|
|
86
|
-
rpc :ImportDocuments, Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, Google::Longrunning::Operation
|
|
86
|
+
rpc :ImportDocuments, ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Google::Longrunning::Operation
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
Stub = Service.rpc_stub_class
|
|
@@ -54,6 +54,18 @@ module Google
|
|
|
54
54
|
# This indicates that the field may be set once in a request to create a
|
|
55
55
|
# resource, but may not be changed thereafter.
|
|
56
56
|
IMMUTABLE = 5
|
|
57
|
+
|
|
58
|
+
# Denotes that a (repeated) field is an unordered list.
|
|
59
|
+
# This indicates that the service may provide the elements of the list
|
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
|
61
|
+
# provided. Additionally, the list's order may or may not be stable.
|
|
62
|
+
UNORDERED_LIST = 6
|
|
63
|
+
|
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
|
67
|
+
# non-empty value to expect.
|
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
|
57
69
|
end
|
|
58
70
|
end
|
|
59
71
|
end
|
|
@@ -43,12 +43,12 @@ module Google
|
|
|
43
43
|
#
|
|
44
44
|
# The ResourceDescriptor Yaml config will look like:
|
|
45
45
|
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
46
|
+
# resources:
|
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
|
48
|
+
# name_descriptor:
|
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
|
52
52
|
#
|
|
53
53
|
# Sometimes, resources have multiple patterns, typically because they can
|
|
54
54
|
# live under multiple parents.
|
|
@@ -183,15 +183,24 @@ module Google
|
|
|
183
183
|
# }
|
|
184
184
|
# @!attribute [rw] plural
|
|
185
185
|
# @return [::String]
|
|
186
|
-
# The plural name used in the resource name, such as
|
|
187
|
-
# the name of 'projects/\\{project}'
|
|
188
|
-
#
|
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
|
189
190
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
|
191
|
+
#
|
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
|
193
|
+
# https://aip.dev/156
|
|
190
194
|
# @!attribute [rw] singular
|
|
191
195
|
# @return [::String]
|
|
192
196
|
# The same concept of the `singular` field in k8s CRD spec
|
|
193
197
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
|
194
198
|
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
|
199
|
+
# @!attribute [rw] style
|
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
|
201
|
+
# Style flag(s) for this resource.
|
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
|
203
|
+
# style. See the specific style flags for additional information.
|
|
195
204
|
class ResourceDescriptor
|
|
196
205
|
include ::Google::Protobuf::MessageExts
|
|
197
206
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -211,6 +220,22 @@ module Google
|
|
|
211
220
|
# that from being necessary once there are multiple patterns.)
|
|
212
221
|
FUTURE_MULTI_PATTERN = 2
|
|
213
222
|
end
|
|
223
|
+
|
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
|
225
|
+
module Style
|
|
226
|
+
# The unspecified value. Do not use.
|
|
227
|
+
STYLE_UNSPECIFIED = 0
|
|
228
|
+
|
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
|
230
|
+
#
|
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
|
232
|
+
# setting this to true communicates to tools that this resource should
|
|
233
|
+
# adhere to declarative-friendly expectations.
|
|
234
|
+
#
|
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
|
236
|
+
# additional checks.
|
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
|
238
|
+
end
|
|
214
239
|
end
|
|
215
240
|
|
|
216
241
|
# Defines a proto annotation that describes a string field that refers to
|
|
@@ -226,6 +251,17 @@ module Google
|
|
|
226
251
|
# type: "pubsub.googleapis.com/Topic"
|
|
227
252
|
# }];
|
|
228
253
|
# }
|
|
254
|
+
#
|
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
|
256
|
+
# APIs use the special value * in their resource reference.
|
|
257
|
+
#
|
|
258
|
+
# Example:
|
|
259
|
+
#
|
|
260
|
+
# message GetIamPolicyRequest {
|
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
|
262
|
+
# type: "*"
|
|
263
|
+
# }];
|
|
264
|
+
# }
|
|
229
265
|
# @!attribute [rw] child_type
|
|
230
266
|
# @return [::String]
|
|
231
267
|
# The resource type of a child collection that the annotated field
|
|
@@ -234,11 +270,11 @@ module Google
|
|
|
234
270
|
#
|
|
235
271
|
# Example:
|
|
236
272
|
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
239
|
-
#
|
|
240
|
-
#
|
|
241
|
-
#
|
|
273
|
+
# message ListLogEntriesRequest {
|
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
|
276
|
+
# };
|
|
277
|
+
# }
|
|
242
278
|
class ResourceReference
|
|
243
279
|
include ::Google::Protobuf::MessageExts
|
|
244
280
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|