google-cloud-developer_connect-v1 1.0.1 → 1.2.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/lib/google/cloud/developer_connect/v1/developer_connect/client.rb +1087 -0
- data/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb +40 -0
- data/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb +1017 -0
- data/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb +613 -0
- data/lib/google/cloud/developer_connect/v1/rest.rb +1 -0
- data/lib/google/cloud/developer_connect/v1/version.rb +1 -1
- data/lib/google/cloud/developer_connect/v1.rb +1 -0
- data/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb +22 -1
- data/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb +20 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_pb.rb +69 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb +956 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb +47 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb +813 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb +69 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb +903 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb +914 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb +388 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb +62 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_service.rb +64 -0
- data/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb +61 -0
- data/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb +515 -8
- data/proto_docs/google/cloud/developerconnect/v1/insights_config.rb +353 -0
- metadata +23 -23
@@ -0,0 +1,956 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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/errors"
|
20
|
+
require "google/cloud/developerconnect/v1/insights_config_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Developerconnect
|
26
|
+
module V1
|
27
|
+
module InsightsConfigService
|
28
|
+
##
|
29
|
+
# Client for the InsightsConfigService service.
|
30
|
+
#
|
31
|
+
# Creates and manages InsightsConfigs.
|
32
|
+
#
|
33
|
+
# The InsightsConfig resource is the core configuration object to capture
|
34
|
+
# events from your Software Development Lifecycle. It acts as the central hub
|
35
|
+
# for managing how Developer connect understands your application, its runtime
|
36
|
+
# environments, and the artifacts deployed within them.
|
37
|
+
# A user can create an InsightsConfig, list previously-requested
|
38
|
+
# InsightsConfigs or get InsightsConfigs by their ID to determine the status of
|
39
|
+
# the InsightsConfig.
|
40
|
+
#
|
41
|
+
class Client
|
42
|
+
# @private
|
43
|
+
API_VERSION = ""
|
44
|
+
|
45
|
+
# @private
|
46
|
+
DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$"
|
47
|
+
|
48
|
+
include Paths
|
49
|
+
|
50
|
+
# @private
|
51
|
+
attr_reader :insights_config_service_stub
|
52
|
+
|
53
|
+
##
|
54
|
+
# Configure the InsightsConfigService Client class.
|
55
|
+
#
|
56
|
+
# See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration}
|
57
|
+
# for a description of the configuration fields.
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
#
|
61
|
+
# # Modify the configuration for all InsightsConfigService clients
|
62
|
+
# ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.configure do |config|
|
63
|
+
# config.timeout = 10.0
|
64
|
+
# end
|
65
|
+
#
|
66
|
+
# @yield [config] Configure the Client client.
|
67
|
+
# @yieldparam config [Client::Configuration]
|
68
|
+
#
|
69
|
+
# @return [Client::Configuration]
|
70
|
+
#
|
71
|
+
def self.configure
|
72
|
+
@configure ||= begin
|
73
|
+
namespace = ["Google", "Cloud", "Developerconnect", "V1"]
|
74
|
+
parent_config = while namespace.any?
|
75
|
+
parent_name = namespace.join "::"
|
76
|
+
parent_const = const_get parent_name
|
77
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
78
|
+
namespace.pop
|
79
|
+
end
|
80
|
+
default_config = Client::Configuration.new parent_config
|
81
|
+
|
82
|
+
default_config
|
83
|
+
end
|
84
|
+
yield @configure if block_given?
|
85
|
+
@configure
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Configure the InsightsConfigService Client instance.
|
90
|
+
#
|
91
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
92
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
93
|
+
# should be made on {Client.configure}.
|
94
|
+
#
|
95
|
+
# See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration}
|
96
|
+
# for a description of the configuration fields.
|
97
|
+
#
|
98
|
+
# @yield [config] Configure the Client client.
|
99
|
+
# @yieldparam config [Client::Configuration]
|
100
|
+
#
|
101
|
+
# @return [Client::Configuration]
|
102
|
+
#
|
103
|
+
def configure
|
104
|
+
yield @config if block_given?
|
105
|
+
@config
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# The effective universe domain
|
110
|
+
#
|
111
|
+
# @return [String]
|
112
|
+
#
|
113
|
+
def universe_domain
|
114
|
+
@insights_config_service_stub.universe_domain
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Create a new InsightsConfigService client object.
|
119
|
+
#
|
120
|
+
# @example
|
121
|
+
#
|
122
|
+
# # Create a client using the default configuration
|
123
|
+
# client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new
|
124
|
+
#
|
125
|
+
# # Create a client using a custom configuration
|
126
|
+
# client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config|
|
127
|
+
# config.timeout = 10.0
|
128
|
+
# end
|
129
|
+
#
|
130
|
+
# @yield [config] Configure the InsightsConfigService client.
|
131
|
+
# @yieldparam config [Client::Configuration]
|
132
|
+
#
|
133
|
+
def initialize
|
134
|
+
# These require statements are intentionally placed here to initialize
|
135
|
+
# the gRPC module only when it's required.
|
136
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
137
|
+
require "gapic/grpc"
|
138
|
+
require "google/cloud/developerconnect/v1/insights_config_services_pb"
|
139
|
+
|
140
|
+
# Create the configuration object
|
141
|
+
@config = Configuration.new Client.configure
|
142
|
+
|
143
|
+
# Yield the configuration if needed
|
144
|
+
yield @config if block_given?
|
145
|
+
|
146
|
+
# Create credentials
|
147
|
+
credentials = @config.credentials
|
148
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
149
|
+
# but only if the default endpoint does not have a region prefix.
|
150
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
151
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
152
|
+
!@config.endpoint.split(".").first.include?("-"))
|
153
|
+
credentials ||= Credentials.default scope: @config.scope,
|
154
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
155
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
156
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
157
|
+
end
|
158
|
+
@quota_project_id = @config.quota_project
|
159
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
160
|
+
|
161
|
+
@operations_client = Operations.new do |config|
|
162
|
+
config.credentials = credentials
|
163
|
+
config.quota_project = @quota_project_id
|
164
|
+
config.endpoint = @config.endpoint
|
165
|
+
config.universe_domain = @config.universe_domain
|
166
|
+
end
|
167
|
+
|
168
|
+
@insights_config_service_stub = ::Gapic::ServiceStub.new(
|
169
|
+
::Google::Cloud::Developerconnect::V1::InsightsConfigService::Stub,
|
170
|
+
credentials: credentials,
|
171
|
+
endpoint: @config.endpoint,
|
172
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
173
|
+
universe_domain: @config.universe_domain,
|
174
|
+
channel_args: @config.channel_args,
|
175
|
+
interceptors: @config.interceptors,
|
176
|
+
channel_pool_config: @config.channel_pool,
|
177
|
+
logger: @config.logger
|
178
|
+
)
|
179
|
+
|
180
|
+
@insights_config_service_stub.stub_logger&.info do |entry|
|
181
|
+
entry.set_system_name
|
182
|
+
entry.set_service
|
183
|
+
entry.message = "Created client for #{entry.service}"
|
184
|
+
entry.set_credentials_fields credentials
|
185
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
186
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
187
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
188
|
+
end
|
189
|
+
|
190
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
191
|
+
config.credentials = credentials
|
192
|
+
config.quota_project = @quota_project_id
|
193
|
+
config.endpoint = @insights_config_service_stub.endpoint
|
194
|
+
config.universe_domain = @insights_config_service_stub.universe_domain
|
195
|
+
config.logger = @insights_config_service_stub.logger if config.respond_to? :logger=
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
##
|
200
|
+
# Get the associated client for long-running operations.
|
201
|
+
#
|
202
|
+
# @return [::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations]
|
203
|
+
#
|
204
|
+
attr_reader :operations_client
|
205
|
+
|
206
|
+
##
|
207
|
+
# Get the associated client for mix-in of the Locations.
|
208
|
+
#
|
209
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
210
|
+
#
|
211
|
+
attr_reader :location_client
|
212
|
+
|
213
|
+
##
|
214
|
+
# The logger used for request/response debug logging.
|
215
|
+
#
|
216
|
+
# @return [Logger]
|
217
|
+
#
|
218
|
+
def logger
|
219
|
+
@insights_config_service_stub.logger
|
220
|
+
end
|
221
|
+
|
222
|
+
# Service calls
|
223
|
+
|
224
|
+
##
|
225
|
+
# Lists InsightsConfigs in a given project and location.
|
226
|
+
#
|
227
|
+
# @overload list_insights_configs(request, options = nil)
|
228
|
+
# Pass arguments to `list_insights_configs` via a request object, either of type
|
229
|
+
# {::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest} or an equivalent Hash.
|
230
|
+
#
|
231
|
+
# @param request [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Hash]
|
232
|
+
# A request object representing the call parameters. Required. To specify no
|
233
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
234
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
235
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
236
|
+
#
|
237
|
+
# @overload list_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
238
|
+
# Pass arguments to `list_insights_configs` via keyword arguments. Note that at
|
239
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
240
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
241
|
+
#
|
242
|
+
# @param parent [::String]
|
243
|
+
# Required. Parent value for ListInsightsConfigsRequest.
|
244
|
+
# @param page_size [::Integer]
|
245
|
+
# Optional. Requested page size. Server may return fewer items than
|
246
|
+
# requested. If unspecified, server will pick an appropriate default.
|
247
|
+
# @param page_token [::String]
|
248
|
+
# Optional. A token identifying a page of results the server should return.
|
249
|
+
# @param filter [::String]
|
250
|
+
# Optional. Filtering results. See https://google.aip.dev/160 for more
|
251
|
+
# details. Filter string, adhering to the rules in
|
252
|
+
# https://google.aip.dev/160. List only InsightsConfigs matching the filter.
|
253
|
+
# If filter is empty, all InsightsConfigs are listed.
|
254
|
+
# @param order_by [::String]
|
255
|
+
# Optional. Hint for how to order the results.
|
256
|
+
#
|
257
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
258
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>]
|
259
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
260
|
+
#
|
261
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>]
|
262
|
+
#
|
263
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
264
|
+
#
|
265
|
+
# @example Basic example
|
266
|
+
# require "google/cloud/developer_connect/v1"
|
267
|
+
#
|
268
|
+
# # Create a client object. The client can be reused for multiple calls.
|
269
|
+
# client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new
|
270
|
+
#
|
271
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
272
|
+
# request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new
|
273
|
+
#
|
274
|
+
# # Call the list_insights_configs method.
|
275
|
+
# result = client.list_insights_configs request
|
276
|
+
#
|
277
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
278
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
279
|
+
# result.each do |item|
|
280
|
+
# # Each element is of type ::Google::Cloud::Developerconnect::V1::InsightsConfig.
|
281
|
+
# p item
|
282
|
+
# end
|
283
|
+
#
|
284
|
+
def list_insights_configs request, options = nil
|
285
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
286
|
+
|
287
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest
|
288
|
+
|
289
|
+
# Converts hash and nil to an options object
|
290
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
291
|
+
|
292
|
+
# Customize the options with defaults
|
293
|
+
metadata = @config.rpcs.list_insights_configs.metadata.to_h
|
294
|
+
|
295
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
296
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
297
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
298
|
+
gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
|
299
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
300
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
301
|
+
|
302
|
+
header_params = {}
|
303
|
+
if request.parent
|
304
|
+
header_params["parent"] = request.parent
|
305
|
+
end
|
306
|
+
|
307
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
308
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
309
|
+
|
310
|
+
options.apply_defaults timeout: @config.rpcs.list_insights_configs.timeout,
|
311
|
+
metadata: metadata,
|
312
|
+
retry_policy: @config.rpcs.list_insights_configs.retry_policy
|
313
|
+
|
314
|
+
options.apply_defaults timeout: @config.timeout,
|
315
|
+
metadata: @config.metadata,
|
316
|
+
retry_policy: @config.retry_policy
|
317
|
+
|
318
|
+
@insights_config_service_stub.call_rpc :list_insights_configs, request, options: options do |response, operation|
|
319
|
+
response = ::Gapic::PagedEnumerable.new @insights_config_service_stub, :list_insights_configs, request, response, operation, options
|
320
|
+
yield response, operation if block_given?
|
321
|
+
throw :response, response
|
322
|
+
end
|
323
|
+
rescue ::GRPC::BadStatus => e
|
324
|
+
raise ::Google::Cloud::Error.from_error(e)
|
325
|
+
end
|
326
|
+
|
327
|
+
##
|
328
|
+
# Creates a new InsightsConfig in a given project and location.
|
329
|
+
#
|
330
|
+
# @overload create_insights_config(request, options = nil)
|
331
|
+
# Pass arguments to `create_insights_config` via a request object, either of type
|
332
|
+
# {::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest} or an equivalent Hash.
|
333
|
+
#
|
334
|
+
# @param request [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Hash]
|
335
|
+
# A request object representing the call parameters. Required. To specify no
|
336
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
337
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
338
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
339
|
+
#
|
340
|
+
# @overload create_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil)
|
341
|
+
# Pass arguments to `create_insights_config` via keyword arguments. Note that at
|
342
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
343
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
344
|
+
#
|
345
|
+
# @param parent [::String]
|
346
|
+
# Required. Value for parent.
|
347
|
+
# @param insights_config_id [::String]
|
348
|
+
# Required. ID of the requesting InsightsConfig.
|
349
|
+
# @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash]
|
350
|
+
# Required. The resource being created.
|
351
|
+
# @param validate_only [::Boolean]
|
352
|
+
# Optional. If set, validate the request, but do not actually post it.
|
353
|
+
#
|
354
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
355
|
+
# @yieldparam response [::Gapic::Operation]
|
356
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
357
|
+
#
|
358
|
+
# @return [::Gapic::Operation]
|
359
|
+
#
|
360
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
361
|
+
#
|
362
|
+
# @example Basic example
|
363
|
+
# require "google/cloud/developer_connect/v1"
|
364
|
+
#
|
365
|
+
# # Create a client object. The client can be reused for multiple calls.
|
366
|
+
# client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new
|
367
|
+
#
|
368
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
369
|
+
# request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new
|
370
|
+
#
|
371
|
+
# # Call the create_insights_config method.
|
372
|
+
# result = client.create_insights_config request
|
373
|
+
#
|
374
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
375
|
+
# # check the status of an operation, cancel it, or wait for results.
|
376
|
+
# # Here is how to wait for a response.
|
377
|
+
# result.wait_until_done! timeout: 60
|
378
|
+
# if result.response?
|
379
|
+
# p result.response
|
380
|
+
# else
|
381
|
+
# puts "No response received."
|
382
|
+
# end
|
383
|
+
#
|
384
|
+
def create_insights_config request, options = nil
|
385
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
386
|
+
|
387
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest
|
388
|
+
|
389
|
+
# Converts hash and nil to an options object
|
390
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
391
|
+
|
392
|
+
# Customize the options with defaults
|
393
|
+
metadata = @config.rpcs.create_insights_config.metadata.to_h
|
394
|
+
|
395
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
396
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
397
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
398
|
+
gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
|
399
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
400
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
401
|
+
|
402
|
+
header_params = {}
|
403
|
+
if request.parent
|
404
|
+
header_params["parent"] = request.parent
|
405
|
+
end
|
406
|
+
|
407
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
408
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
409
|
+
|
410
|
+
options.apply_defaults timeout: @config.rpcs.create_insights_config.timeout,
|
411
|
+
metadata: metadata,
|
412
|
+
retry_policy: @config.rpcs.create_insights_config.retry_policy
|
413
|
+
|
414
|
+
options.apply_defaults timeout: @config.timeout,
|
415
|
+
metadata: @config.metadata,
|
416
|
+
retry_policy: @config.retry_policy
|
417
|
+
|
418
|
+
@insights_config_service_stub.call_rpc :create_insights_config, request, options: options do |response, operation|
|
419
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
420
|
+
yield response, operation if block_given?
|
421
|
+
throw :response, response
|
422
|
+
end
|
423
|
+
rescue ::GRPC::BadStatus => e
|
424
|
+
raise ::Google::Cloud::Error.from_error(e)
|
425
|
+
end
|
426
|
+
|
427
|
+
##
|
428
|
+
# Gets details of a single Insight.
|
429
|
+
#
|
430
|
+
# @overload get_insights_config(request, options = nil)
|
431
|
+
# Pass arguments to `get_insights_config` via a request object, either of type
|
432
|
+
# {::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest} or an equivalent Hash.
|
433
|
+
#
|
434
|
+
# @param request [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Hash]
|
435
|
+
# A request object representing the call parameters. Required. To specify no
|
436
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
437
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
438
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
439
|
+
#
|
440
|
+
# @overload get_insights_config(name: nil)
|
441
|
+
# Pass arguments to `get_insights_config` via keyword arguments. Note that at
|
442
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
443
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
444
|
+
#
|
445
|
+
# @param name [::String]
|
446
|
+
# Required. Name of the resource.
|
447
|
+
#
|
448
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
449
|
+
# @yieldparam response [::Google::Cloud::Developerconnect::V1::InsightsConfig]
|
450
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
451
|
+
#
|
452
|
+
# @return [::Google::Cloud::Developerconnect::V1::InsightsConfig]
|
453
|
+
#
|
454
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
455
|
+
#
|
456
|
+
# @example Basic example
|
457
|
+
# require "google/cloud/developer_connect/v1"
|
458
|
+
#
|
459
|
+
# # Create a client object. The client can be reused for multiple calls.
|
460
|
+
# client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new
|
461
|
+
#
|
462
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
463
|
+
# request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new
|
464
|
+
#
|
465
|
+
# # Call the get_insights_config method.
|
466
|
+
# result = client.get_insights_config request
|
467
|
+
#
|
468
|
+
# # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig.
|
469
|
+
# p result
|
470
|
+
#
|
471
|
+
def get_insights_config request, options = nil
|
472
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
473
|
+
|
474
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest
|
475
|
+
|
476
|
+
# Converts hash and nil to an options object
|
477
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
478
|
+
|
479
|
+
# Customize the options with defaults
|
480
|
+
metadata = @config.rpcs.get_insights_config.metadata.to_h
|
481
|
+
|
482
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
483
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
484
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
485
|
+
gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
|
486
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
487
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
488
|
+
|
489
|
+
header_params = {}
|
490
|
+
if request.name
|
491
|
+
header_params["name"] = request.name
|
492
|
+
end
|
493
|
+
|
494
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
495
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
496
|
+
|
497
|
+
options.apply_defaults timeout: @config.rpcs.get_insights_config.timeout,
|
498
|
+
metadata: metadata,
|
499
|
+
retry_policy: @config.rpcs.get_insights_config.retry_policy
|
500
|
+
|
501
|
+
options.apply_defaults timeout: @config.timeout,
|
502
|
+
metadata: @config.metadata,
|
503
|
+
retry_policy: @config.retry_policy
|
504
|
+
|
505
|
+
@insights_config_service_stub.call_rpc :get_insights_config, request, options: options do |response, operation|
|
506
|
+
yield response, operation if block_given?
|
507
|
+
end
|
508
|
+
rescue ::GRPC::BadStatus => e
|
509
|
+
raise ::Google::Cloud::Error.from_error(e)
|
510
|
+
end
|
511
|
+
|
512
|
+
##
|
513
|
+
# Updates the parameters of a single InsightsConfig.
|
514
|
+
#
|
515
|
+
# @overload update_insights_config(request, options = nil)
|
516
|
+
# Pass arguments to `update_insights_config` via a request object, either of type
|
517
|
+
# {::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest} or an equivalent Hash.
|
518
|
+
#
|
519
|
+
# @param request [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Hash]
|
520
|
+
# A request object representing the call parameters. Required. To specify no
|
521
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
522
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
523
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
524
|
+
#
|
525
|
+
# @overload update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil)
|
526
|
+
# Pass arguments to `update_insights_config` via keyword arguments. Note that at
|
527
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
528
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
529
|
+
#
|
530
|
+
# @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash]
|
531
|
+
# Required. The resource being updated.
|
532
|
+
# @param request_id [::String]
|
533
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
534
|
+
# request ID so that if you must retry your request, the server will know to
|
535
|
+
# ignore the request if it has already been completed. The server will
|
536
|
+
# guarantee that for at least 60 minutes after the first request.
|
537
|
+
#
|
538
|
+
# For example, consider a situation where you make an initial request and the
|
539
|
+
# request times out. If you make the request again with the same request
|
540
|
+
# ID, the server can check if original operation with the same request ID
|
541
|
+
# was received, and if so, will ignore the second request. This prevents
|
542
|
+
# clients from accidentally creating duplicate commitments.
|
543
|
+
#
|
544
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
545
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
546
|
+
# @param allow_missing [::Boolean]
|
547
|
+
# Optional. If set to true, and the insightsConfig is not found a new
|
548
|
+
# insightsConfig will be created. In this situation `update_mask` is ignored.
|
549
|
+
# The creation will succeed only if the input insightsConfig has all the
|
550
|
+
# necessary information (e.g a github_config with both user_oauth_token and
|
551
|
+
# installation_id properties).
|
552
|
+
# @param validate_only [::Boolean]
|
553
|
+
# Optional. If set, validate the request, but do not actually post it.
|
554
|
+
#
|
555
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
556
|
+
# @yieldparam response [::Gapic::Operation]
|
557
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
558
|
+
#
|
559
|
+
# @return [::Gapic::Operation]
|
560
|
+
#
|
561
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
562
|
+
#
|
563
|
+
# @example Basic example
|
564
|
+
# require "google/cloud/developer_connect/v1"
|
565
|
+
#
|
566
|
+
# # Create a client object. The client can be reused for multiple calls.
|
567
|
+
# client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new
|
568
|
+
#
|
569
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
570
|
+
# request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new
|
571
|
+
#
|
572
|
+
# # Call the update_insights_config method.
|
573
|
+
# result = client.update_insights_config request
|
574
|
+
#
|
575
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
576
|
+
# # check the status of an operation, cancel it, or wait for results.
|
577
|
+
# # Here is how to wait for a response.
|
578
|
+
# result.wait_until_done! timeout: 60
|
579
|
+
# if result.response?
|
580
|
+
# p result.response
|
581
|
+
# else
|
582
|
+
# puts "No response received."
|
583
|
+
# end
|
584
|
+
#
|
585
|
+
def update_insights_config request, options = nil
|
586
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
587
|
+
|
588
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest
|
589
|
+
|
590
|
+
# Converts hash and nil to an options object
|
591
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
592
|
+
|
593
|
+
# Customize the options with defaults
|
594
|
+
metadata = @config.rpcs.update_insights_config.metadata.to_h
|
595
|
+
|
596
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
597
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
598
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
599
|
+
gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
|
600
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
601
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
602
|
+
|
603
|
+
header_params = {}
|
604
|
+
if request.insights_config&.name
|
605
|
+
header_params["insights_config.name"] = request.insights_config.name
|
606
|
+
end
|
607
|
+
|
608
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
609
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
610
|
+
|
611
|
+
options.apply_defaults timeout: @config.rpcs.update_insights_config.timeout,
|
612
|
+
metadata: metadata,
|
613
|
+
retry_policy: @config.rpcs.update_insights_config.retry_policy
|
614
|
+
|
615
|
+
options.apply_defaults timeout: @config.timeout,
|
616
|
+
metadata: @config.metadata,
|
617
|
+
retry_policy: @config.retry_policy
|
618
|
+
|
619
|
+
@insights_config_service_stub.call_rpc :update_insights_config, request, options: options do |response, operation|
|
620
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
621
|
+
yield response, operation if block_given?
|
622
|
+
throw :response, response
|
623
|
+
end
|
624
|
+
rescue ::GRPC::BadStatus => e
|
625
|
+
raise ::Google::Cloud::Error.from_error(e)
|
626
|
+
end
|
627
|
+
|
628
|
+
##
|
629
|
+
# Delete a single Insight.
|
630
|
+
#
|
631
|
+
# @overload delete_insights_config(request, options = nil)
|
632
|
+
# Pass arguments to `delete_insights_config` via a request object, either of type
|
633
|
+
# {::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest} or an equivalent Hash.
|
634
|
+
#
|
635
|
+
# @param request [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Hash]
|
636
|
+
# A request object representing the call parameters. Required. To specify no
|
637
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
638
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
639
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
640
|
+
#
|
641
|
+
# @overload delete_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil)
|
642
|
+
# Pass arguments to `delete_insights_config` via keyword arguments. Note that at
|
643
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
644
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
645
|
+
#
|
646
|
+
# @param name [::String]
|
647
|
+
# Required. Value for parent.
|
648
|
+
# @param request_id [::String]
|
649
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
650
|
+
# request ID so that if you must retry your request, the server will know to
|
651
|
+
# ignore the request if it has already been completed. The server will
|
652
|
+
# guarantee that for at least 60 minutes after the first request.
|
653
|
+
#
|
654
|
+
# For example, consider a situation where you make an initial request and the
|
655
|
+
# request times out. If you make the request again with the same request
|
656
|
+
# ID, the server can check if original operation with the same request ID
|
657
|
+
# was received, and if so, will ignore the second request. This prevents
|
658
|
+
# clients from accidentally creating duplicate commitments.
|
659
|
+
#
|
660
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
661
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
662
|
+
# @param validate_only [::Boolean]
|
663
|
+
# Optional. If set, validate the request, but do not actually post it.
|
664
|
+
# @param etag [::String]
|
665
|
+
# Optional. This checksum is computed by the server based on the value of
|
666
|
+
# other fields, and may be sent on update and delete requests to ensure the
|
667
|
+
# client has an up-to-date value before proceeding.
|
668
|
+
#
|
669
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
670
|
+
# @yieldparam response [::Gapic::Operation]
|
671
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
672
|
+
#
|
673
|
+
# @return [::Gapic::Operation]
|
674
|
+
#
|
675
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
676
|
+
#
|
677
|
+
# @example Basic example
|
678
|
+
# require "google/cloud/developer_connect/v1"
|
679
|
+
#
|
680
|
+
# # Create a client object. The client can be reused for multiple calls.
|
681
|
+
# client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new
|
682
|
+
#
|
683
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
684
|
+
# request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new
|
685
|
+
#
|
686
|
+
# # Call the delete_insights_config method.
|
687
|
+
# result = client.delete_insights_config request
|
688
|
+
#
|
689
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
690
|
+
# # check the status of an operation, cancel it, or wait for results.
|
691
|
+
# # Here is how to wait for a response.
|
692
|
+
# result.wait_until_done! timeout: 60
|
693
|
+
# if result.response?
|
694
|
+
# p result.response
|
695
|
+
# else
|
696
|
+
# puts "No response received."
|
697
|
+
# end
|
698
|
+
#
|
699
|
+
def delete_insights_config request, options = nil
|
700
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
701
|
+
|
702
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest
|
703
|
+
|
704
|
+
# Converts hash and nil to an options object
|
705
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
706
|
+
|
707
|
+
# Customize the options with defaults
|
708
|
+
metadata = @config.rpcs.delete_insights_config.metadata.to_h
|
709
|
+
|
710
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
711
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
712
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
713
|
+
gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
|
714
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
715
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
716
|
+
|
717
|
+
header_params = {}
|
718
|
+
if request.name
|
719
|
+
header_params["name"] = request.name
|
720
|
+
end
|
721
|
+
|
722
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
723
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
724
|
+
|
725
|
+
options.apply_defaults timeout: @config.rpcs.delete_insights_config.timeout,
|
726
|
+
metadata: metadata,
|
727
|
+
retry_policy: @config.rpcs.delete_insights_config.retry_policy
|
728
|
+
|
729
|
+
options.apply_defaults timeout: @config.timeout,
|
730
|
+
metadata: @config.metadata,
|
731
|
+
retry_policy: @config.retry_policy
|
732
|
+
|
733
|
+
@insights_config_service_stub.call_rpc :delete_insights_config, request, options: options do |response, operation|
|
734
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
735
|
+
yield response, operation if block_given?
|
736
|
+
throw :response, response
|
737
|
+
end
|
738
|
+
rescue ::GRPC::BadStatus => e
|
739
|
+
raise ::Google::Cloud::Error.from_error(e)
|
740
|
+
end
|
741
|
+
|
742
|
+
##
|
743
|
+
# Configuration class for the InsightsConfigService API.
|
744
|
+
#
|
745
|
+
# This class represents the configuration for InsightsConfigService,
|
746
|
+
# providing control over timeouts, retry behavior, logging, transport
|
747
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
748
|
+
# applied individually to specific RPCs. See
|
749
|
+
# {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration::Rpcs}
|
750
|
+
# for a list of RPCs that can be configured independently.
|
751
|
+
#
|
752
|
+
# Configuration can be applied globally to all clients, or to a single client
|
753
|
+
# on construction.
|
754
|
+
#
|
755
|
+
# @example
|
756
|
+
#
|
757
|
+
# # Modify the global config, setting the timeout for
|
758
|
+
# # list_insights_configs to 20 seconds,
|
759
|
+
# # and all remaining timeouts to 10 seconds.
|
760
|
+
# ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.configure do |config|
|
761
|
+
# config.timeout = 10.0
|
762
|
+
# config.rpcs.list_insights_configs.timeout = 20.0
|
763
|
+
# end
|
764
|
+
#
|
765
|
+
# # Apply the above configuration only to a new client.
|
766
|
+
# client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config|
|
767
|
+
# config.timeout = 10.0
|
768
|
+
# config.rpcs.list_insights_configs.timeout = 20.0
|
769
|
+
# end
|
770
|
+
#
|
771
|
+
# @!attribute [rw] endpoint
|
772
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
773
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
774
|
+
# @return [::String,nil]
|
775
|
+
# @!attribute [rw] credentials
|
776
|
+
# Credentials to send with calls. You may provide any of the following types:
|
777
|
+
# * (`String`) The path to a service account key file in JSON format
|
778
|
+
# * (`Hash`) A service account key as a Hash
|
779
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
780
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
781
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
782
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
783
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
784
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
785
|
+
# * (`nil`) indicating no credentials
|
786
|
+
#
|
787
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
788
|
+
# external source for authentication to Google Cloud, you must validate it before
|
789
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
790
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
791
|
+
# For more information, refer to [Validate credential configurations from external
|
792
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
793
|
+
# @return [::Object]
|
794
|
+
# @!attribute [rw] scope
|
795
|
+
# The OAuth scopes
|
796
|
+
# @return [::Array<::String>]
|
797
|
+
# @!attribute [rw] lib_name
|
798
|
+
# The library name as recorded in instrumentation and logging
|
799
|
+
# @return [::String]
|
800
|
+
# @!attribute [rw] lib_version
|
801
|
+
# The library version as recorded in instrumentation and logging
|
802
|
+
# @return [::String]
|
803
|
+
# @!attribute [rw] channel_args
|
804
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
805
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
806
|
+
# @return [::Hash]
|
807
|
+
# @!attribute [rw] interceptors
|
808
|
+
# An array of interceptors that are run before calls are executed.
|
809
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
810
|
+
# @!attribute [rw] timeout
|
811
|
+
# The call timeout in seconds.
|
812
|
+
# @return [::Numeric]
|
813
|
+
# @!attribute [rw] metadata
|
814
|
+
# Additional gRPC headers to be sent with the call.
|
815
|
+
# @return [::Hash{::Symbol=>::String}]
|
816
|
+
# @!attribute [rw] retry_policy
|
817
|
+
# The retry policy. The value is a hash with the following keys:
|
818
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
819
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
820
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
821
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
822
|
+
# trigger a retry.
|
823
|
+
# @return [::Hash]
|
824
|
+
# @!attribute [rw] quota_project
|
825
|
+
# A separate project against which to charge quota.
|
826
|
+
# @return [::String]
|
827
|
+
# @!attribute [rw] universe_domain
|
828
|
+
# The universe domain within which to make requests. This determines the
|
829
|
+
# default endpoint URL. The default value of nil uses the environment
|
830
|
+
# universe (usually the default "googleapis.com" universe).
|
831
|
+
# @return [::String,nil]
|
832
|
+
# @!attribute [rw] logger
|
833
|
+
# A custom logger to use for request/response debug logging, or the value
|
834
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
835
|
+
# explicitly disable logging.
|
836
|
+
# @return [::Logger,:default,nil]
|
837
|
+
#
|
838
|
+
class Configuration
|
839
|
+
extend ::Gapic::Config
|
840
|
+
|
841
|
+
# @private
|
842
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
843
|
+
DEFAULT_ENDPOINT = "developerconnect.googleapis.com"
|
844
|
+
|
845
|
+
config_attr :endpoint, nil, ::String, nil
|
846
|
+
config_attr :credentials, nil do |value|
|
847
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
848
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
849
|
+
allowed.any? { |klass| klass === value }
|
850
|
+
end
|
851
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
852
|
+
config_attr :lib_name, nil, ::String, nil
|
853
|
+
config_attr :lib_version, nil, ::String, nil
|
854
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
855
|
+
config_attr :interceptors, nil, ::Array, nil
|
856
|
+
config_attr :timeout, nil, ::Numeric, nil
|
857
|
+
config_attr :metadata, nil, ::Hash, nil
|
858
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
859
|
+
config_attr :quota_project, nil, ::String, nil
|
860
|
+
config_attr :universe_domain, nil, ::String, nil
|
861
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
862
|
+
|
863
|
+
# @private
|
864
|
+
def initialize parent_config = nil
|
865
|
+
@parent_config = parent_config unless parent_config.nil?
|
866
|
+
|
867
|
+
yield self if block_given?
|
868
|
+
end
|
869
|
+
|
870
|
+
##
|
871
|
+
# Configurations for individual RPCs
|
872
|
+
# @return [Rpcs]
|
873
|
+
#
|
874
|
+
def rpcs
|
875
|
+
@rpcs ||= begin
|
876
|
+
parent_rpcs = nil
|
877
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
878
|
+
Rpcs.new parent_rpcs
|
879
|
+
end
|
880
|
+
end
|
881
|
+
|
882
|
+
##
|
883
|
+
# Configuration for the channel pool
|
884
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
885
|
+
#
|
886
|
+
def channel_pool
|
887
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
888
|
+
end
|
889
|
+
|
890
|
+
##
|
891
|
+
# Configuration RPC class for the InsightsConfigService API.
|
892
|
+
#
|
893
|
+
# Includes fields providing the configuration for each RPC in this service.
|
894
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
895
|
+
# the following configuration fields:
|
896
|
+
#
|
897
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
898
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
899
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
900
|
+
# include the following keys:
|
901
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
902
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
903
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
904
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
905
|
+
# trigger a retry.
|
906
|
+
#
|
907
|
+
class Rpcs
|
908
|
+
##
|
909
|
+
# RPC-specific configuration for `list_insights_configs`
|
910
|
+
# @return [::Gapic::Config::Method]
|
911
|
+
#
|
912
|
+
attr_reader :list_insights_configs
|
913
|
+
##
|
914
|
+
# RPC-specific configuration for `create_insights_config`
|
915
|
+
# @return [::Gapic::Config::Method]
|
916
|
+
#
|
917
|
+
attr_reader :create_insights_config
|
918
|
+
##
|
919
|
+
# RPC-specific configuration for `get_insights_config`
|
920
|
+
# @return [::Gapic::Config::Method]
|
921
|
+
#
|
922
|
+
attr_reader :get_insights_config
|
923
|
+
##
|
924
|
+
# RPC-specific configuration for `update_insights_config`
|
925
|
+
# @return [::Gapic::Config::Method]
|
926
|
+
#
|
927
|
+
attr_reader :update_insights_config
|
928
|
+
##
|
929
|
+
# RPC-specific configuration for `delete_insights_config`
|
930
|
+
# @return [::Gapic::Config::Method]
|
931
|
+
#
|
932
|
+
attr_reader :delete_insights_config
|
933
|
+
|
934
|
+
# @private
|
935
|
+
def initialize parent_rpcs = nil
|
936
|
+
list_insights_configs_config = parent_rpcs.list_insights_configs if parent_rpcs.respond_to? :list_insights_configs
|
937
|
+
@list_insights_configs = ::Gapic::Config::Method.new list_insights_configs_config
|
938
|
+
create_insights_config_config = parent_rpcs.create_insights_config if parent_rpcs.respond_to? :create_insights_config
|
939
|
+
@create_insights_config = ::Gapic::Config::Method.new create_insights_config_config
|
940
|
+
get_insights_config_config = parent_rpcs.get_insights_config if parent_rpcs.respond_to? :get_insights_config
|
941
|
+
@get_insights_config = ::Gapic::Config::Method.new get_insights_config_config
|
942
|
+
update_insights_config_config = parent_rpcs.update_insights_config if parent_rpcs.respond_to? :update_insights_config
|
943
|
+
@update_insights_config = ::Gapic::Config::Method.new update_insights_config_config
|
944
|
+
delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config
|
945
|
+
@delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config
|
946
|
+
|
947
|
+
yield self if block_given?
|
948
|
+
end
|
949
|
+
end
|
950
|
+
end
|
951
|
+
end
|
952
|
+
end
|
953
|
+
end
|
954
|
+
end
|
955
|
+
end
|
956
|
+
end
|