google-cloud-monitoring-v3 0.5.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +106 -15
  5. data/lib/google/cloud/monitoring/v3/group_service/client.rb +132 -18
  6. data/lib/google/cloud/monitoring/v3/metric_service/client.rb +291 -24
  7. data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +212 -30
  8. data/lib/google/cloud/monitoring/v3/query_service/client.rb +26 -3
  9. data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +212 -30
  10. data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +127 -15
  11. data/lib/google/cloud/monitoring/v3/version.rb +1 -1
  12. data/lib/google/monitoring/v3/alert_pb.rb +3 -2
  13. data/lib/google/monitoring/v3/alert_service_pb.rb +2 -2
  14. data/lib/google/monitoring/v3/alert_service_services_pb.rb +1 -1
  15. data/lib/google/monitoring/v3/common_pb.rb +8 -2
  16. data/lib/google/monitoring/v3/group_pb.rb +1 -1
  17. data/lib/google/monitoring/v3/group_service_pb.rb +2 -2
  18. data/lib/google/monitoring/v3/group_service_services_pb.rb +1 -1
  19. data/lib/google/monitoring/v3/metric_pb.rb +2 -2
  20. data/lib/google/monitoring/v3/metric_service_pb.rb +2 -2
  21. data/lib/google/monitoring/v3/metric_service_services_pb.rb +13 -1
  22. data/lib/google/monitoring/v3/mutation_record_pb.rb +1 -1
  23. data/lib/google/monitoring/v3/notification_pb.rb +4 -2
  24. data/lib/google/monitoring/v3/notification_service_pb.rb +2 -2
  25. data/lib/google/monitoring/v3/notification_service_services_pb.rb +1 -1
  26. data/lib/google/monitoring/v3/query_service_pb.rb +2 -2
  27. data/lib/google/monitoring/v3/query_service_services_pb.rb +1 -1
  28. data/lib/google/monitoring/v3/service_pb.rb +3 -2
  29. data/lib/google/monitoring/v3/service_service_pb.rb +2 -2
  30. data/lib/google/monitoring/v3/service_service_services_pb.rb +1 -1
  31. data/lib/google/monitoring/v3/uptime_pb.rb +2 -2
  32. data/lib/google/monitoring/v3/uptime_service_pb.rb +2 -2
  33. data/lib/google/monitoring/v3/uptime_service_services_pb.rb +1 -1
  34. data/proto_docs/google/api/resource.rb +10 -71
  35. data/proto_docs/google/monitoring/v3/alert.rb +9 -5
  36. data/proto_docs/google/monitoring/v3/common.rb +25 -1
  37. data/proto_docs/google/monitoring/v3/notification.rb +4 -0
  38. metadata +3 -3
@@ -222,6 +222,21 @@ module Google
222
222
  #
223
223
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
224
224
  #
225
+ # @example Basic example
226
+ # require "google/cloud/monitoring/v3"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Cloud::Monitoring::V3::CreateServiceRequest.new
233
+ #
234
+ # # Call the create_service method.
235
+ # result = client.create_service request
236
+ #
237
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Service.
238
+ # p result
239
+ #
225
240
  def create_service request, options = nil
226
241
  raise ::ArgumentError, "request must be provided" if request.nil?
227
242
 
@@ -239,9 +254,11 @@ module Google
239
254
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
240
255
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
241
256
 
242
- header_params = {
243
- "parent" => request.parent
244
- }
257
+ header_params = {}
258
+ if request.parent
259
+ header_params["parent"] = request.parent
260
+ end
261
+
245
262
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
246
263
  metadata[:"x-goog-request-params"] ||= request_params_header
247
264
 
@@ -292,6 +309,21 @@ module Google
292
309
  #
293
310
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
294
311
  #
312
+ # @example Basic example
313
+ # require "google/cloud/monitoring/v3"
314
+ #
315
+ # # Create a client object. The client can be reused for multiple calls.
316
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
317
+ #
318
+ # # Create a request. To set request fields, pass in keyword arguments.
319
+ # request = Google::Cloud::Monitoring::V3::GetServiceRequest.new
320
+ #
321
+ # # Call the get_service method.
322
+ # result = client.get_service request
323
+ #
324
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Service.
325
+ # p result
326
+ #
295
327
  def get_service request, options = nil
296
328
  raise ::ArgumentError, "request must be provided" if request.nil?
297
329
 
@@ -309,9 +341,11 @@ module Google
309
341
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
310
342
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
311
343
 
312
- header_params = {
313
- "name" => request.name
314
- }
344
+ header_params = {}
345
+ if request.name
346
+ header_params["name"] = request.name
347
+ end
348
+
315
349
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
316
350
  metadata[:"x-goog-request-params"] ||= request_params_header
317
351
 
@@ -392,6 +426,27 @@ module Google
392
426
  #
393
427
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
394
428
  #
429
+ # @example Basic example
430
+ # require "google/cloud/monitoring/v3"
431
+ #
432
+ # # Create a client object. The client can be reused for multiple calls.
433
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
434
+ #
435
+ # # Create a request. To set request fields, pass in keyword arguments.
436
+ # request = Google::Cloud::Monitoring::V3::ListServicesRequest.new
437
+ #
438
+ # # Call the list_services method.
439
+ # result = client.list_services request
440
+ #
441
+ # # The returned object is of type Gapic::PagedEnumerable. You can
442
+ # # iterate over all elements by calling #each, and the enumerable
443
+ # # will lazily make API calls to fetch subsequent pages. Other
444
+ # # methods are also available for managing paging directly.
445
+ # result.each do |response|
446
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::Service.
447
+ # p response
448
+ # end
449
+ #
395
450
  def list_services request, options = nil
396
451
  raise ::ArgumentError, "request must be provided" if request.nil?
397
452
 
@@ -409,9 +464,11 @@ module Google
409
464
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
410
465
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
411
466
 
412
- header_params = {
413
- "parent" => request.parent
414
- }
467
+ header_params = {}
468
+ if request.parent
469
+ header_params["parent"] = request.parent
470
+ end
471
+
415
472
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
416
473
  metadata[:"x-goog-request-params"] ||= request_params_header
417
474
 
@@ -464,6 +521,21 @@ module Google
464
521
  #
465
522
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
466
523
  #
524
+ # @example Basic example
525
+ # require "google/cloud/monitoring/v3"
526
+ #
527
+ # # Create a client object. The client can be reused for multiple calls.
528
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
529
+ #
530
+ # # Create a request. To set request fields, pass in keyword arguments.
531
+ # request = Google::Cloud::Monitoring::V3::UpdateServiceRequest.new
532
+ #
533
+ # # Call the update_service method.
534
+ # result = client.update_service request
535
+ #
536
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Service.
537
+ # p result
538
+ #
467
539
  def update_service request, options = nil
468
540
  raise ::ArgumentError, "request must be provided" if request.nil?
469
541
 
@@ -481,9 +553,11 @@ module Google
481
553
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
482
554
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
483
555
 
484
- header_params = {
485
- "service.name" => request.service.name
486
- }
556
+ header_params = {}
557
+ if request.service&.name
558
+ header_params["service.name"] = request.service.name
559
+ end
560
+
487
561
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
488
562
  metadata[:"x-goog-request-params"] ||= request_params_header
489
563
 
@@ -534,6 +608,21 @@ module Google
534
608
  #
535
609
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
536
610
  #
611
+ # @example Basic example
612
+ # require "google/cloud/monitoring/v3"
613
+ #
614
+ # # Create a client object. The client can be reused for multiple calls.
615
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
616
+ #
617
+ # # Create a request. To set request fields, pass in keyword arguments.
618
+ # request = Google::Cloud::Monitoring::V3::DeleteServiceRequest.new
619
+ #
620
+ # # Call the delete_service method.
621
+ # result = client.delete_service request
622
+ #
623
+ # # The returned object is of type Google::Protobuf::Empty.
624
+ # p result
625
+ #
537
626
  def delete_service request, options = nil
538
627
  raise ::ArgumentError, "request must be provided" if request.nil?
539
628
 
@@ -551,9 +640,11 @@ module Google
551
640
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
552
641
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
553
642
 
554
- header_params = {
555
- "name" => request.name
556
- }
643
+ header_params = {}
644
+ if request.name
645
+ header_params["name"] = request.name
646
+ end
647
+
557
648
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
558
649
  metadata[:"x-goog-request-params"] ||= request_params_header
559
650
 
@@ -612,6 +703,21 @@ module Google
612
703
  #
613
704
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
614
705
  #
706
+ # @example Basic example
707
+ # require "google/cloud/monitoring/v3"
708
+ #
709
+ # # Create a client object. The client can be reused for multiple calls.
710
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
711
+ #
712
+ # # Create a request. To set request fields, pass in keyword arguments.
713
+ # request = Google::Cloud::Monitoring::V3::CreateServiceLevelObjectiveRequest.new
714
+ #
715
+ # # Call the create_service_level_objective method.
716
+ # result = client.create_service_level_objective request
717
+ #
718
+ # # The returned object is of type Google::Cloud::Monitoring::V3::ServiceLevelObjective.
719
+ # p result
720
+ #
615
721
  def create_service_level_objective request, options = nil
616
722
  raise ::ArgumentError, "request must be provided" if request.nil?
617
723
 
@@ -629,9 +735,11 @@ module Google
629
735
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
630
736
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
631
737
 
632
- header_params = {
633
- "parent" => request.parent
634
- }
738
+ header_params = {}
739
+ if request.parent
740
+ header_params["parent"] = request.parent
741
+ end
742
+
635
743
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
636
744
  metadata[:"x-goog-request-params"] ||= request_params_header
637
745
 
@@ -687,6 +795,21 @@ module Google
687
795
  #
688
796
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
689
797
  #
798
+ # @example Basic example
799
+ # require "google/cloud/monitoring/v3"
800
+ #
801
+ # # Create a client object. The client can be reused for multiple calls.
802
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
803
+ #
804
+ # # Create a request. To set request fields, pass in keyword arguments.
805
+ # request = Google::Cloud::Monitoring::V3::GetServiceLevelObjectiveRequest.new
806
+ #
807
+ # # Call the get_service_level_objective method.
808
+ # result = client.get_service_level_objective request
809
+ #
810
+ # # The returned object is of type Google::Cloud::Monitoring::V3::ServiceLevelObjective.
811
+ # p result
812
+ #
690
813
  def get_service_level_objective request, options = nil
691
814
  raise ::ArgumentError, "request must be provided" if request.nil?
692
815
 
@@ -704,9 +827,11 @@ module Google
704
827
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
705
828
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
706
829
 
707
- header_params = {
708
- "name" => request.name
709
- }
830
+ header_params = {}
831
+ if request.name
832
+ header_params["name"] = request.name
833
+ end
834
+
710
835
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
711
836
  metadata[:"x-goog-request-params"] ||= request_params_header
712
837
 
@@ -773,6 +898,27 @@ module Google
773
898
  #
774
899
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
775
900
  #
901
+ # @example Basic example
902
+ # require "google/cloud/monitoring/v3"
903
+ #
904
+ # # Create a client object. The client can be reused for multiple calls.
905
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
906
+ #
907
+ # # Create a request. To set request fields, pass in keyword arguments.
908
+ # request = Google::Cloud::Monitoring::V3::ListServiceLevelObjectivesRequest.new
909
+ #
910
+ # # Call the list_service_level_objectives method.
911
+ # result = client.list_service_level_objectives request
912
+ #
913
+ # # The returned object is of type Gapic::PagedEnumerable. You can
914
+ # # iterate over all elements by calling #each, and the enumerable
915
+ # # will lazily make API calls to fetch subsequent pages. Other
916
+ # # methods are also available for managing paging directly.
917
+ # result.each do |response|
918
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::ServiceLevelObjective.
919
+ # p response
920
+ # end
921
+ #
776
922
  def list_service_level_objectives request, options = nil
777
923
  raise ::ArgumentError, "request must be provided" if request.nil?
778
924
 
@@ -790,9 +936,11 @@ module Google
790
936
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
791
937
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
792
938
 
793
- header_params = {
794
- "parent" => request.parent
795
- }
939
+ header_params = {}
940
+ if request.parent
941
+ header_params["parent"] = request.parent
942
+ end
943
+
796
944
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
797
945
  metadata[:"x-goog-request-params"] ||= request_params_header
798
946
 
@@ -845,6 +993,21 @@ module Google
845
993
  #
846
994
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
847
995
  #
996
+ # @example Basic example
997
+ # require "google/cloud/monitoring/v3"
998
+ #
999
+ # # Create a client object. The client can be reused for multiple calls.
1000
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
1001
+ #
1002
+ # # Create a request. To set request fields, pass in keyword arguments.
1003
+ # request = Google::Cloud::Monitoring::V3::UpdateServiceLevelObjectiveRequest.new
1004
+ #
1005
+ # # Call the update_service_level_objective method.
1006
+ # result = client.update_service_level_objective request
1007
+ #
1008
+ # # The returned object is of type Google::Cloud::Monitoring::V3::ServiceLevelObjective.
1009
+ # p result
1010
+ #
848
1011
  def update_service_level_objective request, options = nil
849
1012
  raise ::ArgumentError, "request must be provided" if request.nil?
850
1013
 
@@ -862,9 +1025,11 @@ module Google
862
1025
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
863
1026
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
864
1027
 
865
- header_params = {
866
- "service_level_objective.name" => request.service_level_objective.name
867
- }
1028
+ header_params = {}
1029
+ if request.service_level_objective&.name
1030
+ header_params["service_level_objective.name"] = request.service_level_objective.name
1031
+ end
1032
+
868
1033
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
869
1034
  metadata[:"x-goog-request-params"] ||= request_params_header
870
1035
 
@@ -915,6 +1080,21 @@ module Google
915
1080
  #
916
1081
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
917
1082
  #
1083
+ # @example Basic example
1084
+ # require "google/cloud/monitoring/v3"
1085
+ #
1086
+ # # Create a client object. The client can be reused for multiple calls.
1087
+ # client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
1088
+ #
1089
+ # # Create a request. To set request fields, pass in keyword arguments.
1090
+ # request = Google::Cloud::Monitoring::V3::DeleteServiceLevelObjectiveRequest.new
1091
+ #
1092
+ # # Call the delete_service_level_objective method.
1093
+ # result = client.delete_service_level_objective request
1094
+ #
1095
+ # # The returned object is of type Google::Protobuf::Empty.
1096
+ # p result
1097
+ #
918
1098
  def delete_service_level_objective request, options = nil
919
1099
  raise ::ArgumentError, "request must be provided" if request.nil?
920
1100
 
@@ -932,9 +1112,11 @@ module Google
932
1112
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
933
1113
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
934
1114
 
935
- header_params = {
936
- "name" => request.name
937
- }
1115
+ header_params = {}
1116
+ if request.name
1117
+ header_params["name"] = request.name
1118
+ end
1119
+
938
1120
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
939
1121
  metadata[:"x-goog-request-params"] ||= request_params_header
940
1122
 
@@ -217,6 +217,27 @@ module Google
217
217
  #
218
218
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
219
219
  #
220
+ # @example Basic example
221
+ # require "google/cloud/monitoring/v3"
222
+ #
223
+ # # Create a client object. The client can be reused for multiple calls.
224
+ # client = Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
225
+ #
226
+ # # Create a request. To set request fields, pass in keyword arguments.
227
+ # request = Google::Cloud::Monitoring::V3::ListUptimeCheckConfigsRequest.new
228
+ #
229
+ # # Call the list_uptime_check_configs method.
230
+ # result = client.list_uptime_check_configs request
231
+ #
232
+ # # The returned object is of type Gapic::PagedEnumerable. You can
233
+ # # iterate over all elements by calling #each, and the enumerable
234
+ # # will lazily make API calls to fetch subsequent pages. Other
235
+ # # methods are also available for managing paging directly.
236
+ # result.each do |response|
237
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::UptimeCheckConfig.
238
+ # p response
239
+ # end
240
+ #
220
241
  def list_uptime_check_configs request, options = nil
221
242
  raise ::ArgumentError, "request must be provided" if request.nil?
222
243
 
@@ -234,9 +255,11 @@ module Google
234
255
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
235
256
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
236
257
 
237
- header_params = {
238
- "parent" => request.parent
239
- }
258
+ header_params = {}
259
+ if request.parent
260
+ header_params["parent"] = request.parent
261
+ end
262
+
240
263
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
241
264
  metadata[:"x-goog-request-params"] ||= request_params_header
242
265
 
@@ -288,6 +311,21 @@ module Google
288
311
  #
289
312
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
313
  #
314
+ # @example Basic example
315
+ # require "google/cloud/monitoring/v3"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Cloud::Monitoring::V3::GetUptimeCheckConfigRequest.new
322
+ #
323
+ # # Call the get_uptime_check_config method.
324
+ # result = client.get_uptime_check_config request
325
+ #
326
+ # # The returned object is of type Google::Cloud::Monitoring::V3::UptimeCheckConfig.
327
+ # p result
328
+ #
291
329
  def get_uptime_check_config request, options = nil
292
330
  raise ::ArgumentError, "request must be provided" if request.nil?
293
331
 
@@ -305,9 +343,11 @@ module Google
305
343
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
306
344
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
345
 
308
- header_params = {
309
- "name" => request.name
310
- }
346
+ header_params = {}
347
+ if request.name
348
+ header_params["name"] = request.name
349
+ end
350
+
311
351
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
352
  metadata[:"x-goog-request-params"] ||= request_params_header
313
353
 
@@ -361,6 +401,21 @@ module Google
361
401
  #
362
402
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
363
403
  #
404
+ # @example Basic example
405
+ # require "google/cloud/monitoring/v3"
406
+ #
407
+ # # Create a client object. The client can be reused for multiple calls.
408
+ # client = Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
409
+ #
410
+ # # Create a request. To set request fields, pass in keyword arguments.
411
+ # request = Google::Cloud::Monitoring::V3::CreateUptimeCheckConfigRequest.new
412
+ #
413
+ # # Call the create_uptime_check_config method.
414
+ # result = client.create_uptime_check_config request
415
+ #
416
+ # # The returned object is of type Google::Cloud::Monitoring::V3::UptimeCheckConfig.
417
+ # p result
418
+ #
364
419
  def create_uptime_check_config request, options = nil
365
420
  raise ::ArgumentError, "request must be provided" if request.nil?
366
421
 
@@ -378,9 +433,11 @@ module Google
378
433
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
379
434
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
380
435
 
381
- header_params = {
382
- "parent" => request.parent
383
- }
436
+ header_params = {}
437
+ if request.parent
438
+ header_params["parent"] = request.parent
439
+ end
440
+
384
441
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
385
442
  metadata[:"x-goog-request-params"] ||= request_params_header
386
443
 
@@ -447,6 +504,21 @@ module Google
447
504
  #
448
505
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
449
506
  #
507
+ # @example Basic example
508
+ # require "google/cloud/monitoring/v3"
509
+ #
510
+ # # Create a client object. The client can be reused for multiple calls.
511
+ # client = Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
512
+ #
513
+ # # Create a request. To set request fields, pass in keyword arguments.
514
+ # request = Google::Cloud::Monitoring::V3::UpdateUptimeCheckConfigRequest.new
515
+ #
516
+ # # Call the update_uptime_check_config method.
517
+ # result = client.update_uptime_check_config request
518
+ #
519
+ # # The returned object is of type Google::Cloud::Monitoring::V3::UptimeCheckConfig.
520
+ # p result
521
+ #
450
522
  def update_uptime_check_config request, options = nil
451
523
  raise ::ArgumentError, "request must be provided" if request.nil?
452
524
 
@@ -464,9 +536,11 @@ module Google
464
536
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
465
537
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
466
538
 
467
- header_params = {
468
- "uptime_check_config.name" => request.uptime_check_config.name
469
- }
539
+ header_params = {}
540
+ if request.uptime_check_config&.name
541
+ header_params["uptime_check_config.name"] = request.uptime_check_config.name
542
+ end
543
+
470
544
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
471
545
  metadata[:"x-goog-request-params"] ||= request_params_header
472
546
 
@@ -519,6 +593,21 @@ module Google
519
593
  #
520
594
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
521
595
  #
596
+ # @example Basic example
597
+ # require "google/cloud/monitoring/v3"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Cloud::Monitoring::V3::DeleteUptimeCheckConfigRequest.new
604
+ #
605
+ # # Call the delete_uptime_check_config method.
606
+ # result = client.delete_uptime_check_config request
607
+ #
608
+ # # The returned object is of type Google::Protobuf::Empty.
609
+ # p result
610
+ #
522
611
  def delete_uptime_check_config request, options = nil
523
612
  raise ::ArgumentError, "request must be provided" if request.nil?
524
613
 
@@ -536,9 +625,11 @@ module Google
536
625
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
537
626
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
538
627
 
539
- header_params = {
540
- "name" => request.name
541
- }
628
+ header_params = {}
629
+ if request.name
630
+ header_params["name"] = request.name
631
+ end
632
+
542
633
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
543
634
  metadata[:"x-goog-request-params"] ||= request_params_header
544
635
 
@@ -596,6 +687,27 @@ module Google
596
687
  #
597
688
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
598
689
  #
690
+ # @example Basic example
691
+ # require "google/cloud/monitoring/v3"
692
+ #
693
+ # # Create a client object. The client can be reused for multiple calls.
694
+ # client = Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
695
+ #
696
+ # # Create a request. To set request fields, pass in keyword arguments.
697
+ # request = Google::Cloud::Monitoring::V3::ListUptimeCheckIpsRequest.new
698
+ #
699
+ # # Call the list_uptime_check_ips method.
700
+ # result = client.list_uptime_check_ips request
701
+ #
702
+ # # The returned object is of type Gapic::PagedEnumerable. You can
703
+ # # iterate over all elements by calling #each, and the enumerable
704
+ # # will lazily make API calls to fetch subsequent pages. Other
705
+ # # methods are also available for managing paging directly.
706
+ # result.each do |response|
707
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::UptimeCheckIp.
708
+ # p response
709
+ # end
710
+ #
599
711
  def list_uptime_check_ips request, options = nil
600
712
  raise ::ArgumentError, "request must be provided" if request.nil?
601
713
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Monitoring
23
23
  module V3
24
- VERSION = "0.5.0"
24
+ VERSION = "0.7.1"
25
25
  end
26
26
  end
27
27
  end
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/monitoring/v3/alert.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/monitoring/v3/common_pb'
@@ -10,6 +8,8 @@ require 'google/monitoring/v3/mutation_record_pb'
10
8
  require 'google/protobuf/duration_pb'
11
9
  require 'google/protobuf/wrappers_pb'
12
10
  require 'google/rpc/status_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/monitoring/v3/alert.proto", :syntax => :proto3) do
15
15
  add_message "google.monitoring.v3.AlertPolicy" do
@@ -73,6 +73,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
73
73
  end
74
74
  add_message "google.monitoring.v3.AlertPolicy.AlertStrategy" do
75
75
  optional :notification_rate_limit, :message, 1, "google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit"
76
+ optional :auto_close, :message, 3, "google.protobuf.Duration"
76
77
  end
77
78
  add_message "google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit" do
78
79
  optional :period, :message, 1, "google.protobuf.Duration"
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/monitoring/v3/alert_service.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'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/monitoring/v3/alert_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/monitoring/v3/alert_service.proto", :syntax => :proto3) do
15
15
  add_message "google.monitoring.v3.CreateAlertPolicyRequest" do
@@ -35,7 +35,7 @@ module Google
35
35
  # [Cloud Console](https://console.cloud.google.com/).
36
36
  class Service
37
37
 
38
- include GRPC::GenericService
38
+ include ::GRPC::GenericService
39
39
 
40
40
  self.marshal_class_method = :encode
41
41
  self.unmarshal_class_method = :decode