google-cloud-debugger-v2 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d0d6fb7f74e3bb8b8c80e5bdfb1923c5ff05c341d2563f7ce8331ec28c01a16
4
- data.tar.gz: 5ed8ce07a53e4e05e07f64474ce90e4663621772350b7b79a4d0217021c86bc6
3
+ metadata.gz: 43b17d3d8af8517dc60116251089fbbeaa8bb95daca51435bf680d5798bb46fb
4
+ data.tar.gz: 138ea1e48659d088445e4fc49a658d14f8a06794510991fe8ef9cce6bbd2937c
5
5
  SHA512:
6
- metadata.gz: '048f6da1467826257328f2ed585daf0e5ed0830da152c72ddcdf62deea8d4db98463d31139b569ef8332fe39d517c39945105c3460f87535e3aecaaebde426a5'
7
- data.tar.gz: b3a88d6ceebaecba2697ae7c2c8b5260c6d39789e2576544da3df19cccb4b4445decdcceb2f0ccdfa9c73fadedb5772191f79c5b5107202e692cc6791267c33b
6
+ metadata.gz: 21a1d99f193e2e3a6a1f3efc4c2380fd88a8802a5313459f3c73cf274c55b437a111a758a8b5fb1718cf7fbd6c91ccefaef2f9f3e3cfb297a0a2227adb113c9b
7
+ data.tar.gz: f8a355a4c5979e2f6c5021a50a14237287013ca70aecb03aefa2afcd9fd39080fd181b1667976155e9bbdb084a4af11d7c3f1c7829ec991a990e386cce0adddf
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Debugger V2 API
2
2
 
3
- API Client library for the Cloud Debugger V2 API
3
+ Examines the call stack and variables of a running application without stopping or slowing it down.
4
4
 
5
5
  The Cloud Debugger API allows applications to interact with the Google Cloud Debugger backends. It provides two interfaces: the Debugger interface and the Controller interface. The Controller interface allows you to implement an agent that sends state data -- for example, the value of program variables and the call stack -- to Cloud Debugger when the application is running. The Debugger interface allows you to implement a Cloud Debugger client that allows users to set and delete the breakpoints at which the state data is collected, as well as read the data that is captured.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -0,0 +1,557 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/devtools/clouddebugger/v2/controller_pb"
21
+ require "google/cloud/debugger/v2/controller/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Debugger
26
+ module V2
27
+ module Controller
28
+ module Rest
29
+ ##
30
+ # REST client for the Controller service.
31
+ #
32
+ # The Controller service provides the API for orchestrating a collection of
33
+ # debugger agents to perform debugging tasks. These agents are each attached
34
+ # to a process of an application which may include one or more replicas.
35
+ #
36
+ # The debugger agents register with the Controller to identify the application
37
+ # being debugged, the Debuggee. All agents that register with the same data,
38
+ # represent the same Debuggee, and are assigned the same `debuggee_id`.
39
+ #
40
+ # The debugger agents call the Controller to retrieve the list of active
41
+ # Breakpoints. Agents with the same `debuggee_id` get the same breakpoints
42
+ # list. An agent that can fulfill the breakpoint request updates the
43
+ # Controller with the breakpoint result. The controller selects the first
44
+ # result received and discards the rest of the results.
45
+ # Agents that poll again for active breakpoints will no longer have
46
+ # the completed breakpoint in the list and should remove that breakpoint from
47
+ # their attached process.
48
+ #
49
+ # The Controller service does not provide a way to retrieve the results of
50
+ # a completed breakpoint. This functionality is available using the Debugger
51
+ # service.
52
+ #
53
+ class Client
54
+ # @private
55
+ attr_reader :controller_stub
56
+
57
+ ##
58
+ # Configure the Controller Client class.
59
+ #
60
+ # See {::Google::Cloud::Debugger::V2::Controller::Rest::Client::Configuration}
61
+ # for a description of the configuration fields.
62
+ #
63
+ # @example
64
+ #
65
+ # # Modify the configuration for all Controller clients
66
+ # ::Google::Cloud::Debugger::V2::Controller::Rest::Client.configure do |config|
67
+ # config.timeout = 10.0
68
+ # end
69
+ #
70
+ # @yield [config] Configure the Client client.
71
+ # @yieldparam config [Client::Configuration]
72
+ #
73
+ # @return [Client::Configuration]
74
+ #
75
+ def self.configure
76
+ @configure ||= begin
77
+ namespace = ["Google", "Cloud", "Debugger", "V2"]
78
+ parent_config = while namespace.any?
79
+ parent_name = namespace.join "::"
80
+ parent_const = const_get parent_name
81
+ break parent_const.configure if parent_const.respond_to? :configure
82
+ namespace.pop
83
+ end
84
+ default_config = Client::Configuration.new parent_config
85
+
86
+ default_config.rpcs.register_debuggee.timeout = 600.0
87
+
88
+ default_config.rpcs.list_active_breakpoints.timeout = 600.0
89
+ default_config.rpcs.list_active_breakpoints.retry_policy = {
90
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
91
+ }
92
+
93
+ default_config.rpcs.update_active_breakpoint.timeout = 600.0
94
+ default_config.rpcs.update_active_breakpoint.retry_policy = {
95
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
96
+ }
97
+
98
+ default_config
99
+ end
100
+ yield @configure if block_given?
101
+ @configure
102
+ end
103
+
104
+ ##
105
+ # Configure the Controller Client instance.
106
+ #
107
+ # The configuration is set to the derived mode, meaning that values can be changed,
108
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
109
+ # should be made on {Client.configure}.
110
+ #
111
+ # See {::Google::Cloud::Debugger::V2::Controller::Rest::Client::Configuration}
112
+ # for a description of the configuration fields.
113
+ #
114
+ # @yield [config] Configure the Client client.
115
+ # @yieldparam config [Client::Configuration]
116
+ #
117
+ # @return [Client::Configuration]
118
+ #
119
+ def configure
120
+ yield @config if block_given?
121
+ @config
122
+ end
123
+
124
+ ##
125
+ # Create a new Controller REST client object.
126
+ #
127
+ # @example
128
+ #
129
+ # # Create a client using the default configuration
130
+ # client = ::Google::Cloud::Debugger::V2::Controller::Rest::Client.new
131
+ #
132
+ # # Create a client using a custom configuration
133
+ # client = ::Google::Cloud::Debugger::V2::Controller::Rest::Client.new do |config|
134
+ # config.timeout = 10.0
135
+ # end
136
+ #
137
+ # @yield [config] Configure the Controller client.
138
+ # @yieldparam config [Client::Configuration]
139
+ #
140
+ def initialize
141
+ # Create the configuration object
142
+ @config = Configuration.new Client.configure
143
+
144
+ # Yield the configuration if needed
145
+ yield @config if block_given?
146
+
147
+ # Create credentials
148
+ credentials = @config.credentials
149
+ # Use self-signed JWT if the endpoint is unchanged from default,
150
+ # but only if the default endpoint does not have a region prefix.
151
+ enable_self_signed_jwt = @config.endpoint == Client.configure.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
+
159
+ @quota_project_id = @config.quota_project
160
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
161
+
162
+ @controller_stub = ::Google::Cloud::Debugger::V2::Controller::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
163
+ end
164
+
165
+ # Service calls
166
+
167
+ ##
168
+ # Registers the debuggee with the controller service.
169
+ #
170
+ # All agents attached to the same application must call this method with
171
+ # exactly the same request content to get back the same stable `debuggee_id`.
172
+ # Agents should call this method again whenever `google.rpc.Code.NOT_FOUND`
173
+ # is returned from any controller method.
174
+ #
175
+ # This protocol allows the controller service to disable debuggees, recover
176
+ # from data loss, or change the `debuggee_id` format. Agents must handle
177
+ # `debuggee_id` value changing upon re-registration.
178
+ #
179
+ # @overload register_debuggee(request, options = nil)
180
+ # Pass arguments to `register_debuggee` via a request object, either of type
181
+ # {::Google::Cloud::Debugger::V2::RegisterDebuggeeRequest} or an equivalent Hash.
182
+ #
183
+ # @param request [::Google::Cloud::Debugger::V2::RegisterDebuggeeRequest, ::Hash]
184
+ # A request object representing the call parameters. Required. To specify no
185
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
186
+ # @param options [::Gapic::CallOptions, ::Hash]
187
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
188
+ #
189
+ # @overload register_debuggee(debuggee: nil)
190
+ # Pass arguments to `register_debuggee` via keyword arguments. Note that at
191
+ # least one keyword argument is required. To specify no parameters, or to keep all
192
+ # the default parameter values, pass an empty Hash as a request object (see above).
193
+ #
194
+ # @param debuggee [::Google::Cloud::Debugger::V2::Debuggee, ::Hash]
195
+ # Required. Debuggee information to register.
196
+ # The fields `project`, `uniquifier`, `description` and `agent_version`
197
+ # of the debuggee must be set.
198
+ # @yield [result, operation] Access the result along with the TransportOperation object
199
+ # @yieldparam result [::Google::Cloud::Debugger::V2::RegisterDebuggeeResponse]
200
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
201
+ #
202
+ # @return [::Google::Cloud::Debugger::V2::RegisterDebuggeeResponse]
203
+ #
204
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
205
+ def register_debuggee request, options = nil
206
+ raise ::ArgumentError, "request must be provided" if request.nil?
207
+
208
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Debugger::V2::RegisterDebuggeeRequest
209
+
210
+ # Converts hash and nil to an options object
211
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
212
+
213
+ # Customize the options with defaults
214
+ call_metadata = @config.rpcs.register_debuggee.metadata.to_h
215
+
216
+ # Set x-goog-api-client and x-goog-user-project headers
217
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
218
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
219
+ gapic_version: ::Google::Cloud::Debugger::V2::VERSION,
220
+ transports_version_send: [:rest]
221
+
222
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
223
+
224
+ options.apply_defaults timeout: @config.rpcs.register_debuggee.timeout,
225
+ metadata: call_metadata,
226
+ retry_policy: @config.rpcs.register_debuggee.retry_policy
227
+
228
+ options.apply_defaults timeout: @config.timeout,
229
+ metadata: @config.metadata,
230
+ retry_policy: @config.retry_policy
231
+
232
+ @controller_stub.register_debuggee request, options do |result, operation|
233
+ yield result, operation if block_given?
234
+ return result
235
+ end
236
+ rescue ::Gapic::Rest::Error => e
237
+ raise ::Google::Cloud::Error.from_error(e)
238
+ end
239
+
240
+ ##
241
+ # Returns the list of all active breakpoints for the debuggee.
242
+ #
243
+ # The breakpoint specification (`location`, `condition`, and `expressions`
244
+ # fields) is semantically immutable, although the field values may
245
+ # change. For example, an agent may update the location line number
246
+ # to reflect the actual line where the breakpoint was set, but this
247
+ # doesn't change the breakpoint semantics.
248
+ #
249
+ # This means that an agent does not need to check if a breakpoint has changed
250
+ # when it encounters the same breakpoint on a successive call.
251
+ # Moreover, an agent should remember the breakpoints that are completed
252
+ # until the controller removes them from the active list to avoid
253
+ # setting those breakpoints again.
254
+ #
255
+ # @overload list_active_breakpoints(request, options = nil)
256
+ # Pass arguments to `list_active_breakpoints` via a request object, either of type
257
+ # {::Google::Cloud::Debugger::V2::ListActiveBreakpointsRequest} or an equivalent Hash.
258
+ #
259
+ # @param request [::Google::Cloud::Debugger::V2::ListActiveBreakpointsRequest, ::Hash]
260
+ # A request object representing the call parameters. Required. To specify no
261
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
262
+ # @param options [::Gapic::CallOptions, ::Hash]
263
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
264
+ #
265
+ # @overload list_active_breakpoints(debuggee_id: nil, wait_token: nil, success_on_timeout: nil)
266
+ # Pass arguments to `list_active_breakpoints` via keyword arguments. Note that at
267
+ # least one keyword argument is required. To specify no parameters, or to keep all
268
+ # the default parameter values, pass an empty Hash as a request object (see above).
269
+ #
270
+ # @param debuggee_id [::String]
271
+ # Required. Identifies the debuggee.
272
+ # @param wait_token [::String]
273
+ # A token that, if specified, blocks the method call until the list
274
+ # of active breakpoints has changed, or a server-selected timeout has
275
+ # expired. The value should be set from the `next_wait_token` field in
276
+ # the last response. The initial value should be set to `"init"`.
277
+ # @param success_on_timeout [::Boolean]
278
+ # If set to `true` (recommended), returns `google.rpc.Code.OK` status and
279
+ # sets the `wait_expired` response field to `true` when the server-selected
280
+ # timeout has expired.
281
+ #
282
+ # If set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status
283
+ # when the server-selected timeout has expired.
284
+ # @yield [result, operation] Access the result along with the TransportOperation object
285
+ # @yieldparam result [::Google::Cloud::Debugger::V2::ListActiveBreakpointsResponse]
286
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
287
+ #
288
+ # @return [::Google::Cloud::Debugger::V2::ListActiveBreakpointsResponse]
289
+ #
290
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
291
+ def list_active_breakpoints request, options = nil
292
+ raise ::ArgumentError, "request must be provided" if request.nil?
293
+
294
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Debugger::V2::ListActiveBreakpointsRequest
295
+
296
+ # Converts hash and nil to an options object
297
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
298
+
299
+ # Customize the options with defaults
300
+ call_metadata = @config.rpcs.list_active_breakpoints.metadata.to_h
301
+
302
+ # Set x-goog-api-client and x-goog-user-project headers
303
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
304
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
305
+ gapic_version: ::Google::Cloud::Debugger::V2::VERSION,
306
+ transports_version_send: [:rest]
307
+
308
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
309
+
310
+ options.apply_defaults timeout: @config.rpcs.list_active_breakpoints.timeout,
311
+ metadata: call_metadata,
312
+ retry_policy: @config.rpcs.list_active_breakpoints.retry_policy
313
+
314
+ options.apply_defaults timeout: @config.timeout,
315
+ metadata: @config.metadata,
316
+ retry_policy: @config.retry_policy
317
+
318
+ @controller_stub.list_active_breakpoints request, options do |result, operation|
319
+ yield result, operation if block_given?
320
+ return result
321
+ end
322
+ rescue ::Gapic::Rest::Error => e
323
+ raise ::Google::Cloud::Error.from_error(e)
324
+ end
325
+
326
+ ##
327
+ # Updates the breakpoint state or mutable fields.
328
+ # The entire Breakpoint message must be sent back to the controller service.
329
+ #
330
+ # Updates to active breakpoint fields are only allowed if the new value
331
+ # does not change the breakpoint specification. Updates to the `location`,
332
+ # `condition` and `expressions` fields should not alter the breakpoint
333
+ # semantics. These may only make changes such as canonicalizing a value
334
+ # or snapping the location to the correct line of code.
335
+ #
336
+ # @overload update_active_breakpoint(request, options = nil)
337
+ # Pass arguments to `update_active_breakpoint` via a request object, either of type
338
+ # {::Google::Cloud::Debugger::V2::UpdateActiveBreakpointRequest} or an equivalent Hash.
339
+ #
340
+ # @param request [::Google::Cloud::Debugger::V2::UpdateActiveBreakpointRequest, ::Hash]
341
+ # A request object representing the call parameters. Required. To specify no
342
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
343
+ # @param options [::Gapic::CallOptions, ::Hash]
344
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
345
+ #
346
+ # @overload update_active_breakpoint(debuggee_id: nil, breakpoint: nil)
347
+ # Pass arguments to `update_active_breakpoint` via keyword arguments. Note that at
348
+ # least one keyword argument is required. To specify no parameters, or to keep all
349
+ # the default parameter values, pass an empty Hash as a request object (see above).
350
+ #
351
+ # @param debuggee_id [::String]
352
+ # Required. Identifies the debuggee being debugged.
353
+ # @param breakpoint [::Google::Cloud::Debugger::V2::Breakpoint, ::Hash]
354
+ # Required. Updated breakpoint information.
355
+ # The field `id` must be set.
356
+ # The agent must echo all Breakpoint specification fields in the update.
357
+ # @yield [result, operation] Access the result along with the TransportOperation object
358
+ # @yieldparam result [::Google::Cloud::Debugger::V2::UpdateActiveBreakpointResponse]
359
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
360
+ #
361
+ # @return [::Google::Cloud::Debugger::V2::UpdateActiveBreakpointResponse]
362
+ #
363
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
364
+ def update_active_breakpoint request, options = nil
365
+ raise ::ArgumentError, "request must be provided" if request.nil?
366
+
367
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Debugger::V2::UpdateActiveBreakpointRequest
368
+
369
+ # Converts hash and nil to an options object
370
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
371
+
372
+ # Customize the options with defaults
373
+ call_metadata = @config.rpcs.update_active_breakpoint.metadata.to_h
374
+
375
+ # Set x-goog-api-client and x-goog-user-project headers
376
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
377
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
378
+ gapic_version: ::Google::Cloud::Debugger::V2::VERSION,
379
+ transports_version_send: [:rest]
380
+
381
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
382
+
383
+ options.apply_defaults timeout: @config.rpcs.update_active_breakpoint.timeout,
384
+ metadata: call_metadata,
385
+ retry_policy: @config.rpcs.update_active_breakpoint.retry_policy
386
+
387
+ options.apply_defaults timeout: @config.timeout,
388
+ metadata: @config.metadata,
389
+ retry_policy: @config.retry_policy
390
+
391
+ @controller_stub.update_active_breakpoint request, options do |result, operation|
392
+ yield result, operation if block_given?
393
+ return result
394
+ end
395
+ rescue ::Gapic::Rest::Error => e
396
+ raise ::Google::Cloud::Error.from_error(e)
397
+ end
398
+
399
+ ##
400
+ # Configuration class for the Controller REST API.
401
+ #
402
+ # This class represents the configuration for Controller REST,
403
+ # providing control over timeouts, retry behavior, logging, transport
404
+ # parameters, and other low-level controls. Certain parameters can also be
405
+ # applied individually to specific RPCs. See
406
+ # {::Google::Cloud::Debugger::V2::Controller::Rest::Client::Configuration::Rpcs}
407
+ # for a list of RPCs that can be configured independently.
408
+ #
409
+ # Configuration can be applied globally to all clients, or to a single client
410
+ # on construction.
411
+ #
412
+ # @example
413
+ #
414
+ # # Modify the global config, setting the timeout for
415
+ # # register_debuggee to 20 seconds,
416
+ # # and all remaining timeouts to 10 seconds.
417
+ # ::Google::Cloud::Debugger::V2::Controller::Rest::Client.configure do |config|
418
+ # config.timeout = 10.0
419
+ # config.rpcs.register_debuggee.timeout = 20.0
420
+ # end
421
+ #
422
+ # # Apply the above configuration only to a new client.
423
+ # client = ::Google::Cloud::Debugger::V2::Controller::Rest::Client.new do |config|
424
+ # config.timeout = 10.0
425
+ # config.rpcs.register_debuggee.timeout = 20.0
426
+ # end
427
+ #
428
+ # @!attribute [rw] endpoint
429
+ # The hostname or hostname:port of the service endpoint.
430
+ # Defaults to `"clouddebugger.googleapis.com"`.
431
+ # @return [::String]
432
+ # @!attribute [rw] credentials
433
+ # Credentials to send with calls. You may provide any of the following types:
434
+ # * (`String`) The path to a service account key file in JSON format
435
+ # * (`Hash`) A service account key as a Hash
436
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
437
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
438
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
439
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
440
+ # * (`nil`) indicating no credentials
441
+ # @return [::Object]
442
+ # @!attribute [rw] scope
443
+ # The OAuth scopes
444
+ # @return [::Array<::String>]
445
+ # @!attribute [rw] lib_name
446
+ # The library name as recorded in instrumentation and logging
447
+ # @return [::String]
448
+ # @!attribute [rw] lib_version
449
+ # The library version as recorded in instrumentation and logging
450
+ # @return [::String]
451
+ # @!attribute [rw] timeout
452
+ # The call timeout in seconds.
453
+ # @return [::Numeric]
454
+ # @!attribute [rw] metadata
455
+ # Additional headers to be sent with the call.
456
+ # @return [::Hash{::Symbol=>::String}]
457
+ # @!attribute [rw] retry_policy
458
+ # The retry policy. The value is a hash with the following keys:
459
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
460
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
461
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
462
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
463
+ # trigger a retry.
464
+ # @return [::Hash]
465
+ # @!attribute [rw] quota_project
466
+ # A separate project against which to charge quota.
467
+ # @return [::String]
468
+ #
469
+ class Configuration
470
+ extend ::Gapic::Config
471
+
472
+ config_attr :endpoint, "clouddebugger.googleapis.com", ::String
473
+ config_attr :credentials, nil do |value|
474
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
475
+ allowed.any? { |klass| klass === value }
476
+ end
477
+ config_attr :scope, nil, ::String, ::Array, nil
478
+ config_attr :lib_name, nil, ::String, nil
479
+ config_attr :lib_version, nil, ::String, nil
480
+ config_attr :timeout, nil, ::Numeric, nil
481
+ config_attr :metadata, nil, ::Hash, nil
482
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
483
+ config_attr :quota_project, nil, ::String, nil
484
+
485
+ # @private
486
+ def initialize parent_config = nil
487
+ @parent_config = parent_config unless parent_config.nil?
488
+
489
+ yield self if block_given?
490
+ end
491
+
492
+ ##
493
+ # Configurations for individual RPCs
494
+ # @return [Rpcs]
495
+ #
496
+ def rpcs
497
+ @rpcs ||= begin
498
+ parent_rpcs = nil
499
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
500
+ Rpcs.new parent_rpcs
501
+ end
502
+ end
503
+
504
+ ##
505
+ # Configuration RPC class for the Controller API.
506
+ #
507
+ # Includes fields providing the configuration for each RPC in this service.
508
+ # Each configuration object is of type `Gapic::Config::Method` and includes
509
+ # the following configuration fields:
510
+ #
511
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
512
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
513
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
514
+ # include the following keys:
515
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
516
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
517
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
518
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
519
+ # trigger a retry.
520
+ #
521
+ class Rpcs
522
+ ##
523
+ # RPC-specific configuration for `register_debuggee`
524
+ # @return [::Gapic::Config::Method]
525
+ #
526
+ attr_reader :register_debuggee
527
+ ##
528
+ # RPC-specific configuration for `list_active_breakpoints`
529
+ # @return [::Gapic::Config::Method]
530
+ #
531
+ attr_reader :list_active_breakpoints
532
+ ##
533
+ # RPC-specific configuration for `update_active_breakpoint`
534
+ # @return [::Gapic::Config::Method]
535
+ #
536
+ attr_reader :update_active_breakpoint
537
+
538
+ # @private
539
+ def initialize parent_rpcs = nil
540
+ register_debuggee_config = parent_rpcs.register_debuggee if parent_rpcs.respond_to? :register_debuggee
541
+ @register_debuggee = ::Gapic::Config::Method.new register_debuggee_config
542
+ list_active_breakpoints_config = parent_rpcs.list_active_breakpoints if parent_rpcs.respond_to? :list_active_breakpoints
543
+ @list_active_breakpoints = ::Gapic::Config::Method.new list_active_breakpoints_config
544
+ update_active_breakpoint_config = parent_rpcs.update_active_breakpoint if parent_rpcs.respond_to? :update_active_breakpoint
545
+ @update_active_breakpoint = ::Gapic::Config::Method.new update_active_breakpoint_config
546
+
547
+ yield self if block_given?
548
+ end
549
+ end
550
+ end
551
+ end
552
+ end
553
+ end
554
+ end
555
+ end
556
+ end
557
+ end