google-cloud-monitoring-v3 0.4.2 → 0.6.1

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 +157 -61
  3. data/lib/google/cloud/monitoring/v3/group_service/client.rb +189 -68
  4. data/lib/google/cloud/monitoring/v3/metric_service/client.rb +360 -80
  5. data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +286 -87
  6. data/lib/google/cloud/monitoring/v3/query_service/client.rb +60 -41
  7. data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +281 -84
  8. data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +182 -63
  9. data/lib/google/cloud/monitoring/v3/version.rb +1 -1
  10. data/lib/google/monitoring/v3/alert_pb.rb +17 -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 +68 -3
  34. data/proto_docs/google/monitoring/v3/alert_service.rb +4 -2
  35. data/proto_docs/google/monitoring/v3/common.rb +17 -5
  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 +5 -4
@@ -48,13 +48,12 @@ module Google
48
48
  # See {::Google::Cloud::Monitoring::V3::UptimeCheckService::Client::Configuration}
49
49
  # for a description of the configuration fields.
50
50
  #
51
- # ## Example
51
+ # @example
52
52
  #
53
- # To modify the configuration for all UptimeCheckService clients:
54
- #
55
- # ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.configure do |config|
56
- # config.timeout = 10.0
57
- # end
53
+ # # Modify the configuration for all UptimeCheckService clients
54
+ # ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
58
57
  #
59
58
  # @yield [config] Configure the Client client.
60
59
  # @yieldparam config [Client::Configuration]
@@ -74,12 +73,12 @@ module Google
74
73
 
75
74
  default_config.rpcs.list_uptime_check_configs.timeout = 30.0
76
75
  default_config.rpcs.list_uptime_check_configs.retry_policy = {
77
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
76
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
78
77
  }
79
78
 
80
79
  default_config.rpcs.get_uptime_check_config.timeout = 30.0
81
80
  default_config.rpcs.get_uptime_check_config.retry_policy = {
82
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
83
82
  }
84
83
 
85
84
  default_config.rpcs.create_uptime_check_config.timeout = 30.0
@@ -88,12 +87,12 @@ module Google
88
87
 
89
88
  default_config.rpcs.delete_uptime_check_config.timeout = 30.0
90
89
  default_config.rpcs.delete_uptime_check_config.retry_policy = {
91
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
90
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
92
91
  }
93
92
 
94
93
  default_config.rpcs.list_uptime_check_ips.timeout = 30.0
95
94
  default_config.rpcs.list_uptime_check_ips.retry_policy = {
96
- initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
95
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
97
96
  }
98
97
 
99
98
  default_config
@@ -125,19 +124,15 @@ module Google
125
124
  ##
126
125
  # Create a new UptimeCheckService client object.
127
126
  #
128
- # ## Examples
129
- #
130
- # To create a new UptimeCheckService client with the default
131
- # configuration:
127
+ # @example
132
128
  #
133
- # client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
129
+ # # Create a client using the default configuration
130
+ # client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
134
131
  #
135
- # To create a new UptimeCheckService client with a custom
136
- # configuration:
137
- #
138
- # client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new do |config|
139
- # config.timeout = 10.0
140
- # end
132
+ # # Create a client using a custom configuration
133
+ # client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new do |config|
134
+ # config.timeout = 10.0
135
+ # end
141
136
  #
142
137
  # @yield [config] Configure the UptimeCheckService client.
143
138
  # @yieldparam config [Client::Configuration]
@@ -157,10 +152,9 @@ module Google
157
152
 
158
153
  # Create credentials
159
154
  credentials = @config.credentials
160
- # 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,
161
156
  # but only if the default endpoint does not have a region prefix.
162
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
163
- @config.endpoint == Client.configure.endpoint &&
157
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
164
158
  !@config.endpoint.split(".").first.include?("-")
165
159
  credentials ||= Credentials.default scope: @config.scope,
166
160
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -201,7 +195,8 @@ module Google
201
195
  # the default parameter values, pass an empty Hash as a request object (see above).
202
196
  #
203
197
  # @param parent [::String]
204
- # Required. The project whose Uptime check configurations are listed. The format is:
198
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name)
199
+ # whose Uptime check configurations are listed. The format is:
205
200
  #
206
201
  # projects/[PROJECT_ID_OR_NUMBER]
207
202
  # @param page_size [::Integer]
@@ -222,6 +217,27 @@ module Google
222
217
  #
223
218
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
224
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
+ #
225
241
  def list_uptime_check_configs request, options = nil
226
242
  raise ::ArgumentError, "request must be provided" if request.nil?
227
243
 
@@ -239,16 +255,20 @@ module Google
239
255
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
240
256
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
241
257
 
242
- header_params = {
243
- "parent" => request.parent
244
- }
258
+ header_params = {}
259
+ if request.parent
260
+ header_params["parent"] = request.parent
261
+ end
262
+
245
263
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
246
264
  metadata[:"x-goog-request-params"] ||= request_params_header
247
265
 
248
266
  options.apply_defaults timeout: @config.rpcs.list_uptime_check_configs.timeout,
249
267
  metadata: metadata,
250
268
  retry_policy: @config.rpcs.list_uptime_check_configs.retry_policy
251
- options.apply_defaults metadata: @config.metadata,
269
+
270
+ options.apply_defaults timeout: @config.timeout,
271
+ metadata: @config.metadata,
252
272
  retry_policy: @config.retry_policy
253
273
 
254
274
  @uptime_check_service_stub.call_rpc :list_uptime_check_configs, request, options: options do |response, operation|
@@ -291,6 +311,21 @@ module Google
291
311
  #
292
312
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
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
+ #
294
329
  def get_uptime_check_config request, options = nil
295
330
  raise ::ArgumentError, "request must be provided" if request.nil?
296
331
 
@@ -308,16 +343,20 @@ module Google
308
343
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
309
344
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
310
345
 
311
- header_params = {
312
- "name" => request.name
313
- }
346
+ header_params = {}
347
+ if request.name
348
+ header_params["name"] = request.name
349
+ end
350
+
314
351
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
315
352
  metadata[:"x-goog-request-params"] ||= request_params_header
316
353
 
317
354
  options.apply_defaults timeout: @config.rpcs.get_uptime_check_config.timeout,
318
355
  metadata: metadata,
319
356
  retry_policy: @config.rpcs.get_uptime_check_config.retry_policy
320
- options.apply_defaults metadata: @config.metadata,
357
+
358
+ options.apply_defaults timeout: @config.timeout,
359
+ metadata: @config.metadata,
321
360
  retry_policy: @config.retry_policy
322
361
 
323
362
  @uptime_check_service_stub.call_rpc :get_uptime_check_config, request, options: options do |response, operation|
@@ -347,7 +386,8 @@ module Google
347
386
  # the default parameter values, pass an empty Hash as a request object (see above).
348
387
  #
349
388
  # @param parent [::String]
350
- # Required. The project in which to create the Uptime check. The format is:
389
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in
390
+ # which to create the Uptime check. The format is:
351
391
  #
352
392
  # projects/[PROJECT_ID_OR_NUMBER]
353
393
  # @param uptime_check_config [::Google::Cloud::Monitoring::V3::UptimeCheckConfig, ::Hash]
@@ -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,16 +433,20 @@ 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
 
387
444
  options.apply_defaults timeout: @config.rpcs.create_uptime_check_config.timeout,
388
445
  metadata: metadata,
389
446
  retry_policy: @config.rpcs.create_uptime_check_config.retry_policy
390
- options.apply_defaults metadata: @config.metadata,
447
+
448
+ options.apply_defaults timeout: @config.timeout,
449
+ metadata: @config.metadata,
391
450
  retry_policy: @config.retry_policy
392
451
 
393
452
  @uptime_check_service_stub.call_rpc :create_uptime_check_config, request, options: options do |response, operation|
@@ -445,6 +504,21 @@ module Google
445
504
  #
446
505
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
447
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
+ #
448
522
  def update_uptime_check_config request, options = nil
449
523
  raise ::ArgumentError, "request must be provided" if request.nil?
450
524
 
@@ -462,16 +536,20 @@ module Google
462
536
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
463
537
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
464
538
 
465
- header_params = {
466
- "uptime_check_config.name" => request.uptime_check_config.name
467
- }
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
+
468
544
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
469
545
  metadata[:"x-goog-request-params"] ||= request_params_header
470
546
 
471
547
  options.apply_defaults timeout: @config.rpcs.update_uptime_check_config.timeout,
472
548
  metadata: metadata,
473
549
  retry_policy: @config.rpcs.update_uptime_check_config.retry_policy
474
- options.apply_defaults metadata: @config.metadata,
550
+
551
+ options.apply_defaults timeout: @config.timeout,
552
+ metadata: @config.metadata,
475
553
  retry_policy: @config.retry_policy
476
554
 
477
555
  @uptime_check_service_stub.call_rpc :update_uptime_check_config, request, options: options do |response, operation|
@@ -515,6 +593,21 @@ module Google
515
593
  #
516
594
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
517
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
+ #
518
611
  def delete_uptime_check_config request, options = nil
519
612
  raise ::ArgumentError, "request must be provided" if request.nil?
520
613
 
@@ -532,16 +625,20 @@ module Google
532
625
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
533
626
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
534
627
 
535
- header_params = {
536
- "name" => request.name
537
- }
628
+ header_params = {}
629
+ if request.name
630
+ header_params["name"] = request.name
631
+ end
632
+
538
633
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
539
634
  metadata[:"x-goog-request-params"] ||= request_params_header
540
635
 
541
636
  options.apply_defaults timeout: @config.rpcs.delete_uptime_check_config.timeout,
542
637
  metadata: metadata,
543
638
  retry_policy: @config.rpcs.delete_uptime_check_config.retry_policy
544
- options.apply_defaults metadata: @config.metadata,
639
+
640
+ options.apply_defaults timeout: @config.timeout,
641
+ metadata: @config.metadata,
545
642
  retry_policy: @config.retry_policy
546
643
 
547
644
  @uptime_check_service_stub.call_rpc :delete_uptime_check_config, request, options: options do |response, operation|
@@ -590,6 +687,27 @@ module Google
590
687
  #
591
688
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
592
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
+ #
593
711
  def list_uptime_check_ips request, options = nil
594
712
  raise ::ArgumentError, "request must be provided" if request.nil?
595
713
 
@@ -610,7 +728,9 @@ module Google
610
728
  options.apply_defaults timeout: @config.rpcs.list_uptime_check_ips.timeout,
611
729
  metadata: metadata,
612
730
  retry_policy: @config.rpcs.list_uptime_check_ips.retry_policy
613
- options.apply_defaults metadata: @config.metadata,
731
+
732
+ options.apply_defaults timeout: @config.timeout,
733
+ metadata: @config.metadata,
614
734
  retry_policy: @config.retry_policy
615
735
 
616
736
  @uptime_check_service_stub.call_rpc :list_uptime_check_ips, request, options: options do |response, operation|
@@ -635,22 +755,21 @@ module Google
635
755
  # Configuration can be applied globally to all clients, or to a single client
636
756
  # on construction.
637
757
  #
638
- # # Examples
639
- #
640
- # To modify the global config, setting the timeout for list_uptime_check_configs
641
- # to 20 seconds, and all remaining timeouts to 10 seconds:
642
- #
643
- # ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.configure do |config|
644
- # config.timeout = 10.0
645
- # config.rpcs.list_uptime_check_configs.timeout = 20.0
646
- # end
647
- #
648
- # To apply the above configuration only to a new client:
649
- #
650
- # client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new do |config|
651
- # config.timeout = 10.0
652
- # config.rpcs.list_uptime_check_configs.timeout = 20.0
653
- # end
758
+ # @example
759
+ #
760
+ # # Modify the global config, setting the timeout for
761
+ # # list_uptime_check_configs to 20 seconds,
762
+ # # and all remaining timeouts to 10 seconds.
763
+ # ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.configure do |config|
764
+ # config.timeout = 10.0
765
+ # config.rpcs.list_uptime_check_configs.timeout = 20.0
766
+ # end
767
+ #
768
+ # # Apply the above configuration only to a new client.
769
+ # client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new do |config|
770
+ # config.timeout = 10.0
771
+ # config.rpcs.list_uptime_check_configs.timeout = 20.0
772
+ # end
654
773
  #
655
774
  # @!attribute [rw] endpoint
656
775
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Monitoring
23
23
  module V3
24
- VERSION = "0.4.2"
24
+ VERSION = "0.6.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
@@ -24,6 +24,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
24
24
  repeated :notification_channels, :string, 14
25
25
  optional :creation_record, :message, 10, "google.monitoring.v3.MutationRecord"
26
26
  optional :mutation_record, :message, 11, "google.monitoring.v3.MutationRecord"
27
+ optional :alert_strategy, :message, 21, "google.monitoring.v3.AlertPolicy.AlertStrategy"
27
28
  end
28
29
  add_message "google.monitoring.v3.AlertPolicy.Documentation" do
29
30
  optional :content, :string, 1
@@ -35,6 +36,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
35
36
  oneof :condition do
36
37
  optional :condition_threshold, :message, 1, "google.monitoring.v3.AlertPolicy.Condition.MetricThreshold"
37
38
  optional :condition_absent, :message, 2, "google.monitoring.v3.AlertPolicy.Condition.MetricAbsence"
39
+ optional :condition_matched_log, :message, 20, "google.monitoring.v3.AlertPolicy.Condition.LogMatch"
38
40
  optional :condition_monitoring_query_language, :message, 19, "google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition"
39
41
  end
40
42
  end
@@ -60,11 +62,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
60
62
  optional :duration, :message, 2, "google.protobuf.Duration"
61
63
  optional :trigger, :message, 3, "google.monitoring.v3.AlertPolicy.Condition.Trigger"
62
64
  end
65
+ add_message "google.monitoring.v3.AlertPolicy.Condition.LogMatch" do
66
+ optional :filter, :string, 1
67
+ map :label_extractors, :string, :string, 2
68
+ end
63
69
  add_message "google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition" do
64
70
  optional :query, :string, 1
65
71
  optional :duration, :message, 2, "google.protobuf.Duration"
66
72
  optional :trigger, :message, 3, "google.monitoring.v3.AlertPolicy.Condition.Trigger"
67
73
  end
74
+ add_message "google.monitoring.v3.AlertPolicy.AlertStrategy" do
75
+ optional :notification_rate_limit, :message, 1, "google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit"
76
+ end
77
+ add_message "google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit" do
78
+ optional :period, :message, 1, "google.protobuf.Duration"
79
+ end
68
80
  add_enum "google.monitoring.v3.AlertPolicy.ConditionCombinerType" do
69
81
  value :COMBINE_UNSPECIFIED, 0
70
82
  value :AND, 1
@@ -84,7 +96,10 @@ module Google
84
96
  AlertPolicy::Condition::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.Trigger").msgclass
85
97
  AlertPolicy::Condition::MetricThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MetricThreshold").msgclass
86
98
  AlertPolicy::Condition::MetricAbsence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MetricAbsence").msgclass
99
+ AlertPolicy::Condition::LogMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.LogMatch").msgclass
87
100
  AlertPolicy::Condition::MonitoringQueryLanguageCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition").msgclass
101
+ AlertPolicy::AlertStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.AlertStrategy").msgclass
102
+ AlertPolicy::AlertStrategy::NotificationRateLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit").msgclass
88
103
  AlertPolicy::ConditionCombinerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.ConditionCombinerType").enummodule
89
104
  end
90
105
  end
@@ -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
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/monitoring/v3/common.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/distribution_pb'
7
5
  require 'google/protobuf/duration_pb'
8
6
  require 'google/protobuf/timestamp_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/monitoring/v3/common.proto", :syntax => :proto3) do
11
11
  add_message "google.monitoring.v3.TypedValue" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/monitoring/v3/group.proto
3
3
 
4
+ require 'google/api/resource_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/resource_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/monitoring/v3/group.proto", :syntax => :proto3) do
9
9
  add_message "google.monitoring.v3.Group" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/monitoring/v3/group_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'
@@ -11,6 +9,8 @@ require 'google/api/resource_pb'
11
9
  require 'google/monitoring/v3/common_pb'
12
10
  require 'google/monitoring/v3/group_pb'
13
11
  require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/monitoring/v3/group_service.proto", :syntax => :proto3) do
16
16
  add_message "google.monitoring.v3.ListGroupsRequest" do
@@ -38,7 +38,7 @@ module Google
38
38
  # from the infrastructure.
39
39
  class Service
40
40
 
41
- include GRPC::GenericService
41
+ include ::GRPC::GenericService
42
42
 
43
43
  self.marshal_class_method = :encode
44
44
  self.unmarshal_class_method = :decode
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/monitoring/v3/metric.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/distribution_pb'
7
5
  require 'google/api/label_pb'
8
6
  require 'google/api/metric_pb'
9
7
  require 'google/api/monitored_resource_pb'
10
8
  require 'google/monitoring/v3/common_pb'
11
9
  require 'google/protobuf/duration_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/monitoring/v3/metric.proto", :syntax => :proto3) do
14
14
  add_message "google.monitoring.v3.Point" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/monitoring/v3/metric_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'
@@ -15,6 +13,8 @@ require 'google/monitoring/v3/metric_pb'
15
13
  require 'google/protobuf/duration_pb'
16
14
  require 'google/protobuf/empty_pb'
17
15
  require 'google/rpc/status_pb'
16
+ require 'google/protobuf'
17
+
18
18
  Google::Protobuf::DescriptorPool.generated_pool.build do
19
19
  add_file("google/monitoring/v3/metric_service.proto", :syntax => :proto3) do
20
20
  add_message "google.monitoring.v3.ListMonitoredResourceDescriptorsRequest" do
@@ -28,7 +28,7 @@ module Google
28
28
  # time series data.
29
29
  class Service
30
30
 
31
- include GRPC::GenericService
31
+ include ::GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode
@@ -43,6 +43,8 @@ module Google
43
43
  # Gets a single metric descriptor. This method does not require a Workspace.
44
44
  rpc :GetMetricDescriptor, ::Google::Cloud::Monitoring::V3::GetMetricDescriptorRequest, ::Google::Api::MetricDescriptor
45
45
  # Creates a new metric descriptor.
46
+ # The creation is executed asynchronously and callers may check the returned
47
+ # operation to track its progress.
46
48
  # User-created metric descriptors define
47
49
  # [custom metrics](https://cloud.google.com/monitoring/custom-metrics).
48
50
  rpc :CreateMetricDescriptor, ::Google::Cloud::Monitoring::V3::CreateMetricDescriptorRequest, ::Google::Api::MetricDescriptor
@@ -57,6 +59,16 @@ module Google
57
59
  # If any time series could not be written, a corresponding failure message is
58
60
  # included in the error response.
59
61
  rpc :CreateTimeSeries, ::Google::Cloud::Monitoring::V3::CreateTimeSeriesRequest, ::Google::Protobuf::Empty
62
+ # Creates or adds data to one or more service time series. A service time
63
+ # series is a time series for a metric from a Google Cloud service. The
64
+ # response is empty if all time series in the request were written. If any
65
+ # time series could not be written, a corresponding failure message is
66
+ # included in the error response. This endpoint rejects writes to
67
+ # user-defined metrics.
68
+ # This method is only for use by Google Cloud services. Use
69
+ # [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
70
+ # instead.
71
+ rpc :CreateServiceTimeSeries, ::Google::Cloud::Monitoring::V3::CreateTimeSeriesRequest, ::Google::Protobuf::Empty
60
72
  end
61
73
 
62
74
  Stub = Service.rpc_stub_class