google-cloud-debugger-v2 0.3.1 → 0.3.5

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: d3e0a39b137b2f0c332e5bd3d575ce4d441256e8035ad68bcd071dff60c67285
4
- data.tar.gz: e2257181f3a06d257c2161ab13d3a88f628e9c2109fcca072e700d0deb85dd8e
3
+ metadata.gz: 3be99966fba6b818dec377c022f902c5c5ac4349e6f51acc977cc8a6f6e4916f
4
+ data.tar.gz: 95b8b6fc65912354302a672e05b64871b25134a00f94000fc19225321a694c07
5
5
  SHA512:
6
- metadata.gz: 17fdc4765af1ce39ea70ba2bc841fce18458de759e65c149d97bbbcb1d585eb88ef48606a97ceaa42d1d801549942afd500aa2c5d3f96f039b803da3836e6c8a
7
- data.tar.gz: 6545033e9405970618c9d519ef997f2ca5883baf5bc0836ee269557b81bfce5454e65a267daa4bb6e70e5b16fb7cdb396548299c89b3f94cbffeaec4b1ae7cc3
6
+ metadata.gz: a22523fcd7f90a69250f688b77ccb6cedbd76e4575b827f446626eae8ddd750e75e307f38b877579edc67648ad198a2331a529fc0650a87a85d6b3b81132bec8
7
+ data.tar.gz: 14ab4ae5e4ca93be3af2014b1da80a82c918767fb4a75b8601decbb660679b1ae48bbd62bd94a0fce342a6f7a41e202a394140b4a313e73453f6db5a077c5cb5
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Debugger V2 API
2
+ --title="Cloud Debugger V2 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-debugger-v2
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Debugger::V2::Controller::Credentials}):
68
68
 
69
- 1. `DEBUGGER_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `DEBUGGER_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `DEBUGGER_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `DEBUGGER_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/debugger/v2"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Debugger::V2::Controller::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/debugger/v2"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Debugger::V2::Controller::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/debugger/v2"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/debugger/v2"
34
34
 
35
35
  client = ::Google::Cloud::Debugger::V2::Controller::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Debugger::V2::RegisterDebuggeeRequest.new # (request fields as keyword arguments...)
37
37
  response = client.register_debuggee request
38
38
  ```
39
39
 
@@ -58,13 +58,12 @@ module Google
58
58
  # See {::Google::Cloud::Debugger::V2::Controller::Client::Configuration}
59
59
  # for a description of the configuration fields.
60
60
  #
61
- # ## Example
61
+ # @example
62
62
  #
63
- # To modify the configuration for all Controller clients:
64
- #
65
- # ::Google::Cloud::Debugger::V2::Controller::Client.configure do |config|
66
- # config.timeout = 10.0
67
- # end
63
+ # # Modify the configuration for all Controller clients
64
+ # ::Google::Cloud::Debugger::V2::Controller::Client.configure do |config|
65
+ # config.timeout = 10.0
66
+ # end
68
67
  #
69
68
  # @yield [config] Configure the Client client.
70
69
  # @yieldparam config [Client::Configuration]
@@ -86,18 +85,12 @@ module Google
86
85
 
87
86
  default_config.rpcs.list_active_breakpoints.timeout = 600.0
88
87
  default_config.rpcs.list_active_breakpoints.retry_policy = {
89
- initial_delay: 0.1,
90
- max_delay: 60.0,
91
- multiplier: 1.3,
92
- retry_codes: [14, 4]
88
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
93
89
  }
94
90
 
95
91
  default_config.rpcs.update_active_breakpoint.timeout = 600.0
96
92
  default_config.rpcs.update_active_breakpoint.retry_policy = {
97
- initial_delay: 0.1,
98
- max_delay: 60.0,
99
- multiplier: 1.3,
100
- retry_codes: [14, 4]
93
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
101
94
  }
102
95
 
103
96
  default_config
@@ -129,19 +122,15 @@ module Google
129
122
  ##
130
123
  # Create a new Controller client object.
131
124
  #
132
- # ## Examples
133
- #
134
- # To create a new Controller client with the default
135
- # configuration:
125
+ # @example
136
126
  #
137
- # client = ::Google::Cloud::Debugger::V2::Controller::Client.new
127
+ # # Create a client using the default configuration
128
+ # client = ::Google::Cloud::Debugger::V2::Controller::Client.new
138
129
  #
139
- # To create a new Controller client with a custom
140
- # configuration:
141
- #
142
- # client = ::Google::Cloud::Debugger::V2::Controller::Client.new do |config|
143
- # config.timeout = 10.0
144
- # end
130
+ # # Create a client using a custom configuration
131
+ # client = ::Google::Cloud::Debugger::V2::Controller::Client.new do |config|
132
+ # config.timeout = 10.0
133
+ # end
145
134
  #
146
135
  # @yield [config] Configure the Controller client.
147
136
  # @yieldparam config [Client::Configuration]
@@ -161,14 +150,13 @@ module Google
161
150
 
162
151
  # Create credentials
163
152
  credentials = @config.credentials
164
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
153
+ # Use self-signed JWT if the endpoint is unchanged from default,
165
154
  # but only if the default endpoint does not have a region prefix.
166
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
167
- @config.endpoint == Client.configure.endpoint &&
155
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
168
156
  !@config.endpoint.split(".").first.include?("-")
169
157
  credentials ||= Credentials.default scope: @config.scope,
170
158
  enable_self_signed_jwt: enable_self_signed_jwt
171
- if credentials.is_a?(String) || credentials.is_a?(Hash)
159
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
172
160
  credentials = Credentials.new credentials, scope: @config.scope
173
161
  end
174
162
  @quota_project_id = @config.quota_project
@@ -225,6 +213,21 @@ module Google
225
213
  #
226
214
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
227
215
  #
216
+ # @example Basic example
217
+ # require "google/cloud/debugger/v2"
218
+ #
219
+ # # Create a client object. The client can be reused for multiple calls.
220
+ # client = Google::Cloud::Debugger::V2::Controller::Client.new
221
+ #
222
+ # # Create a request. To set request fields, pass in keyword arguments.
223
+ # request = Google::Cloud::Debugger::V2::RegisterDebuggeeRequest.new
224
+ #
225
+ # # Call the register_debuggee method.
226
+ # result = client.register_debuggee request
227
+ #
228
+ # # The returned object is of type Google::Cloud::Debugger::V2::RegisterDebuggeeResponse.
229
+ # p result
230
+ #
228
231
  def register_debuggee request, options = nil
229
232
  raise ::ArgumentError, "request must be provided" if request.nil?
230
233
 
@@ -245,7 +248,9 @@ module Google
245
248
  options.apply_defaults timeout: @config.rpcs.register_debuggee.timeout,
246
249
  metadata: metadata,
247
250
  retry_policy: @config.rpcs.register_debuggee.retry_policy
248
- options.apply_defaults metadata: @config.metadata,
251
+
252
+ options.apply_defaults timeout: @config.timeout,
253
+ metadata: @config.metadata,
249
254
  retry_policy: @config.retry_policy
250
255
 
251
256
  @controller_stub.call_rpc :register_debuggee, request, options: options do |response, operation|
@@ -309,6 +314,21 @@ module Google
309
314
  #
310
315
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
311
316
  #
317
+ # @example Basic example
318
+ # require "google/cloud/debugger/v2"
319
+ #
320
+ # # Create a client object. The client can be reused for multiple calls.
321
+ # client = Google::Cloud::Debugger::V2::Controller::Client.new
322
+ #
323
+ # # Create a request. To set request fields, pass in keyword arguments.
324
+ # request = Google::Cloud::Debugger::V2::ListActiveBreakpointsRequest.new
325
+ #
326
+ # # Call the list_active_breakpoints method.
327
+ # result = client.list_active_breakpoints request
328
+ #
329
+ # # The returned object is of type Google::Cloud::Debugger::V2::ListActiveBreakpointsResponse.
330
+ # p result
331
+ #
312
332
  def list_active_breakpoints request, options = nil
313
333
  raise ::ArgumentError, "request must be provided" if request.nil?
314
334
 
@@ -326,16 +346,20 @@ module Google
326
346
  gapic_version: ::Google::Cloud::Debugger::V2::VERSION
327
347
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
328
348
 
329
- header_params = {
330
- "debuggee_id" => request.debuggee_id
331
- }
349
+ header_params = {}
350
+ if request.debuggee_id
351
+ header_params["debuggee_id"] = request.debuggee_id
352
+ end
353
+
332
354
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
333
355
  metadata[:"x-goog-request-params"] ||= request_params_header
334
356
 
335
357
  options.apply_defaults timeout: @config.rpcs.list_active_breakpoints.timeout,
336
358
  metadata: metadata,
337
359
  retry_policy: @config.rpcs.list_active_breakpoints.retry_policy
338
- options.apply_defaults metadata: @config.metadata,
360
+
361
+ options.apply_defaults timeout: @config.timeout,
362
+ metadata: @config.metadata,
339
363
  retry_policy: @config.retry_policy
340
364
 
341
365
  @controller_stub.call_rpc :list_active_breakpoints, request, options: options do |response, operation|
@@ -386,6 +410,21 @@ module Google
386
410
  #
387
411
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
388
412
  #
413
+ # @example Basic example
414
+ # require "google/cloud/debugger/v2"
415
+ #
416
+ # # Create a client object. The client can be reused for multiple calls.
417
+ # client = Google::Cloud::Debugger::V2::Controller::Client.new
418
+ #
419
+ # # Create a request. To set request fields, pass in keyword arguments.
420
+ # request = Google::Cloud::Debugger::V2::UpdateActiveBreakpointRequest.new
421
+ #
422
+ # # Call the update_active_breakpoint method.
423
+ # result = client.update_active_breakpoint request
424
+ #
425
+ # # The returned object is of type Google::Cloud::Debugger::V2::UpdateActiveBreakpointResponse.
426
+ # p result
427
+ #
389
428
  def update_active_breakpoint request, options = nil
390
429
  raise ::ArgumentError, "request must be provided" if request.nil?
391
430
 
@@ -403,17 +442,23 @@ module Google
403
442
  gapic_version: ::Google::Cloud::Debugger::V2::VERSION
404
443
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
405
444
 
406
- header_params = {
407
- "debuggee_id" => request.debuggee_id,
408
- "breakpoint.id" => request.breakpoint.id
409
- }
445
+ header_params = {}
446
+ if request.debuggee_id
447
+ header_params["debuggee_id"] = request.debuggee_id
448
+ end
449
+ if request.breakpoint&.id
450
+ header_params["breakpoint.id"] = request.breakpoint.id
451
+ end
452
+
410
453
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
411
454
  metadata[:"x-goog-request-params"] ||= request_params_header
412
455
 
413
456
  options.apply_defaults timeout: @config.rpcs.update_active_breakpoint.timeout,
414
457
  metadata: metadata,
415
458
  retry_policy: @config.rpcs.update_active_breakpoint.retry_policy
416
- options.apply_defaults metadata: @config.metadata,
459
+
460
+ options.apply_defaults timeout: @config.timeout,
461
+ metadata: @config.metadata,
417
462
  retry_policy: @config.retry_policy
418
463
 
419
464
  @controller_stub.call_rpc :update_active_breakpoint, request, options: options do |response, operation|
@@ -437,22 +482,21 @@ module Google
437
482
  # Configuration can be applied globally to all clients, or to a single client
438
483
  # on construction.
439
484
  #
440
- # # Examples
441
- #
442
- # To modify the global config, setting the timeout for register_debuggee
443
- # to 20 seconds, and all remaining timeouts to 10 seconds:
444
- #
445
- # ::Google::Cloud::Debugger::V2::Controller::Client.configure do |config|
446
- # config.timeout = 10.0
447
- # config.rpcs.register_debuggee.timeout = 20.0
448
- # end
449
- #
450
- # To apply the above configuration only to a new client:
451
- #
452
- # client = ::Google::Cloud::Debugger::V2::Controller::Client.new do |config|
453
- # config.timeout = 10.0
454
- # config.rpcs.register_debuggee.timeout = 20.0
455
- # end
485
+ # @example
486
+ #
487
+ # # Modify the global config, setting the timeout for
488
+ # # register_debuggee to 20 seconds,
489
+ # # and all remaining timeouts to 10 seconds.
490
+ # ::Google::Cloud::Debugger::V2::Controller::Client.configure do |config|
491
+ # config.timeout = 10.0
492
+ # config.rpcs.register_debuggee.timeout = 20.0
493
+ # end
494
+ #
495
+ # # Apply the above configuration only to a new client.
496
+ # client = ::Google::Cloud::Debugger::V2::Controller::Client.new do |config|
497
+ # config.timeout = 10.0
498
+ # config.rpcs.register_debuggee.timeout = 20.0
499
+ # end
456
500
  #
457
501
  # @!attribute [rw] endpoint
458
502
  # The hostname or hostname:port of the service endpoint.
@@ -50,13 +50,12 @@ module Google
50
50
  # See {::Google::Cloud::Debugger::V2::Debugger::Client::Configuration}
51
51
  # for a description of the configuration fields.
52
52
  #
53
- # ## Example
53
+ # @example
54
54
  #
55
- # To modify the configuration for all Debugger clients:
56
- #
57
- # ::Google::Cloud::Debugger::V2::Debugger::Client.configure do |config|
58
- # config.timeout = 10.0
59
- # end
55
+ # # Modify the configuration for all Debugger clients
56
+ # ::Google::Cloud::Debugger::V2::Debugger::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
60
59
  #
61
60
  # @yield [config] Configure the Client client.
62
61
  # @yieldparam config [Client::Configuration]
@@ -78,34 +77,22 @@ module Google
78
77
 
79
78
  default_config.rpcs.get_breakpoint.timeout = 600.0
80
79
  default_config.rpcs.get_breakpoint.retry_policy = {
81
- initial_delay: 0.1,
82
- max_delay: 60.0,
83
- multiplier: 1.3,
84
- retry_codes: [14, 4]
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
85
81
  }
86
82
 
87
83
  default_config.rpcs.delete_breakpoint.timeout = 600.0
88
84
  default_config.rpcs.delete_breakpoint.retry_policy = {
89
- initial_delay: 0.1,
90
- max_delay: 60.0,
91
- multiplier: 1.3,
92
- retry_codes: [14, 4]
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
93
86
  }
94
87
 
95
88
  default_config.rpcs.list_breakpoints.timeout = 600.0
96
89
  default_config.rpcs.list_breakpoints.retry_policy = {
97
- initial_delay: 0.1,
98
- max_delay: 60.0,
99
- multiplier: 1.3,
100
- retry_codes: [14, 4]
90
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
101
91
  }
102
92
 
103
93
  default_config.rpcs.list_debuggees.timeout = 600.0
104
94
  default_config.rpcs.list_debuggees.retry_policy = {
105
- initial_delay: 0.1,
106
- max_delay: 60.0,
107
- multiplier: 1.3,
108
- retry_codes: [14, 4]
95
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
109
96
  }
110
97
 
111
98
  default_config
@@ -137,19 +124,15 @@ module Google
137
124
  ##
138
125
  # Create a new Debugger client object.
139
126
  #
140
- # ## Examples
141
- #
142
- # To create a new Debugger client with the default
143
- # configuration:
144
- #
145
- # client = ::Google::Cloud::Debugger::V2::Debugger::Client.new
127
+ # @example
146
128
  #
147
- # To create a new Debugger client with a custom
148
- # configuration:
129
+ # # Create a client using the default configuration
130
+ # client = ::Google::Cloud::Debugger::V2::Debugger::Client.new
149
131
  #
150
- # client = ::Google::Cloud::Debugger::V2::Debugger::Client.new do |config|
151
- # config.timeout = 10.0
152
- # end
132
+ # # Create a client using a custom configuration
133
+ # client = ::Google::Cloud::Debugger::V2::Debugger::Client.new do |config|
134
+ # config.timeout = 10.0
135
+ # end
153
136
  #
154
137
  # @yield [config] Configure the Debugger client.
155
138
  # @yieldparam config [Client::Configuration]
@@ -169,14 +152,13 @@ module Google
169
152
 
170
153
  # Create credentials
171
154
  credentials = @config.credentials
172
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
155
+ # Use self-signed JWT if the endpoint is unchanged from default,
173
156
  # but only if the default endpoint does not have a region prefix.
174
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
175
- @config.endpoint == Client.configure.endpoint &&
157
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
176
158
  !@config.endpoint.split(".").first.include?("-")
177
159
  credentials ||= Credentials.default scope: @config.scope,
178
160
  enable_self_signed_jwt: enable_self_signed_jwt
179
- if credentials.is_a?(String) || credentials.is_a?(Hash)
161
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
180
162
  credentials = Credentials.new credentials, scope: @config.scope
181
163
  end
182
164
  @quota_project_id = @config.quota_project
@@ -228,6 +210,21 @@ module Google
228
210
  #
229
211
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
230
212
  #
213
+ # @example Basic example
214
+ # require "google/cloud/debugger/v2"
215
+ #
216
+ # # Create a client object. The client can be reused for multiple calls.
217
+ # client = Google::Cloud::Debugger::V2::Debugger::Client.new
218
+ #
219
+ # # Create a request. To set request fields, pass in keyword arguments.
220
+ # request = Google::Cloud::Debugger::V2::SetBreakpointRequest.new
221
+ #
222
+ # # Call the set_breakpoint method.
223
+ # result = client.set_breakpoint request
224
+ #
225
+ # # The returned object is of type Google::Cloud::Debugger::V2::SetBreakpointResponse.
226
+ # p result
227
+ #
231
228
  def set_breakpoint request, options = nil
232
229
  raise ::ArgumentError, "request must be provided" if request.nil?
233
230
 
@@ -245,16 +242,20 @@ module Google
245
242
  gapic_version: ::Google::Cloud::Debugger::V2::VERSION
246
243
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
247
244
 
248
- header_params = {
249
- "debuggee_id" => request.debuggee_id
250
- }
245
+ header_params = {}
246
+ if request.debuggee_id
247
+ header_params["debuggee_id"] = request.debuggee_id
248
+ end
249
+
251
250
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
252
251
  metadata[:"x-goog-request-params"] ||= request_params_header
253
252
 
254
253
  options.apply_defaults timeout: @config.rpcs.set_breakpoint.timeout,
255
254
  metadata: metadata,
256
255
  retry_policy: @config.rpcs.set_breakpoint.retry_policy
257
- options.apply_defaults metadata: @config.metadata,
256
+
257
+ options.apply_defaults timeout: @config.timeout,
258
+ metadata: @config.metadata,
258
259
  retry_policy: @config.retry_policy
259
260
 
260
261
  @debugger_stub.call_rpc :set_breakpoint, request, options: options do |response, operation|
@@ -299,6 +300,21 @@ module Google
299
300
  #
300
301
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
301
302
  #
303
+ # @example Basic example
304
+ # require "google/cloud/debugger/v2"
305
+ #
306
+ # # Create a client object. The client can be reused for multiple calls.
307
+ # client = Google::Cloud::Debugger::V2::Debugger::Client.new
308
+ #
309
+ # # Create a request. To set request fields, pass in keyword arguments.
310
+ # request = Google::Cloud::Debugger::V2::GetBreakpointRequest.new
311
+ #
312
+ # # Call the get_breakpoint method.
313
+ # result = client.get_breakpoint request
314
+ #
315
+ # # The returned object is of type Google::Cloud::Debugger::V2::GetBreakpointResponse.
316
+ # p result
317
+ #
302
318
  def get_breakpoint request, options = nil
303
319
  raise ::ArgumentError, "request must be provided" if request.nil?
304
320
 
@@ -316,17 +332,23 @@ module Google
316
332
  gapic_version: ::Google::Cloud::Debugger::V2::VERSION
317
333
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
318
334
 
319
- header_params = {
320
- "debuggee_id" => request.debuggee_id,
321
- "breakpoint_id" => request.breakpoint_id
322
- }
335
+ header_params = {}
336
+ if request.debuggee_id
337
+ header_params["debuggee_id"] = request.debuggee_id
338
+ end
339
+ if request.breakpoint_id
340
+ header_params["breakpoint_id"] = request.breakpoint_id
341
+ end
342
+
323
343
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
324
344
  metadata[:"x-goog-request-params"] ||= request_params_header
325
345
 
326
346
  options.apply_defaults timeout: @config.rpcs.get_breakpoint.timeout,
327
347
  metadata: metadata,
328
348
  retry_policy: @config.rpcs.get_breakpoint.retry_policy
329
- options.apply_defaults metadata: @config.metadata,
349
+
350
+ options.apply_defaults timeout: @config.timeout,
351
+ metadata: @config.metadata,
330
352
  retry_policy: @config.retry_policy
331
353
 
332
354
  @debugger_stub.call_rpc :get_breakpoint, request, options: options do |response, operation|
@@ -371,6 +393,21 @@ module Google
371
393
  #
372
394
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
373
395
  #
396
+ # @example Basic example
397
+ # require "google/cloud/debugger/v2"
398
+ #
399
+ # # Create a client object. The client can be reused for multiple calls.
400
+ # client = Google::Cloud::Debugger::V2::Debugger::Client.new
401
+ #
402
+ # # Create a request. To set request fields, pass in keyword arguments.
403
+ # request = Google::Cloud::Debugger::V2::DeleteBreakpointRequest.new
404
+ #
405
+ # # Call the delete_breakpoint method.
406
+ # result = client.delete_breakpoint request
407
+ #
408
+ # # The returned object is of type Google::Protobuf::Empty.
409
+ # p result
410
+ #
374
411
  def delete_breakpoint request, options = nil
375
412
  raise ::ArgumentError, "request must be provided" if request.nil?
376
413
 
@@ -388,17 +425,23 @@ module Google
388
425
  gapic_version: ::Google::Cloud::Debugger::V2::VERSION
389
426
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
390
427
 
391
- header_params = {
392
- "debuggee_id" => request.debuggee_id,
393
- "breakpoint_id" => request.breakpoint_id
394
- }
428
+ header_params = {}
429
+ if request.debuggee_id
430
+ header_params["debuggee_id"] = request.debuggee_id
431
+ end
432
+ if request.breakpoint_id
433
+ header_params["breakpoint_id"] = request.breakpoint_id
434
+ end
435
+
395
436
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
396
437
  metadata[:"x-goog-request-params"] ||= request_params_header
397
438
 
398
439
  options.apply_defaults timeout: @config.rpcs.delete_breakpoint.timeout,
399
440
  metadata: metadata,
400
441
  retry_policy: @config.rpcs.delete_breakpoint.retry_policy
401
- options.apply_defaults metadata: @config.metadata,
442
+
443
+ options.apply_defaults timeout: @config.timeout,
444
+ metadata: @config.metadata,
402
445
  retry_policy: @config.retry_policy
403
446
 
404
447
  @debugger_stub.call_rpc :delete_breakpoint, request, options: options do |response, operation|
@@ -458,6 +501,21 @@ module Google
458
501
  #
459
502
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
460
503
  #
504
+ # @example Basic example
505
+ # require "google/cloud/debugger/v2"
506
+ #
507
+ # # Create a client object. The client can be reused for multiple calls.
508
+ # client = Google::Cloud::Debugger::V2::Debugger::Client.new
509
+ #
510
+ # # Create a request. To set request fields, pass in keyword arguments.
511
+ # request = Google::Cloud::Debugger::V2::ListBreakpointsRequest.new
512
+ #
513
+ # # Call the list_breakpoints method.
514
+ # result = client.list_breakpoints request
515
+ #
516
+ # # The returned object is of type Google::Cloud::Debugger::V2::ListBreakpointsResponse.
517
+ # p result
518
+ #
461
519
  def list_breakpoints request, options = nil
462
520
  raise ::ArgumentError, "request must be provided" if request.nil?
463
521
 
@@ -475,16 +533,20 @@ module Google
475
533
  gapic_version: ::Google::Cloud::Debugger::V2::VERSION
476
534
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
477
535
 
478
- header_params = {
479
- "debuggee_id" => request.debuggee_id
480
- }
536
+ header_params = {}
537
+ if request.debuggee_id
538
+ header_params["debuggee_id"] = request.debuggee_id
539
+ end
540
+
481
541
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
482
542
  metadata[:"x-goog-request-params"] ||= request_params_header
483
543
 
484
544
  options.apply_defaults timeout: @config.rpcs.list_breakpoints.timeout,
485
545
  metadata: metadata,
486
546
  retry_policy: @config.rpcs.list_breakpoints.retry_policy
487
- options.apply_defaults metadata: @config.metadata,
547
+
548
+ options.apply_defaults timeout: @config.timeout,
549
+ metadata: @config.metadata,
488
550
  retry_policy: @config.retry_policy
489
551
 
490
552
  @debugger_stub.call_rpc :list_breakpoints, request, options: options do |response, operation|
@@ -530,6 +592,21 @@ module Google
530
592
  #
531
593
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
532
594
  #
595
+ # @example Basic example
596
+ # require "google/cloud/debugger/v2"
597
+ #
598
+ # # Create a client object. The client can be reused for multiple calls.
599
+ # client = Google::Cloud::Debugger::V2::Debugger::Client.new
600
+ #
601
+ # # Create a request. To set request fields, pass in keyword arguments.
602
+ # request = Google::Cloud::Debugger::V2::ListDebuggeesRequest.new
603
+ #
604
+ # # Call the list_debuggees method.
605
+ # result = client.list_debuggees request
606
+ #
607
+ # # The returned object is of type Google::Cloud::Debugger::V2::ListDebuggeesResponse.
608
+ # p result
609
+ #
533
610
  def list_debuggees request, options = nil
534
611
  raise ::ArgumentError, "request must be provided" if request.nil?
535
612
 
@@ -550,7 +627,9 @@ module Google
550
627
  options.apply_defaults timeout: @config.rpcs.list_debuggees.timeout,
551
628
  metadata: metadata,
552
629
  retry_policy: @config.rpcs.list_debuggees.retry_policy
553
- options.apply_defaults metadata: @config.metadata,
630
+
631
+ options.apply_defaults timeout: @config.timeout,
632
+ metadata: @config.metadata,
554
633
  retry_policy: @config.retry_policy
555
634
 
556
635
  @debugger_stub.call_rpc :list_debuggees, request, options: options do |response, operation|
@@ -574,22 +653,21 @@ module Google
574
653
  # Configuration can be applied globally to all clients, or to a single client
575
654
  # on construction.
576
655
  #
577
- # # Examples
578
- #
579
- # To modify the global config, setting the timeout for set_breakpoint
580
- # to 20 seconds, and all remaining timeouts to 10 seconds:
581
- #
582
- # ::Google::Cloud::Debugger::V2::Debugger::Client.configure do |config|
583
- # config.timeout = 10.0
584
- # config.rpcs.set_breakpoint.timeout = 20.0
585
- # end
586
- #
587
- # To apply the above configuration only to a new client:
588
- #
589
- # client = ::Google::Cloud::Debugger::V2::Debugger::Client.new do |config|
590
- # config.timeout = 10.0
591
- # config.rpcs.set_breakpoint.timeout = 20.0
592
- # end
656
+ # @example
657
+ #
658
+ # # Modify the global config, setting the timeout for
659
+ # # set_breakpoint to 20 seconds,
660
+ # # and all remaining timeouts to 10 seconds.
661
+ # ::Google::Cloud::Debugger::V2::Debugger::Client.configure do |config|
662
+ # config.timeout = 10.0
663
+ # config.rpcs.set_breakpoint.timeout = 20.0
664
+ # end
665
+ #
666
+ # # Apply the above configuration only to a new client.
667
+ # client = ::Google::Cloud::Debugger::V2::Debugger::Client.new do |config|
668
+ # config.timeout = 10.0
669
+ # config.rpcs.set_breakpoint.timeout = 20.0
670
+ # end
593
671
  #
594
672
  # @!attribute [rw] endpoint
595
673
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Debugger
23
23
  module V2
24
- VERSION = "0.3.1"
24
+ VERSION = "0.3.5"
25
25
  end
26
26
  end
27
27
  end
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/clouddebugger/v2/controller.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/devtools/clouddebugger/v2/data_pb'
10
8
  require 'google/protobuf/empty_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/devtools/clouddebugger/v2/controller.proto", :syntax => :proto3) do
13
13
  add_message "google.devtools.clouddebugger.v2.RegisterDebuggeeRequest" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/clouddebugger/v2/data.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/devtools/source/v1/source_context_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/protobuf/wrappers_pb'
9
7
  require 'google/api/annotations_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/devtools/clouddebugger/v2/data.proto", :syntax => :proto3) do
12
12
  add_message "google.devtools.clouddebugger.v2.FormatMessage" do
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/clouddebugger/v2/debugger.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/client_pb'
7
5
  require 'google/api/field_behavior_pb'
8
6
  require 'google/devtools/clouddebugger/v2/data_pb'
9
7
  require 'google/protobuf/empty_pb'
10
8
  require 'google/api/annotations_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/devtools/clouddebugger/v2/debugger.proto", :syntax => :proto3) do
13
13
  add_message "google.devtools.clouddebugger.v2.SetBreakpointRequest" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/source/v1/source_context.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/devtools/source/v1/source_context.proto", :syntax => :proto3) do
9
9
  add_message "google.devtools.source.v1.SourceContext" do
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-debugger-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.2.17
222
+ rubygems_version: 3.3.4
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: API Client library for the Cloud Debugger V2 API