google-cloud-location 0.6.0 → 1.4.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 +4 -4
- data/AUTHENTICATION.md +72 -99
- data/README.md +5 -5
- data/lib/google/cloud/location/locations/client.rb +94 -17
- data/lib/google/cloud/location/locations/rest/client.rb +75 -12
- data/lib/google/cloud/location/locations/rest/service_stub.rb +52 -15
- data/lib/google/cloud/location/locations_pb.rb +2 -24
- data/lib/google/cloud/location/version.rb +1 -1
- data/proto_docs/google/api/client.rb +231 -19
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/protobuf/any.rb +2 -1
- metadata +8 -129
|
@@ -33,6 +33,12 @@ module Google
|
|
|
33
33
|
# {::Google::Cloud::Location::Location#metadata Location.metadata} field.
|
|
34
34
|
#
|
|
35
35
|
class Client
|
|
36
|
+
# @private
|
|
37
|
+
API_VERSION = ""
|
|
38
|
+
|
|
39
|
+
# @private
|
|
40
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloud.$UNIVERSE_DOMAIN$"
|
|
41
|
+
|
|
36
42
|
# @private
|
|
37
43
|
attr_reader :locations_stub
|
|
38
44
|
|
|
@@ -91,6 +97,15 @@ module Google
|
|
|
91
97
|
@config
|
|
92
98
|
end
|
|
93
99
|
|
|
100
|
+
##
|
|
101
|
+
# The effective universe domain
|
|
102
|
+
#
|
|
103
|
+
# @return [String]
|
|
104
|
+
#
|
|
105
|
+
def universe_domain
|
|
106
|
+
@locations_stub.universe_domain
|
|
107
|
+
end
|
|
108
|
+
|
|
94
109
|
##
|
|
95
110
|
# Create a new Locations REST client object.
|
|
96
111
|
#
|
|
@@ -118,8 +133,9 @@ module Google
|
|
|
118
133
|
credentials = @config.credentials
|
|
119
134
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
120
135
|
# but only if the default endpoint does not have a region prefix.
|
|
121
|
-
enable_self_signed_jwt = @config.endpoint
|
|
122
|
-
|
|
136
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
137
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
138
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
123
139
|
credentials ||= Credentials.default scope: @config.scope,
|
|
124
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
125
141
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -129,7 +145,32 @@ module Google
|
|
|
129
145
|
@quota_project_id = @config.quota_project
|
|
130
146
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
131
147
|
|
|
132
|
-
@locations_stub = ::Google::Cloud::Location::Locations::Rest::ServiceStub.new
|
|
148
|
+
@locations_stub = ::Google::Cloud::Location::Locations::Rest::ServiceStub.new(
|
|
149
|
+
endpoint: @config.endpoint,
|
|
150
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
151
|
+
universe_domain: @config.universe_domain,
|
|
152
|
+
credentials: credentials,
|
|
153
|
+
logger: @config.logger
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
@locations_stub.logger(stub: true)&.info do |entry|
|
|
157
|
+
entry.set_system_name
|
|
158
|
+
entry.set_service
|
|
159
|
+
entry.message = "Created client for #{entry.service}"
|
|
160
|
+
entry.set_credentials_fields credentials
|
|
161
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
162
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
163
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
##
|
|
168
|
+
# The logger used for request/response debug logging.
|
|
169
|
+
#
|
|
170
|
+
# @return [Logger]
|
|
171
|
+
#
|
|
172
|
+
def logger
|
|
173
|
+
@locations_stub.logger
|
|
133
174
|
end
|
|
134
175
|
|
|
135
176
|
# Service calls
|
|
@@ -198,12 +239,13 @@ module Google
|
|
|
198
239
|
# Customize the options with defaults
|
|
199
240
|
call_metadata = @config.rpcs.list_locations.metadata.to_h
|
|
200
241
|
|
|
201
|
-
# Set x-goog-api-client
|
|
242
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
202
243
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
203
244
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
204
245
|
gapic_version: ::Google::Cloud::Location::VERSION,
|
|
205
246
|
transports_version_send: [:rest]
|
|
206
247
|
|
|
248
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
207
249
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
208
250
|
|
|
209
251
|
options.apply_defaults timeout: @config.rpcs.list_locations.timeout,
|
|
@@ -219,7 +261,7 @@ module Google
|
|
|
219
261
|
@locations_stub.list_locations request, options, bindings_override: bindings_override do |result, operation|
|
|
220
262
|
result = ::Gapic::Rest::PagedEnumerable.new @locations_stub, :list_locations, "locations", request, result, options
|
|
221
263
|
yield result, operation if block_given?
|
|
222
|
-
|
|
264
|
+
throw :response, result
|
|
223
265
|
end
|
|
224
266
|
rescue ::Gapic::Rest::Error => e
|
|
225
267
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -279,12 +321,13 @@ module Google
|
|
|
279
321
|
# Customize the options with defaults
|
|
280
322
|
call_metadata = @config.rpcs.get_location.metadata.to_h
|
|
281
323
|
|
|
282
|
-
# Set x-goog-api-client
|
|
324
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
283
325
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
284
326
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
285
327
|
gapic_version: ::Google::Cloud::Location::VERSION,
|
|
286
328
|
transports_version_send: [:rest]
|
|
287
329
|
|
|
330
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
288
331
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
289
332
|
|
|
290
333
|
options.apply_defaults timeout: @config.rpcs.get_location.timeout,
|
|
@@ -299,7 +342,6 @@ module Google
|
|
|
299
342
|
|
|
300
343
|
@locations_stub.get_location request, options, bindings_override: bindings_override do |result, operation|
|
|
301
344
|
yield result, operation if block_given?
|
|
302
|
-
return result
|
|
303
345
|
end
|
|
304
346
|
rescue ::Gapic::Rest::Error => e
|
|
305
347
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -335,9 +377,9 @@ module Google
|
|
|
335
377
|
# end
|
|
336
378
|
#
|
|
337
379
|
# @!attribute [rw] endpoint
|
|
338
|
-
#
|
|
339
|
-
#
|
|
340
|
-
# @return [::String]
|
|
380
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
381
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
382
|
+
# @return [::String,nil]
|
|
341
383
|
# @!attribute [rw] credentials
|
|
342
384
|
# Credentials to send with calls. You may provide any of the following types:
|
|
343
385
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -347,6 +389,13 @@ module Google
|
|
|
347
389
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
348
390
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
349
391
|
# * (`nil`) indicating no credentials
|
|
392
|
+
#
|
|
393
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
394
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
395
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
396
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
397
|
+
# For more information, refer to [Validate credential configurations from external
|
|
398
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
350
399
|
# @return [::Object]
|
|
351
400
|
# @!attribute [rw] scope
|
|
352
401
|
# The OAuth scopes
|
|
@@ -374,15 +423,27 @@ module Google
|
|
|
374
423
|
# @!attribute [rw] quota_project
|
|
375
424
|
# A separate project against which to charge quota.
|
|
376
425
|
# @return [::String]
|
|
426
|
+
# @!attribute [rw] universe_domain
|
|
427
|
+
# The universe domain within which to make requests. This determines the
|
|
428
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
429
|
+
# universe (usually the default "googleapis.com" universe).
|
|
430
|
+
# @return [::String,nil]
|
|
431
|
+
# @!attribute [rw] logger
|
|
432
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
433
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
434
|
+
# explicitly disable logging.
|
|
435
|
+
# @return [::Logger,:default,nil]
|
|
377
436
|
#
|
|
378
437
|
class Configuration
|
|
379
438
|
extend ::Gapic::Config
|
|
380
439
|
|
|
440
|
+
# @private
|
|
441
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
381
442
|
DEFAULT_ENDPOINT = "cloud.googleapis.com"
|
|
382
443
|
|
|
383
|
-
config_attr :endpoint,
|
|
444
|
+
config_attr :endpoint, nil, ::String, nil
|
|
384
445
|
config_attr :credentials, nil do |value|
|
|
385
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
446
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
386
447
|
allowed.any? { |klass| klass === value }
|
|
387
448
|
end
|
|
388
449
|
config_attr :scope, nil, ::String, ::Array, nil
|
|
@@ -392,6 +453,7 @@ module Google
|
|
|
392
453
|
config_attr :metadata, nil, ::Hash, nil
|
|
393
454
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
394
455
|
config_attr :quota_project, nil, ::String, nil
|
|
456
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
395
457
|
|
|
396
458
|
# @private
|
|
397
459
|
# Overrides for http bindings for the RPCs of this service
|
|
@@ -399,6 +461,7 @@ module Google
|
|
|
399
461
|
# by the host service.
|
|
400
462
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
|
401
463
|
config_attr :bindings_override, {}, ::Hash, nil
|
|
464
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
402
465
|
|
|
403
466
|
# @private
|
|
404
467
|
def initialize parent_config = nil
|
|
@@ -29,14 +29,47 @@ module Google
|
|
|
29
29
|
# including transcoding, making the REST call, and deserialing the response.
|
|
30
30
|
#
|
|
31
31
|
class ServiceStub
|
|
32
|
-
|
|
32
|
+
# @private
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
|
33
34
|
# These require statements are intentionally placed here to initialize
|
|
34
35
|
# the REST modules only when it's required.
|
|
35
36
|
require "gapic/rest"
|
|
36
37
|
|
|
37
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
38
42
|
numeric_enums: true,
|
|
39
|
-
|
|
43
|
+
service_name: self.class,
|
|
44
|
+
raise_faraday_errors: false,
|
|
45
|
+
logger: logger
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
##
|
|
49
|
+
# The effective universe domain
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
#
|
|
53
|
+
def universe_domain
|
|
54
|
+
@client_stub.universe_domain
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
##
|
|
58
|
+
# The effective endpoint
|
|
59
|
+
#
|
|
60
|
+
# @return [String]
|
|
61
|
+
#
|
|
62
|
+
def endpoint
|
|
63
|
+
@client_stub.endpoint
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
##
|
|
67
|
+
# The logger used for request/response debug logging.
|
|
68
|
+
#
|
|
69
|
+
# @return [Logger]
|
|
70
|
+
#
|
|
71
|
+
def logger stub: false
|
|
72
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
|
40
73
|
end
|
|
41
74
|
|
|
42
75
|
##
|
|
@@ -67,16 +100,18 @@ module Google
|
|
|
67
100
|
|
|
68
101
|
response = @client_stub.make_http_request(
|
|
69
102
|
verb,
|
|
70
|
-
uri:
|
|
71
|
-
body:
|
|
72
|
-
params:
|
|
103
|
+
uri: uri,
|
|
104
|
+
body: body || "",
|
|
105
|
+
params: query_string_params,
|
|
106
|
+
method_name: "list_locations",
|
|
73
107
|
options: options
|
|
74
108
|
)
|
|
75
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
76
110
|
result = ::Google::Cloud::Location::ListLocationsResponse.decode_json response.body, ignore_unknown_fields: true
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
111
|
+
catch :response do
|
|
112
|
+
yield result, operation if block_given?
|
|
113
|
+
result
|
|
114
|
+
end
|
|
80
115
|
end
|
|
81
116
|
|
|
82
117
|
##
|
|
@@ -107,16 +142,18 @@ module Google
|
|
|
107
142
|
|
|
108
143
|
response = @client_stub.make_http_request(
|
|
109
144
|
verb,
|
|
110
|
-
uri:
|
|
111
|
-
body:
|
|
112
|
-
params:
|
|
145
|
+
uri: uri,
|
|
146
|
+
body: body || "",
|
|
147
|
+
params: query_string_params,
|
|
148
|
+
method_name: "get_location",
|
|
113
149
|
options: options
|
|
114
150
|
)
|
|
115
151
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
116
152
|
result = ::Google::Cloud::Location::Location.decode_json response.body, ignore_unknown_fields: true
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
153
|
+
catch :response do
|
|
154
|
+
yield result, operation if block_given?
|
|
155
|
+
result
|
|
156
|
+
end
|
|
120
157
|
end
|
|
121
158
|
|
|
122
159
|
##
|
|
@@ -11,30 +11,8 @@ require 'google/api/client_pb'
|
|
|
11
11
|
|
|
12
12
|
descriptor_data = "\n%google/cloud/location/locations.proto\x12\x15google.cloud.location\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/protobuf/any.proto\x1a\x17google/api/client.proto\"[\n\x14ListLocationsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"d\n\x15ListLocationsResponse\x12\x32\n\tlocations\x18\x01 \x03(\x0b\x32\x1f.google.cloud.location.Location\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\"\n\x12GetLocationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xd7\x01\n\x08Location\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.google.cloud.location.Location.LabelsEntry\x12&\n\x08metadata\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xa4\x03\n\tLocations\x12\xab\x01\n\rListLocations\x12+.google.cloud.location.ListLocationsRequest\x1a,.google.cloud.location.ListLocationsResponse\"?\x82\xd3\xe4\x93\x02\x39\x12\x14/v1/{name=locations}Z!\x12\x1f/v1/{name=projects/*}/locations\x12\x9e\x01\n\x0bGetLocation\x12).google.cloud.location.GetLocationRequest\x1a\x1f.google.cloud.location.Location\"C\x82\xd3\xe4\x93\x02=\x12\x16/v1/{name=locations/*}Z#\x12!/v1/{name=projects/*/locations/*}\x1aH\xca\x41\x14\x63loud.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBo\n\x19\x63om.google.cloud.locationB\x0eLocationsProtoP\x01Z=google.golang.org/genproto/googleapis/cloud/location;location\xf8\x01\x01\x62\x06proto3"
|
|
13
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.Any", "google/protobuf/any.proto"],
|
|
28
|
-
]
|
|
29
|
-
imports.each do |type_name, expected_filename|
|
|
30
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
31
|
-
if import_file.name != expected_filename
|
|
32
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
36
|
-
warn "This will become an error in the next major version."
|
|
37
|
-
end
|
|
14
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
|
38
16
|
|
|
39
17
|
module Google
|
|
40
18
|
module Cloud
|
|
@@ -21,12 +21,18 @@ module Google
|
|
|
21
21
|
module Api
|
|
22
22
|
# Required information for every language.
|
|
23
23
|
# @!attribute [rw] reference_docs_uri
|
|
24
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
|
24
25
|
# @return [::String]
|
|
25
26
|
# Link to automatically generated reference documentation. Example:
|
|
26
27
|
# https://cloud.google.com/nodejs/docs/reference/asset/latest
|
|
27
28
|
# @!attribute [rw] destinations
|
|
28
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
|
29
30
|
# The destination where API teams want this client library to be published.
|
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
|
34
|
+
#
|
|
35
|
+
# Note: This field should not be used in most cases.
|
|
30
36
|
class CommonLanguageSettings
|
|
31
37
|
include ::Google::Protobuf::MessageExts
|
|
32
38
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -117,6 +123,10 @@ module Google
|
|
|
117
123
|
# @return [::String]
|
|
118
124
|
# Optional link to proto reference documentation. Example:
|
|
119
125
|
# https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
|
126
|
+
# @!attribute [rw] rest_reference_documentation_uri
|
|
127
|
+
# @return [::String]
|
|
128
|
+
# Optional link to REST reference documentation. Example:
|
|
129
|
+
# https://cloud.google.com/pubsub/lite/docs/reference/rest
|
|
120
130
|
class Publishing
|
|
121
131
|
include ::Google::Protobuf::MessageExts
|
|
122
132
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -133,9 +143,10 @@ module Google
|
|
|
133
143
|
#
|
|
134
144
|
# Example of a YAML configuration::
|
|
135
145
|
#
|
|
136
|
-
#
|
|
137
|
-
#
|
|
138
|
-
#
|
|
146
|
+
# publishing:
|
|
147
|
+
# library_settings:
|
|
148
|
+
# java_settings:
|
|
149
|
+
# library_package: com.google.cloud.pubsub.v1
|
|
139
150
|
# @!attribute [rw] service_class_names
|
|
140
151
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
|
141
152
|
# Configure the Java class name to use instead of the service's for its
|
|
@@ -147,11 +158,11 @@ module Google
|
|
|
147
158
|
#
|
|
148
159
|
# Example of a YAML configuration::
|
|
149
160
|
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
152
|
-
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
161
|
+
# publishing:
|
|
162
|
+
# java_settings:
|
|
163
|
+
# service_class_names:
|
|
164
|
+
# - google.pubsub.v1.Publisher: TopicAdmin
|
|
165
|
+
# - google.pubsub.v1.Subscriber: SubscriptionAdmin
|
|
155
166
|
# @!attribute [rw] common
|
|
156
167
|
# @return [::Google::Api::CommonLanguageSettings]
|
|
157
168
|
# Some settings.
|
|
@@ -182,6 +193,20 @@ module Google
|
|
|
182
193
|
# @!attribute [rw] common
|
|
183
194
|
# @return [::Google::Api::CommonLanguageSettings]
|
|
184
195
|
# Some settings.
|
|
196
|
+
# @!attribute [rw] library_package
|
|
197
|
+
# @return [::String]
|
|
198
|
+
# The package name to use in Php. Clobbers the php_namespace option
|
|
199
|
+
# set in the protobuf. This should be used **only** by APIs
|
|
200
|
+
# who have already set the language_settings.php.package_name" field
|
|
201
|
+
# in gapic.yaml. API teams should use the protobuf php_namespace option
|
|
202
|
+
# where possible.
|
|
203
|
+
#
|
|
204
|
+
# Example of a YAML configuration::
|
|
205
|
+
#
|
|
206
|
+
# publishing:
|
|
207
|
+
# library_settings:
|
|
208
|
+
# php_settings:
|
|
209
|
+
# library_package: Google\Cloud\PubSub\V1
|
|
185
210
|
class PhpSettings
|
|
186
211
|
include ::Google::Protobuf::MessageExts
|
|
187
212
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -191,9 +216,38 @@ module Google
|
|
|
191
216
|
# @!attribute [rw] common
|
|
192
217
|
# @return [::Google::Api::CommonLanguageSettings]
|
|
193
218
|
# Some settings.
|
|
219
|
+
# @!attribute [rw] experimental_features
|
|
220
|
+
# @return [::Google::Api::PythonSettings::ExperimentalFeatures]
|
|
221
|
+
# Experimental features to be included during client library generation.
|
|
194
222
|
class PythonSettings
|
|
195
223
|
include ::Google::Protobuf::MessageExts
|
|
196
224
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
225
|
+
|
|
226
|
+
# Experimental features to be included during client library generation.
|
|
227
|
+
# These fields will be deprecated once the feature graduates and is enabled
|
|
228
|
+
# by default.
|
|
229
|
+
# @!attribute [rw] rest_async_io_enabled
|
|
230
|
+
# @return [::Boolean]
|
|
231
|
+
# Enables generation of asynchronous REST clients if `rest` transport is
|
|
232
|
+
# enabled. By default, asynchronous REST clients will not be generated.
|
|
233
|
+
# This feature will be enabled by default 1 month after launching the
|
|
234
|
+
# feature in preview packages.
|
|
235
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
|
236
|
+
# @return [::Boolean]
|
|
237
|
+
# Enables generation of protobuf code using new types that are more
|
|
238
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
|
239
|
+
# enabled by default 1 month after launching the feature in preview
|
|
240
|
+
# packages.
|
|
241
|
+
# @!attribute [rw] unversioned_package_disabled
|
|
242
|
+
# @return [::Boolean]
|
|
243
|
+
# Disables generation of an unversioned Python package for this client
|
|
244
|
+
# library. This means that the module names will need to be versioned in
|
|
245
|
+
# import statements. For example `import google.cloud.library_v2` instead
|
|
246
|
+
# of `import google.cloud.library`.
|
|
247
|
+
class ExperimentalFeatures
|
|
248
|
+
include ::Google::Protobuf::MessageExts
|
|
249
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
250
|
+
end
|
|
197
251
|
end
|
|
198
252
|
|
|
199
253
|
# Settings for Node client libraries.
|
|
@@ -275,9 +329,30 @@ module Google
|
|
|
275
329
|
# @!attribute [rw] common
|
|
276
330
|
# @return [::Google::Api::CommonLanguageSettings]
|
|
277
331
|
# Some settings.
|
|
332
|
+
# @!attribute [rw] renamed_services
|
|
333
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
|
334
|
+
# Map of service names to renamed services. Keys are the package relative
|
|
335
|
+
# service names and values are the name to be used for the service client
|
|
336
|
+
# and call options.
|
|
337
|
+
#
|
|
338
|
+
# Example:
|
|
339
|
+
#
|
|
340
|
+
# publishing:
|
|
341
|
+
# go_settings:
|
|
342
|
+
# renamed_services:
|
|
343
|
+
# Publisher: TopicAdmin
|
|
278
344
|
class GoSettings
|
|
279
345
|
include ::Google::Protobuf::MessageExts
|
|
280
346
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
347
|
+
|
|
348
|
+
# @!attribute [rw] key
|
|
349
|
+
# @return [::String]
|
|
350
|
+
# @!attribute [rw] value
|
|
351
|
+
# @return [::String]
|
|
352
|
+
class RenamedServicesEntry
|
|
353
|
+
include ::Google::Protobuf::MessageExts
|
|
354
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
355
|
+
end
|
|
281
356
|
end
|
|
282
357
|
|
|
283
358
|
# Describes the generator configuration for a method.
|
|
@@ -285,6 +360,13 @@ module Google
|
|
|
285
360
|
# @return [::String]
|
|
286
361
|
# The fully qualified name of the method, for which the options below apply.
|
|
287
362
|
# This is used to find the method to apply the options.
|
|
363
|
+
#
|
|
364
|
+
# Example:
|
|
365
|
+
#
|
|
366
|
+
# publishing:
|
|
367
|
+
# method_settings:
|
|
368
|
+
# - selector: google.storage.control.v2.StorageControl.CreateFolder
|
|
369
|
+
# # method settings for CreateFolder...
|
|
288
370
|
# @!attribute [rw] long_running
|
|
289
371
|
# @return [::Google::Api::MethodSettings::LongRunning]
|
|
290
372
|
# Describes settings to use for long-running operations when generating
|
|
@@ -293,17 +375,40 @@ module Google
|
|
|
293
375
|
#
|
|
294
376
|
# Example of a YAML configuration::
|
|
295
377
|
#
|
|
296
|
-
#
|
|
297
|
-
#
|
|
298
|
-
#
|
|
299
|
-
#
|
|
300
|
-
#
|
|
301
|
-
#
|
|
302
|
-
#
|
|
303
|
-
#
|
|
304
|
-
#
|
|
305
|
-
#
|
|
306
|
-
#
|
|
378
|
+
# publishing:
|
|
379
|
+
# method_settings:
|
|
380
|
+
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
|
381
|
+
# long_running:
|
|
382
|
+
# initial_poll_delay: 60s # 1 minute
|
|
383
|
+
# poll_delay_multiplier: 1.5
|
|
384
|
+
# max_poll_delay: 360s # 6 minutes
|
|
385
|
+
# total_poll_timeout: 54000s # 90 minutes
|
|
386
|
+
# @!attribute [rw] auto_populated_fields
|
|
387
|
+
# @return [::Array<::String>]
|
|
388
|
+
# List of top-level fields of the request message, that should be
|
|
389
|
+
# automatically populated by the client libraries based on their
|
|
390
|
+
# (google.api.field_info).format. Currently supported format: UUID4.
|
|
391
|
+
#
|
|
392
|
+
# Example of a YAML configuration:
|
|
393
|
+
#
|
|
394
|
+
# publishing:
|
|
395
|
+
# method_settings:
|
|
396
|
+
# - selector: google.example.v1.ExampleService.CreateExample
|
|
397
|
+
# auto_populated_fields:
|
|
398
|
+
# - request_id
|
|
399
|
+
# @!attribute [rw] batching
|
|
400
|
+
# @return [::Google::Api::BatchingConfigProto]
|
|
401
|
+
# Batching configuration for an API method in client libraries.
|
|
402
|
+
#
|
|
403
|
+
# Example of a YAML configuration:
|
|
404
|
+
#
|
|
405
|
+
# publishing:
|
|
406
|
+
# method_settings:
|
|
407
|
+
# - selector: google.example.v1.ExampleService.BatchCreateExample
|
|
408
|
+
# batching:
|
|
409
|
+
# element_count_threshold: 1000
|
|
410
|
+
# request_byte_threshold: 100000000
|
|
411
|
+
# delay_threshold_millis: 10
|
|
307
412
|
class MethodSettings
|
|
308
413
|
include ::Google::Protobuf::MessageExts
|
|
309
414
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -336,6 +441,98 @@ module Google
|
|
|
336
441
|
end
|
|
337
442
|
end
|
|
338
443
|
|
|
444
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
|
445
|
+
# a service for client libraries.
|
|
446
|
+
#
|
|
447
|
+
# Note: This feature should not be used in most cases.
|
|
448
|
+
# @!attribute [rw] methods
|
|
449
|
+
# @return [::Array<::String>]
|
|
450
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
|
451
|
+
# on public client surfaces.
|
|
452
|
+
# @!attribute [rw] generate_omitted_as_internal
|
|
453
|
+
# @return [::Boolean]
|
|
454
|
+
# Setting this to true indicates to the client generators that methods
|
|
455
|
+
# that would be excluded from the generation should instead be generated
|
|
456
|
+
# in a way that indicates these methods should not be consumed by
|
|
457
|
+
# end users. How this is expressed is up to individual language
|
|
458
|
+
# implementations to decide. Some examples may be: added annotations,
|
|
459
|
+
# obfuscated identifiers, or other language idiomatic patterns.
|
|
460
|
+
class SelectiveGapicGeneration
|
|
461
|
+
include ::Google::Protobuf::MessageExts
|
|
462
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
# `BatchingConfigProto` defines the batching configuration for an API method.
|
|
466
|
+
# @!attribute [rw] thresholds
|
|
467
|
+
# @return [::Google::Api::BatchingSettingsProto]
|
|
468
|
+
# The thresholds which trigger a batched request to be sent.
|
|
469
|
+
# @!attribute [rw] batch_descriptor
|
|
470
|
+
# @return [::Google::Api::BatchingDescriptorProto]
|
|
471
|
+
# The request and response fields used in batching.
|
|
472
|
+
class BatchingConfigProto
|
|
473
|
+
include ::Google::Protobuf::MessageExts
|
|
474
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# `BatchingSettingsProto` specifies a set of batching thresholds, each of
|
|
478
|
+
# which acts as a trigger to send a batch of messages as a request. At least
|
|
479
|
+
# one threshold must be positive nonzero.
|
|
480
|
+
# @!attribute [rw] element_count_threshold
|
|
481
|
+
# @return [::Integer]
|
|
482
|
+
# The number of elements of a field collected into a batch which, if
|
|
483
|
+
# exceeded, causes the batch to be sent.
|
|
484
|
+
# @!attribute [rw] request_byte_threshold
|
|
485
|
+
# @return [::Integer]
|
|
486
|
+
# The aggregated size of the batched field which, if exceeded, causes the
|
|
487
|
+
# batch to be sent. This size is computed by aggregating the sizes of the
|
|
488
|
+
# request field to be batched, not of the entire request message.
|
|
489
|
+
# @!attribute [rw] delay_threshold
|
|
490
|
+
# @return [::Google::Protobuf::Duration]
|
|
491
|
+
# The duration after which a batch should be sent, starting from the addition
|
|
492
|
+
# of the first message to that batch.
|
|
493
|
+
# @!attribute [rw] element_count_limit
|
|
494
|
+
# @return [::Integer]
|
|
495
|
+
# The maximum number of elements collected in a batch that could be accepted
|
|
496
|
+
# by server.
|
|
497
|
+
# @!attribute [rw] request_byte_limit
|
|
498
|
+
# @return [::Integer]
|
|
499
|
+
# The maximum size of the request that could be accepted by server.
|
|
500
|
+
# @!attribute [rw] flow_control_element_limit
|
|
501
|
+
# @return [::Integer]
|
|
502
|
+
# The maximum number of elements allowed by flow control.
|
|
503
|
+
# @!attribute [rw] flow_control_byte_limit
|
|
504
|
+
# @return [::Integer]
|
|
505
|
+
# The maximum size of data allowed by flow control.
|
|
506
|
+
# @!attribute [rw] flow_control_limit_exceeded_behavior
|
|
507
|
+
# @return [::Google::Api::FlowControlLimitExceededBehaviorProto]
|
|
508
|
+
# The behavior to take when the flow control limit is exceeded.
|
|
509
|
+
class BatchingSettingsProto
|
|
510
|
+
include ::Google::Protobuf::MessageExts
|
|
511
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
# `BatchingDescriptorProto` specifies the fields of the request message to be
|
|
515
|
+
# used for batching, and, optionally, the fields of the response message to be
|
|
516
|
+
# used for demultiplexing.
|
|
517
|
+
# @!attribute [rw] batched_field
|
|
518
|
+
# @return [::String]
|
|
519
|
+
# The repeated field in the request message to be aggregated by batching.
|
|
520
|
+
# @!attribute [rw] discriminator_fields
|
|
521
|
+
# @return [::Array<::String>]
|
|
522
|
+
# A list of the fields in the request message. Two requests will be batched
|
|
523
|
+
# together only if the values of every field specified in
|
|
524
|
+
# `request_discriminator_fields` is equal between the two requests.
|
|
525
|
+
# @!attribute [rw] subresponse_field
|
|
526
|
+
# @return [::String]
|
|
527
|
+
# Optional. When present, indicates the field in the response message to be
|
|
528
|
+
# used to demultiplex the response into multiple response messages, in
|
|
529
|
+
# correspondence with the multiple request messages originally batched
|
|
530
|
+
# together.
|
|
531
|
+
class BatchingDescriptorProto
|
|
532
|
+
include ::Google::Protobuf::MessageExts
|
|
533
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
534
|
+
end
|
|
535
|
+
|
|
339
536
|
# The organization for which the client libraries are being published.
|
|
340
537
|
# Affects the url where generated docs are published, etc.
|
|
341
538
|
module ClientLibraryOrganization
|
|
@@ -377,5 +574,20 @@ module Google
|
|
|
377
574
|
# Publish the library to package managers like nuget.org and npmjs.com.
|
|
378
575
|
PACKAGE_MANAGER = 20
|
|
379
576
|
end
|
|
577
|
+
|
|
578
|
+
# The behavior to take when the flow control limit is exceeded.
|
|
579
|
+
module FlowControlLimitExceededBehaviorProto
|
|
580
|
+
# Default behavior, system-defined.
|
|
581
|
+
UNSET_BEHAVIOR = 0
|
|
582
|
+
|
|
583
|
+
# Stop operation, raise error.
|
|
584
|
+
THROW_EXCEPTION = 1
|
|
585
|
+
|
|
586
|
+
# Pause operation until limit clears.
|
|
587
|
+
BLOCK = 2
|
|
588
|
+
|
|
589
|
+
# Continue operation, disregard limit.
|
|
590
|
+
IGNORE = 3
|
|
591
|
+
end
|
|
380
592
|
end
|
|
381
593
|
end
|