google-cloud-monitoring-v3 0.4.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +113 -20
  3. data/lib/google/cloud/monitoring/v3/group_service/client.rb +142 -26
  4. data/lib/google/cloud/monitoring/v3/metric_service/client.rb +309 -38
  5. data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +227 -41
  6. data/lib/google/cloud/monitoring/v3/query_service/client.rb +28 -4
  7. data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +222 -38
  8. data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +135 -21
  9. data/lib/google/cloud/monitoring/v3/version.rb +1 -1
  10. data/lib/google/monitoring/v3/alert_pb.rb +18 -2
  11. data/lib/google/monitoring/v3/alert_service_pb.rb +2 -2
  12. data/lib/google/monitoring/v3/alert_service_services_pb.rb +1 -1
  13. data/lib/google/monitoring/v3/common_pb.rb +2 -2
  14. data/lib/google/monitoring/v3/group_pb.rb +1 -1
  15. data/lib/google/monitoring/v3/group_service_pb.rb +2 -2
  16. data/lib/google/monitoring/v3/group_service_services_pb.rb +1 -1
  17. data/lib/google/monitoring/v3/metric_pb.rb +2 -2
  18. data/lib/google/monitoring/v3/metric_service_pb.rb +2 -2
  19. data/lib/google/monitoring/v3/metric_service_services_pb.rb +13 -1
  20. data/lib/google/monitoring/v3/mutation_record_pb.rb +1 -1
  21. data/lib/google/monitoring/v3/notification_pb.rb +2 -2
  22. data/lib/google/monitoring/v3/notification_service_pb.rb +2 -2
  23. data/lib/google/monitoring/v3/notification_service_services_pb.rb +1 -1
  24. data/lib/google/monitoring/v3/query_service_pb.rb +2 -2
  25. data/lib/google/monitoring/v3/query_service_services_pb.rb +1 -1
  26. data/lib/google/monitoring/v3/service_pb.rb +5 -2
  27. data/lib/google/monitoring/v3/service_service_pb.rb +2 -2
  28. data/lib/google/monitoring/v3/service_service_services_pb.rb +1 -1
  29. data/lib/google/monitoring/v3/uptime_pb.rb +2 -2
  30. data/lib/google/monitoring/v3/uptime_service_pb.rb +3 -2
  31. data/lib/google/monitoring/v3/uptime_service_services_pb.rb +1 -1
  32. data/proto_docs/google/longrunning/operations.rb +164 -0
  33. data/proto_docs/google/monitoring/v3/alert.rb +72 -3
  34. data/proto_docs/google/monitoring/v3/alert_service.rb +4 -2
  35. data/proto_docs/google/monitoring/v3/common.rb +18 -6
  36. data/proto_docs/google/monitoring/v3/group_service.rb +4 -2
  37. data/proto_docs/google/monitoring/v3/metric.rb +3 -1
  38. data/proto_docs/google/monitoring/v3/metric_service.rb +13 -8
  39. data/proto_docs/google/monitoring/v3/notification_service.rb +8 -4
  40. data/proto_docs/google/monitoring/v3/service.rb +38 -6
  41. data/proto_docs/google/monitoring/v3/service_service.rb +4 -2
  42. data/proto_docs/google/monitoring/v3/span_context.rb +2 -2
  43. data/proto_docs/google/monitoring/v3/uptime.rb +5 -2
  44. data/proto_docs/google/monitoring/v3/uptime_service.rb +4 -2
  45. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: decec2701bb1638e5484dc1b0c01717854aa885a3e9e925d18abbe2e8d87b2bc
4
- data.tar.gz: f1d7c511d2571ca589aa5a67a75b3cd76f61719fa7d2de4b1ae3f9f1704d9152
3
+ metadata.gz: bb93a96dc7f90b835c68f1c88356d7c3b220de2dba50b257206d8103b3f4af4c
4
+ data.tar.gz: 8e05e8f3b725b8723d93cb3dc9ba566a30023583cef96a21f22e543822cb5c73
5
5
  SHA512:
6
- metadata.gz: 2287692ac4638b348c01aae711aaf567eb8f60f975d6e480a4c6b4d75a6f7c6820ac63ba969e8af538688408a1c4c2d87b144e85b5d83bb2cdb859f960bc714f
7
- data.tar.gz: 960ef65d07a93dfd639c5d8fba4107fc93f4a4f03b34522731145f7e000af9f4643bdac7e1219995b697cbeece7fe5bad0867a1ab886cfcb8c74d2f16890fcd5
6
+ metadata.gz: 4949a76951ff367d087dcdc6c0976750a8c8bba549eb65b1c846e0c2568d40f21ff56617e6d7444e6237bf3abef22ec655a5424bcc50e75996e117eb78f96d1b
7
+ data.tar.gz: fca1b1d8318cd3a600c602cfe39921c731ad261ccd1fd5487cab531199c0bd2ee30d8a90de1fc5668f39cb101a727ea59bf89e4896c1ffc0a9002e9935428c1b
@@ -74,19 +74,19 @@ module Google
74
74
 
75
75
  default_config.rpcs.list_alert_policies.timeout = 30.0
76
76
  default_config.rpcs.list_alert_policies.retry_policy = {
77
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
77
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
78
78
  }
79
79
 
80
80
  default_config.rpcs.get_alert_policy.timeout = 30.0
81
81
  default_config.rpcs.get_alert_policy.retry_policy = {
82
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
82
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
83
83
  }
84
84
 
85
85
  default_config.rpcs.create_alert_policy.timeout = 30.0
86
86
 
87
87
  default_config.rpcs.delete_alert_policy.timeout = 30.0
88
88
  default_config.rpcs.delete_alert_policy.retry_policy = {
89
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
89
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
90
90
  }
91
91
 
92
92
  default_config.rpcs.update_alert_policy.timeout = 30.0
@@ -190,7 +190,8 @@ module Google
190
190
  # the default parameter values, pass an empty Hash as a request object (see above).
191
191
  #
192
192
  # @param name [::String]
193
- # Required. The project whose alert policies are to be listed. The format is:
193
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name)
194
+ # whose alert policies are to be listed. The format is:
194
195
  #
195
196
  # projects/[PROJECT_ID_OR_NUMBER]
196
197
  #
@@ -227,6 +228,27 @@ module Google
227
228
  #
228
229
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
229
230
  #
231
+ # @example Basic example
232
+ # require "google/cloud/monitoring/v3"
233
+ #
234
+ # # Create a client object. The client can be reused for multiple calls.
235
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
236
+ #
237
+ # # Create a request. To set request fields, pass in keyword arguments.
238
+ # request = Google::Cloud::Monitoring::V3::ListAlertPoliciesRequest.new
239
+ #
240
+ # # Call the list_alert_policies method.
241
+ # result = client.list_alert_policies request
242
+ #
243
+ # # The returned object is of type Gapic::PagedEnumerable. You can
244
+ # # iterate over all elements by calling #each, and the enumerable
245
+ # # will lazily make API calls to fetch subsequent pages. Other
246
+ # # methods are also available for managing paging directly.
247
+ # result.each do |response|
248
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::AlertPolicy.
249
+ # p response
250
+ # end
251
+ #
230
252
  def list_alert_policies request, options = nil
231
253
  raise ::ArgumentError, "request must be provided" if request.nil?
232
254
 
@@ -244,9 +266,11 @@ module Google
244
266
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
245
267
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
246
268
 
247
- header_params = {
248
- "name" => request.name
249
- }
269
+ header_params = {}
270
+ if request.name
271
+ header_params["name"] = request.name
272
+ end
273
+
250
274
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
251
275
  metadata[:"x-goog-request-params"] ||= request_params_header
252
276
 
@@ -298,6 +322,21 @@ module Google
298
322
  #
299
323
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
300
324
  #
325
+ # @example Basic example
326
+ # require "google/cloud/monitoring/v3"
327
+ #
328
+ # # Create a client object. The client can be reused for multiple calls.
329
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
330
+ #
331
+ # # Create a request. To set request fields, pass in keyword arguments.
332
+ # request = Google::Cloud::Monitoring::V3::GetAlertPolicyRequest.new
333
+ #
334
+ # # Call the get_alert_policy method.
335
+ # result = client.get_alert_policy request
336
+ #
337
+ # # The returned object is of type Google::Cloud::Monitoring::V3::AlertPolicy.
338
+ # p result
339
+ #
301
340
  def get_alert_policy request, options = nil
302
341
  raise ::ArgumentError, "request must be provided" if request.nil?
303
342
 
@@ -315,9 +354,11 @@ module Google
315
354
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
316
355
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
317
356
 
318
- header_params = {
319
- "name" => request.name
320
- }
357
+ header_params = {}
358
+ if request.name
359
+ header_params["name"] = request.name
360
+ end
361
+
321
362
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
322
363
  metadata[:"x-goog-request-params"] ||= request_params_header
323
364
 
@@ -356,7 +397,8 @@ module Google
356
397
  # the default parameter values, pass an empty Hash as a request object (see above).
357
398
  #
358
399
  # @param name [::String]
359
- # Required. The project in which to create the alerting policy. The format is:
400
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in
401
+ # which to create the alerting policy. The format is:
360
402
  #
361
403
  # projects/[PROJECT_ID_OR_NUMBER]
362
404
  #
@@ -380,6 +422,21 @@ module Google
380
422
  #
381
423
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
382
424
  #
425
+ # @example Basic example
426
+ # require "google/cloud/monitoring/v3"
427
+ #
428
+ # # Create a client object. The client can be reused for multiple calls.
429
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
430
+ #
431
+ # # Create a request. To set request fields, pass in keyword arguments.
432
+ # request = Google::Cloud::Monitoring::V3::CreateAlertPolicyRequest.new
433
+ #
434
+ # # Call the create_alert_policy method.
435
+ # result = client.create_alert_policy request
436
+ #
437
+ # # The returned object is of type Google::Cloud::Monitoring::V3::AlertPolicy.
438
+ # p result
439
+ #
383
440
  def create_alert_policy request, options = nil
384
441
  raise ::ArgumentError, "request must be provided" if request.nil?
385
442
 
@@ -397,9 +454,11 @@ module Google
397
454
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
398
455
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
399
456
 
400
- header_params = {
401
- "name" => request.name
402
- }
457
+ header_params = {}
458
+ if request.name
459
+ header_params["name"] = request.name
460
+ end
461
+
403
462
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
404
463
  metadata[:"x-goog-request-params"] ||= request_params_header
405
464
 
@@ -452,6 +511,21 @@ module Google
452
511
  #
453
512
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
454
513
  #
514
+ # @example Basic example
515
+ # require "google/cloud/monitoring/v3"
516
+ #
517
+ # # Create a client object. The client can be reused for multiple calls.
518
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
519
+ #
520
+ # # Create a request. To set request fields, pass in keyword arguments.
521
+ # request = Google::Cloud::Monitoring::V3::DeleteAlertPolicyRequest.new
522
+ #
523
+ # # Call the delete_alert_policy method.
524
+ # result = client.delete_alert_policy request
525
+ #
526
+ # # The returned object is of type Google::Protobuf::Empty.
527
+ # p result
528
+ #
455
529
  def delete_alert_policy request, options = nil
456
530
  raise ::ArgumentError, "request must be provided" if request.nil?
457
531
 
@@ -469,9 +543,11 @@ module Google
469
543
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
470
544
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
471
545
 
472
- header_params = {
473
- "name" => request.name
474
- }
546
+ header_params = {}
547
+ if request.name
548
+ header_params["name"] = request.name
549
+ end
550
+
475
551
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
476
552
  metadata[:"x-goog-request-params"] ||= request_params_header
477
553
 
@@ -548,6 +624,21 @@ module Google
548
624
  #
549
625
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
550
626
  #
627
+ # @example Basic example
628
+ # require "google/cloud/monitoring/v3"
629
+ #
630
+ # # Create a client object. The client can be reused for multiple calls.
631
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
632
+ #
633
+ # # Create a request. To set request fields, pass in keyword arguments.
634
+ # request = Google::Cloud::Monitoring::V3::UpdateAlertPolicyRequest.new
635
+ #
636
+ # # Call the update_alert_policy method.
637
+ # result = client.update_alert_policy request
638
+ #
639
+ # # The returned object is of type Google::Cloud::Monitoring::V3::AlertPolicy.
640
+ # p result
641
+ #
551
642
  def update_alert_policy request, options = nil
552
643
  raise ::ArgumentError, "request must be provided" if request.nil?
553
644
 
@@ -565,9 +656,11 @@ module Google
565
656
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
566
657
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
567
658
 
568
- header_params = {
569
- "alert_policy.name" => request.alert_policy.name
570
- }
659
+ header_params = {}
660
+ if request.alert_policy&.name
661
+ header_params["alert_policy.name"] = request.alert_policy.name
662
+ end
663
+
571
664
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
572
665
  metadata[:"x-goog-request-params"] ||= request_params_header
573
666
 
@@ -77,29 +77,29 @@ module Google
77
77
 
78
78
  default_config.rpcs.list_groups.timeout = 30.0
79
79
  default_config.rpcs.list_groups.retry_policy = {
80
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
80
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
81
81
  }
82
82
 
83
83
  default_config.rpcs.get_group.timeout = 30.0
84
84
  default_config.rpcs.get_group.retry_policy = {
85
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
85
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
86
86
  }
87
87
 
88
88
  default_config.rpcs.create_group.timeout = 30.0
89
89
 
90
- default_config.rpcs.update_group.timeout = 30.0
90
+ default_config.rpcs.update_group.timeout = 180.0
91
91
  default_config.rpcs.update_group.retry_policy = {
92
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
92
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
93
93
  }
94
94
 
95
95
  default_config.rpcs.delete_group.timeout = 30.0
96
96
  default_config.rpcs.delete_group.retry_policy = {
97
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
97
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
98
98
  }
99
99
 
100
100
  default_config.rpcs.list_group_members.timeout = 30.0
101
101
  default_config.rpcs.list_group_members.retry_policy = {
102
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
102
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
103
103
  }
104
104
 
105
105
  default_config
@@ -201,7 +201,8 @@ module Google
201
201
  # the default parameter values, pass an empty Hash as a request object (see above).
202
202
  #
203
203
  # @param name [::String]
204
- # Required. The project whose groups are to be listed. The format is:
204
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name)
205
+ # whose groups are to be listed. The format is:
205
206
  #
206
207
  # projects/[PROJECT_ID_OR_NUMBER]
207
208
  # @param children_of_group [::String]
@@ -243,6 +244,27 @@ module Google
243
244
  #
244
245
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
245
246
  #
247
+ # @example Basic example
248
+ # require "google/cloud/monitoring/v3"
249
+ #
250
+ # # Create a client object. The client can be reused for multiple calls.
251
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
252
+ #
253
+ # # Create a request. To set request fields, pass in keyword arguments.
254
+ # request = Google::Cloud::Monitoring::V3::ListGroupsRequest.new
255
+ #
256
+ # # Call the list_groups method.
257
+ # result = client.list_groups request
258
+ #
259
+ # # The returned object is of type Gapic::PagedEnumerable. You can
260
+ # # iterate over all elements by calling #each, and the enumerable
261
+ # # will lazily make API calls to fetch subsequent pages. Other
262
+ # # methods are also available for managing paging directly.
263
+ # result.each do |response|
264
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::Group.
265
+ # p response
266
+ # end
267
+ #
246
268
  def list_groups request, options = nil
247
269
  raise ::ArgumentError, "request must be provided" if request.nil?
248
270
 
@@ -260,9 +282,11 @@ module Google
260
282
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
261
283
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
284
 
263
- header_params = {
264
- "name" => request.name
265
- }
285
+ header_params = {}
286
+ if request.name
287
+ header_params["name"] = request.name
288
+ end
289
+
266
290
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
267
291
  metadata[:"x-goog-request-params"] ||= request_params_header
268
292
 
@@ -314,6 +338,21 @@ module Google
314
338
  #
315
339
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
316
340
  #
341
+ # @example Basic example
342
+ # require "google/cloud/monitoring/v3"
343
+ #
344
+ # # Create a client object. The client can be reused for multiple calls.
345
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
346
+ #
347
+ # # Create a request. To set request fields, pass in keyword arguments.
348
+ # request = Google::Cloud::Monitoring::V3::GetGroupRequest.new
349
+ #
350
+ # # Call the get_group method.
351
+ # result = client.get_group request
352
+ #
353
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Group.
354
+ # p result
355
+ #
317
356
  def get_group request, options = nil
318
357
  raise ::ArgumentError, "request must be provided" if request.nil?
319
358
 
@@ -331,9 +370,11 @@ module Google
331
370
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
332
371
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
333
372
 
334
- header_params = {
335
- "name" => request.name
336
- }
373
+ header_params = {}
374
+ if request.name
375
+ header_params["name"] = request.name
376
+ end
377
+
337
378
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
338
379
  metadata[:"x-goog-request-params"] ||= request_params_header
339
380
 
@@ -372,7 +413,8 @@ module Google
372
413
  # the default parameter values, pass an empty Hash as a request object (see above).
373
414
  #
374
415
  # @param name [::String]
375
- # Required. The project in which to create the group. The format is:
416
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in
417
+ # which to create the group. The format is:
376
418
  #
377
419
  # projects/[PROJECT_ID_OR_NUMBER]
378
420
  # @param group [::Google::Cloud::Monitoring::V3::Group, ::Hash]
@@ -389,6 +431,21 @@ module Google
389
431
  #
390
432
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
391
433
  #
434
+ # @example Basic example
435
+ # require "google/cloud/monitoring/v3"
436
+ #
437
+ # # Create a client object. The client can be reused for multiple calls.
438
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
439
+ #
440
+ # # Create a request. To set request fields, pass in keyword arguments.
441
+ # request = Google::Cloud::Monitoring::V3::CreateGroupRequest.new
442
+ #
443
+ # # Call the create_group method.
444
+ # result = client.create_group request
445
+ #
446
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Group.
447
+ # p result
448
+ #
392
449
  def create_group request, options = nil
393
450
  raise ::ArgumentError, "request must be provided" if request.nil?
394
451
 
@@ -406,9 +463,11 @@ module Google
406
463
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
407
464
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
408
465
 
409
- header_params = {
410
- "name" => request.name
411
- }
466
+ header_params = {}
467
+ if request.name
468
+ header_params["name"] = request.name
469
+ end
470
+
412
471
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
413
472
  metadata[:"x-goog-request-params"] ||= request_params_header
414
473
 
@@ -461,6 +520,21 @@ module Google
461
520
  #
462
521
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
463
522
  #
523
+ # @example Basic example
524
+ # require "google/cloud/monitoring/v3"
525
+ #
526
+ # # Create a client object. The client can be reused for multiple calls.
527
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
528
+ #
529
+ # # Create a request. To set request fields, pass in keyword arguments.
530
+ # request = Google::Cloud::Monitoring::V3::UpdateGroupRequest.new
531
+ #
532
+ # # Call the update_group method.
533
+ # result = client.update_group request
534
+ #
535
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Group.
536
+ # p result
537
+ #
464
538
  def update_group request, options = nil
465
539
  raise ::ArgumentError, "request must be provided" if request.nil?
466
540
 
@@ -478,9 +552,11 @@ module Google
478
552
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
479
553
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
480
554
 
481
- header_params = {
482
- "group.name" => request.group.name
483
- }
555
+ header_params = {}
556
+ if request.group&.name
557
+ header_params["group.name"] = request.group.name
558
+ end
559
+
484
560
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
485
561
  metadata[:"x-goog-request-params"] ||= request_params_header
486
562
 
@@ -535,6 +611,21 @@ module Google
535
611
  #
536
612
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
537
613
  #
614
+ # @example Basic example
615
+ # require "google/cloud/monitoring/v3"
616
+ #
617
+ # # Create a client object. The client can be reused for multiple calls.
618
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
619
+ #
620
+ # # Create a request. To set request fields, pass in keyword arguments.
621
+ # request = Google::Cloud::Monitoring::V3::DeleteGroupRequest.new
622
+ #
623
+ # # Call the delete_group method.
624
+ # result = client.delete_group request
625
+ #
626
+ # # The returned object is of type Google::Protobuf::Empty.
627
+ # p result
628
+ #
538
629
  def delete_group request, options = nil
539
630
  raise ::ArgumentError, "request must be provided" if request.nil?
540
631
 
@@ -552,9 +643,11 @@ module Google
552
643
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
553
644
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
554
645
 
555
- header_params = {
556
- "name" => request.name
557
- }
646
+ header_params = {}
647
+ if request.name
648
+ header_params["name"] = request.name
649
+ end
650
+
558
651
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
559
652
  metadata[:"x-goog-request-params"] ||= request_params_header
560
653
 
@@ -625,6 +718,27 @@ module Google
625
718
  #
626
719
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
627
720
  #
721
+ # @example Basic example
722
+ # require "google/cloud/monitoring/v3"
723
+ #
724
+ # # Create a client object. The client can be reused for multiple calls.
725
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
726
+ #
727
+ # # Create a request. To set request fields, pass in keyword arguments.
728
+ # request = Google::Cloud::Monitoring::V3::ListGroupMembersRequest.new
729
+ #
730
+ # # Call the list_group_members method.
731
+ # result = client.list_group_members request
732
+ #
733
+ # # The returned object is of type Gapic::PagedEnumerable. You can
734
+ # # iterate over all elements by calling #each, and the enumerable
735
+ # # will lazily make API calls to fetch subsequent pages. Other
736
+ # # methods are also available for managing paging directly.
737
+ # result.each do |response|
738
+ # # Each element is of type ::Google::Api::MonitoredResource.
739
+ # p response
740
+ # end
741
+ #
628
742
  def list_group_members request, options = nil
629
743
  raise ::ArgumentError, "request must be provided" if request.nil?
630
744
 
@@ -642,9 +756,11 @@ module Google
642
756
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
643
757
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
644
758
 
645
- header_params = {
646
- "name" => request.name
647
- }
759
+ header_params = {}
760
+ if request.name
761
+ header_params["name"] = request.name
762
+ end
763
+
648
764
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
649
765
  metadata[:"x-goog-request-params"] ||= request_params_header
650
766