google-cloud-monitoring-v3 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/README.md +1 -1
  4. data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +52 -56
  5. data/lib/google/cloud/monitoring/v3/alert_policy_service/paths.rb +14 -0
  6. data/lib/google/cloud/monitoring/v3/group_service/client.rb +58 -66
  7. data/lib/google/cloud/monitoring/v3/group_service/paths.rb +14 -0
  8. data/lib/google/cloud/monitoring/v3/metric_service/client.rb +72 -77
  9. data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +75 -79
  10. data/lib/google/cloud/monitoring/v3/notification_channel_service/paths.rb +14 -0
  11. data/lib/google/cloud/monitoring/v3/query_service/client.rb +35 -39
  12. data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +70 -73
  13. data/lib/google/cloud/monitoring/v3/service_monitoring_service/paths.rb +14 -0
  14. data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +56 -61
  15. data/lib/google/cloud/monitoring/v3/uptime_check_service/paths.rb +14 -0
  16. data/lib/google/cloud/monitoring/v3/version.rb +1 -1
  17. data/lib/google/monitoring/v3/alert_pb.rb +15 -0
  18. data/lib/google/monitoring/v3/common_pb.rb +0 -6
  19. data/lib/google/monitoring/v3/notification_pb.rb +0 -2
  20. data/lib/google/monitoring/v3/service_pb.rb +2 -0
  21. data/lib/google/monitoring/v3/uptime_service_pb.rb +1 -0
  22. data/proto_docs/google/api/distribution.rb +2 -2
  23. data/proto_docs/google/api/field_behavior.rb +7 -1
  24. data/proto_docs/google/api/launch_stage.rb +7 -1
  25. data/proto_docs/google/api/metric.rb +109 -36
  26. data/proto_docs/google/api/monitored_resource.rb +7 -6
  27. data/proto_docs/google/longrunning/operations.rb +164 -0
  28. data/proto_docs/google/monitoring/v3/alert.rb +66 -1
  29. data/proto_docs/google/monitoring/v3/alert_service.rb +4 -2
  30. data/proto_docs/google/monitoring/v3/common.rb +1 -13
  31. data/proto_docs/google/monitoring/v3/group_service.rb +4 -2
  32. data/proto_docs/google/monitoring/v3/metric.rb +3 -1
  33. data/proto_docs/google/monitoring/v3/metric_service.rb +13 -8
  34. data/proto_docs/google/monitoring/v3/notification.rb +0 -4
  35. data/proto_docs/google/monitoring/v3/notification_service.rb +8 -4
  36. data/proto_docs/google/monitoring/v3/service.rb +38 -6
  37. data/proto_docs/google/monitoring/v3/service_service.rb +4 -2
  38. data/proto_docs/google/monitoring/v3/span_context.rb +2 -2
  39. data/proto_docs/google/monitoring/v3/uptime.rb +5 -2
  40. data/proto_docs/google/monitoring/v3/uptime_service.rb +4 -2
  41. metadata +14 -7
@@ -104,6 +104,20 @@ module Google
104
104
  "organizations/#{organization}"
105
105
  end
106
106
 
107
+ ##
108
+ # Create a fully-qualified Project resource string.
109
+ #
110
+ # The resource will be in the following format:
111
+ #
112
+ # `projects/{project}`
113
+ #
114
+ # @param project [String]
115
+ #
116
+ # @return [::String]
117
+ def project_path project:
118
+ "projects/#{project}"
119
+ end
120
+
107
121
  ##
108
122
  # Create a fully-qualified Workspace resource string.
109
123
  #
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::Monitoring::V3::MetricService::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all MetricService clients:
48
- #
49
- # ::Google::Cloud::Monitoring::V3::MetricService::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all MetricService clients
48
+ # ::Google::Cloud::Monitoring::V3::MetricService::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -68,52 +67,34 @@ module Google
68
67
 
69
68
  default_config.rpcs.list_monitored_resource_descriptors.timeout = 30.0
70
69
  default_config.rpcs.list_monitored_resource_descriptors.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 30.0,
73
- multiplier: 1.3,
74
- retry_codes: [4, 14]
70
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
75
71
  }
76
72
 
77
73
  default_config.rpcs.get_monitored_resource_descriptor.timeout = 30.0
78
74
  default_config.rpcs.get_monitored_resource_descriptor.retry_policy = {
79
- initial_delay: 0.1,
80
- max_delay: 30.0,
81
- multiplier: 1.3,
82
- retry_codes: [4, 14]
75
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
83
76
  }
84
77
 
85
78
  default_config.rpcs.list_metric_descriptors.timeout = 30.0
86
79
  default_config.rpcs.list_metric_descriptors.retry_policy = {
87
- initial_delay: 0.1,
88
- max_delay: 30.0,
89
- multiplier: 1.3,
90
- retry_codes: [4, 14]
80
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
91
81
  }
92
82
 
93
83
  default_config.rpcs.get_metric_descriptor.timeout = 30.0
94
84
  default_config.rpcs.get_metric_descriptor.retry_policy = {
95
- initial_delay: 0.1,
96
- max_delay: 30.0,
97
- multiplier: 1.3,
98
- retry_codes: [4, 14]
85
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
99
86
  }
100
87
 
101
88
  default_config.rpcs.create_metric_descriptor.timeout = 12.0
102
89
 
103
90
  default_config.rpcs.delete_metric_descriptor.timeout = 30.0
104
91
  default_config.rpcs.delete_metric_descriptor.retry_policy = {
105
- initial_delay: 0.1,
106
- max_delay: 30.0,
107
- multiplier: 1.3,
108
- retry_codes: [4, 14]
92
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
109
93
  }
110
94
 
111
- default_config.rpcs.list_time_series.timeout = 30.0
95
+ default_config.rpcs.list_time_series.timeout = 90.0
112
96
  default_config.rpcs.list_time_series.retry_policy = {
113
- initial_delay: 0.1,
114
- max_delay: 30.0,
115
- multiplier: 1.3,
116
- retry_codes: [4, 14]
97
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
117
98
  }
118
99
 
119
100
  default_config.rpcs.create_time_series.timeout = 12.0
@@ -147,19 +128,15 @@ module Google
147
128
  ##
148
129
  # Create a new MetricService client object.
149
130
  #
150
- # ## Examples
151
- #
152
- # To create a new MetricService client with the default
153
- # configuration:
131
+ # @example
154
132
  #
155
- # client = ::Google::Cloud::Monitoring::V3::MetricService::Client.new
133
+ # # Create a client using the default configuration
134
+ # client = ::Google::Cloud::Monitoring::V3::MetricService::Client.new
156
135
  #
157
- # To create a new MetricService client with a custom
158
- # configuration:
159
- #
160
- # client = ::Google::Cloud::Monitoring::V3::MetricService::Client.new do |config|
161
- # config.timeout = 10.0
162
- # end
136
+ # # Create a client using a custom configuration
137
+ # client = ::Google::Cloud::Monitoring::V3::MetricService::Client.new do |config|
138
+ # config.timeout = 10.0
139
+ # end
163
140
  #
164
141
  # @yield [config] Configure the MetricService client.
165
142
  # @yieldparam config [Client::Configuration]
@@ -179,14 +156,13 @@ module Google
179
156
 
180
157
  # Create credentials
181
158
  credentials = @config.credentials
182
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
159
+ # Use self-signed JWT if the endpoint is unchanged from default,
183
160
  # but only if the default endpoint does not have a region prefix.
184
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
185
- @config.endpoint == Client.configure.endpoint &&
161
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
186
162
  !@config.endpoint.split(".").first.include?("-")
187
163
  credentials ||= Credentials.default scope: @config.scope,
188
164
  enable_self_signed_jwt: enable_self_signed_jwt
189
- if credentials.is_a?(String) || credentials.is_a?(Hash)
165
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
190
166
  credentials = Credentials.new credentials, scope: @config.scope
191
167
  end
192
168
  @quota_project_id = @config.quota_project
@@ -222,7 +198,8 @@ module Google
222
198
  # the default parameter values, pass an empty Hash as a request object (see above).
223
199
  #
224
200
  # @param name [::String]
225
- # Required. The project on which to execute the request. The format is:
201
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
202
+ # which to execute the request. The format is:
226
203
  #
227
204
  # projects/[PROJECT_ID_OR_NUMBER]
228
205
  # @param filter [::String]
@@ -273,7 +250,9 @@ module Google
273
250
  options.apply_defaults timeout: @config.rpcs.list_monitored_resource_descriptors.timeout,
274
251
  metadata: metadata,
275
252
  retry_policy: @config.rpcs.list_monitored_resource_descriptors.retry_policy
276
- options.apply_defaults metadata: @config.metadata,
253
+
254
+ options.apply_defaults timeout: @config.timeout,
255
+ metadata: @config.metadata,
277
256
  retry_policy: @config.retry_policy
278
257
 
279
258
  @metric_service_stub.call_rpc :list_monitored_resource_descriptors, request, options: options do |response, operation|
@@ -345,7 +324,9 @@ module Google
345
324
  options.apply_defaults timeout: @config.rpcs.get_monitored_resource_descriptor.timeout,
346
325
  metadata: metadata,
347
326
  retry_policy: @config.rpcs.get_monitored_resource_descriptor.retry_policy
348
- options.apply_defaults metadata: @config.metadata,
327
+
328
+ options.apply_defaults timeout: @config.timeout,
329
+ metadata: @config.metadata,
349
330
  retry_policy: @config.retry_policy
350
331
 
351
332
  @metric_service_stub.call_rpc :get_monitored_resource_descriptor, request, options: options do |response, operation|
@@ -375,7 +356,8 @@ module Google
375
356
  # the default parameter values, pass an empty Hash as a request object (see above).
376
357
  #
377
358
  # @param name [::String]
378
- # Required. The project on which to execute the request. The format is:
359
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
360
+ # which to execute the request. The format is:
379
361
  #
380
362
  # projects/[PROJECT_ID_OR_NUMBER]
381
363
  # @param filter [::String]
@@ -428,7 +410,9 @@ module Google
428
410
  options.apply_defaults timeout: @config.rpcs.list_metric_descriptors.timeout,
429
411
  metadata: metadata,
430
412
  retry_policy: @config.rpcs.list_metric_descriptors.retry_policy
431
- options.apply_defaults metadata: @config.metadata,
413
+
414
+ options.apply_defaults timeout: @config.timeout,
415
+ metadata: @config.metadata,
432
416
  retry_policy: @config.retry_policy
433
417
 
434
418
  @metric_service_stub.call_rpc :list_metric_descriptors, request, options: options do |response, operation|
@@ -500,7 +484,9 @@ module Google
500
484
  options.apply_defaults timeout: @config.rpcs.get_metric_descriptor.timeout,
501
485
  metadata: metadata,
502
486
  retry_policy: @config.rpcs.get_metric_descriptor.retry_policy
503
- options.apply_defaults metadata: @config.metadata,
487
+
488
+ options.apply_defaults timeout: @config.timeout,
489
+ metadata: @config.metadata,
504
490
  retry_policy: @config.retry_policy
505
491
 
506
492
  @metric_service_stub.call_rpc :get_metric_descriptor, request, options: options do |response, operation|
@@ -532,8 +518,9 @@ module Google
532
518
  # the default parameter values, pass an empty Hash as a request object (see above).
533
519
  #
534
520
  # @param name [::String]
535
- # Required. The project on which to execute the request. The format is:
536
- #
521
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
522
+ # which to execute the request. The format is:
523
+ # 4
537
524
  # projects/[PROJECT_ID_OR_NUMBER]
538
525
  # @param metric_descriptor [::Google::Api::MetricDescriptor, ::Hash]
539
526
  # Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics)
@@ -573,7 +560,9 @@ module Google
573
560
  options.apply_defaults timeout: @config.rpcs.create_metric_descriptor.timeout,
574
561
  metadata: metadata,
575
562
  retry_policy: @config.rpcs.create_metric_descriptor.retry_policy
576
- options.apply_defaults metadata: @config.metadata,
563
+
564
+ options.apply_defaults timeout: @config.timeout,
565
+ metadata: @config.metadata,
577
566
  retry_policy: @config.retry_policy
578
567
 
579
568
  @metric_service_stub.call_rpc :create_metric_descriptor, request, options: options do |response, operation|
@@ -646,7 +635,9 @@ module Google
646
635
  options.apply_defaults timeout: @config.rpcs.delete_metric_descriptor.timeout,
647
636
  metadata: metadata,
648
637
  retry_policy: @config.rpcs.delete_metric_descriptor.retry_policy
649
- options.apply_defaults metadata: @config.metadata,
638
+
639
+ options.apply_defaults timeout: @config.timeout,
640
+ metadata: @config.metadata,
650
641
  retry_policy: @config.retry_policy
651
642
 
652
643
  @metric_service_stub.call_rpc :delete_metric_descriptor, request, options: options do |response, operation|
@@ -676,8 +667,8 @@ module Google
676
667
  # the default parameter values, pass an empty Hash as a request object (see above).
677
668
  #
678
669
  # @param name [::String]
679
- # Required. The project, organization or folder on which to execute the request. The
680
- # format is:
670
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name),
671
+ # organization or folder on which to execute the request. The format is:
681
672
  #
682
673
  # projects/[PROJECT_ID_OR_NUMBER]
683
674
  # organizations/[ORGANIZATION_ID]
@@ -753,7 +744,9 @@ module Google
753
744
  options.apply_defaults timeout: @config.rpcs.list_time_series.timeout,
754
745
  metadata: metadata,
755
746
  retry_policy: @config.rpcs.list_time_series.retry_policy
756
- options.apply_defaults metadata: @config.metadata,
747
+
748
+ options.apply_defaults timeout: @config.timeout,
749
+ metadata: @config.metadata,
757
750
  retry_policy: @config.retry_policy
758
751
 
759
752
  @metric_service_stub.call_rpc :list_time_series, request, options: options do |response, operation|
@@ -787,7 +780,8 @@ module Google
787
780
  # the default parameter values, pass an empty Hash as a request object (see above).
788
781
  #
789
782
  # @param name [::String]
790
- # Required. The project on which to execute the request. The format is:
783
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
784
+ # which to execute the request. The format is:
791
785
  #
792
786
  # projects/[PROJECT_ID_OR_NUMBER]
793
787
  # @param time_series [::Array<::Google::Cloud::Monitoring::V3::TimeSeries, ::Hash>]
@@ -833,7 +827,9 @@ module Google
833
827
  options.apply_defaults timeout: @config.rpcs.create_time_series.timeout,
834
828
  metadata: metadata,
835
829
  retry_policy: @config.rpcs.create_time_series.retry_policy
836
- options.apply_defaults metadata: @config.metadata,
830
+
831
+ options.apply_defaults timeout: @config.timeout,
832
+ metadata: @config.metadata,
837
833
  retry_policy: @config.retry_policy
838
834
 
839
835
  @metric_service_stub.call_rpc :create_time_series, request, options: options do |response, operation|
@@ -857,22 +853,21 @@ module Google
857
853
  # Configuration can be applied globally to all clients, or to a single client
858
854
  # on construction.
859
855
  #
860
- # # Examples
861
- #
862
- # To modify the global config, setting the timeout for list_monitored_resource_descriptors
863
- # to 20 seconds, and all remaining timeouts to 10 seconds:
864
- #
865
- # ::Google::Cloud::Monitoring::V3::MetricService::Client.configure do |config|
866
- # config.timeout = 10.0
867
- # config.rpcs.list_monitored_resource_descriptors.timeout = 20.0
868
- # end
869
- #
870
- # To apply the above configuration only to a new client:
871
- #
872
- # client = ::Google::Cloud::Monitoring::V3::MetricService::Client.new do |config|
873
- # config.timeout = 10.0
874
- # config.rpcs.list_monitored_resource_descriptors.timeout = 20.0
875
- # end
856
+ # @example
857
+ #
858
+ # # Modify the global config, setting the timeout for
859
+ # # list_monitored_resource_descriptors to 20 seconds,
860
+ # # and all remaining timeouts to 10 seconds.
861
+ # ::Google::Cloud::Monitoring::V3::MetricService::Client.configure do |config|
862
+ # config.timeout = 10.0
863
+ # config.rpcs.list_monitored_resource_descriptors.timeout = 20.0
864
+ # end
865
+ #
866
+ # # Apply the above configuration only to a new client.
867
+ # client = ::Google::Cloud::Monitoring::V3::MetricService::Client.new do |config|
868
+ # config.timeout = 10.0
869
+ # config.rpcs.list_monitored_resource_descriptors.timeout = 20.0
870
+ # end
876
871
  #
877
872
  # @!attribute [rw] endpoint
878
873
  # The hostname or hostname:port of the service endpoint.
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::Monitoring::V3::NotificationChannelService::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all NotificationChannelService clients:
48
- #
49
- # ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all NotificationChannelService clients
48
+ # ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -68,34 +67,22 @@ module Google
68
67
 
69
68
  default_config.rpcs.list_notification_channel_descriptors.timeout = 30.0
70
69
  default_config.rpcs.list_notification_channel_descriptors.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 30.0,
73
- multiplier: 1.3,
74
- retry_codes: [4, 14]
70
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
75
71
  }
76
72
 
77
73
  default_config.rpcs.get_notification_channel_descriptor.timeout = 30.0
78
74
  default_config.rpcs.get_notification_channel_descriptor.retry_policy = {
79
- initial_delay: 0.1,
80
- max_delay: 30.0,
81
- multiplier: 1.3,
82
- retry_codes: [4, 14]
75
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
83
76
  }
84
77
 
85
78
  default_config.rpcs.list_notification_channels.timeout = 30.0
86
79
  default_config.rpcs.list_notification_channels.retry_policy = {
87
- initial_delay: 0.1,
88
- max_delay: 30.0,
89
- multiplier: 1.3,
90
- retry_codes: [4, 14]
80
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
91
81
  }
92
82
 
93
83
  default_config.rpcs.get_notification_channel.timeout = 30.0
94
84
  default_config.rpcs.get_notification_channel.retry_policy = {
95
- initial_delay: 0.1,
96
- max_delay: 30.0,
97
- multiplier: 1.3,
98
- retry_codes: [4, 14]
85
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
99
86
  }
100
87
 
101
88
  default_config.rpcs.create_notification_channel.timeout = 30.0
@@ -104,28 +91,19 @@ module Google
104
91
 
105
92
  default_config.rpcs.delete_notification_channel.timeout = 30.0
106
93
  default_config.rpcs.delete_notification_channel.retry_policy = {
107
- initial_delay: 0.1,
108
- max_delay: 30.0,
109
- multiplier: 1.3,
110
- retry_codes: [4, 14]
94
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
111
95
  }
112
96
 
113
97
  default_config.rpcs.send_notification_channel_verification_code.timeout = 30.0
114
98
 
115
99
  default_config.rpcs.get_notification_channel_verification_code.timeout = 30.0
116
100
  default_config.rpcs.get_notification_channel_verification_code.retry_policy = {
117
- initial_delay: 0.1,
118
- max_delay: 30.0,
119
- multiplier: 1.3,
120
- retry_codes: [4, 14]
101
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
121
102
  }
122
103
 
123
104
  default_config.rpcs.verify_notification_channel.timeout = 30.0
124
105
  default_config.rpcs.verify_notification_channel.retry_policy = {
125
- initial_delay: 0.1,
126
- max_delay: 30.0,
127
- multiplier: 1.3,
128
- retry_codes: [4, 14]
106
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
129
107
  }
130
108
 
131
109
  default_config
@@ -157,19 +135,15 @@ module Google
157
135
  ##
158
136
  # Create a new NotificationChannelService client object.
159
137
  #
160
- # ## Examples
161
- #
162
- # To create a new NotificationChannelService client with the default
163
- # configuration:
164
- #
165
- # client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
138
+ # @example
166
139
  #
167
- # To create a new NotificationChannelService client with a custom
168
- # configuration:
140
+ # # Create a client using the default configuration
141
+ # client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
169
142
  #
170
- # client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new do |config|
171
- # config.timeout = 10.0
172
- # end
143
+ # # Create a client using a custom configuration
144
+ # client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new do |config|
145
+ # config.timeout = 10.0
146
+ # end
173
147
  #
174
148
  # @yield [config] Configure the NotificationChannelService client.
175
149
  # @yieldparam config [Client::Configuration]
@@ -189,14 +163,13 @@ module Google
189
163
 
190
164
  # Create credentials
191
165
  credentials = @config.credentials
192
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
166
+ # Use self-signed JWT if the endpoint is unchanged from default,
193
167
  # but only if the default endpoint does not have a region prefix.
194
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
195
- @config.endpoint == Client.configure.endpoint &&
168
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
196
169
  !@config.endpoint.split(".").first.include?("-")
197
170
  credentials ||= Credentials.default scope: @config.scope,
198
171
  enable_self_signed_jwt: enable_self_signed_jwt
199
- if credentials.is_a?(String) || credentials.is_a?(Hash)
172
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
200
173
  credentials = Credentials.new credentials, scope: @config.scope
201
174
  end
202
175
  @quota_project_id = @config.quota_project
@@ -238,8 +211,10 @@ module Google
238
211
  #
239
212
  # projects/[PROJECT_ID_OR_NUMBER]
240
213
  #
241
- # Note that this names the parent container in which to look for the
242
- # descriptors; to retrieve a single descriptor by name, use the
214
+ # Note that this
215
+ # [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent
216
+ # container in which to look for the descriptors; to retrieve a single
217
+ # descriptor by name, use the
243
218
  # {::Google::Cloud::Monitoring::V3::NotificationChannelService::Client#get_notification_channel_descriptor GetNotificationChannelDescriptor}
244
219
  # operation, instead.
245
220
  # @param page_size [::Integer]
@@ -285,7 +260,9 @@ module Google
285
260
  options.apply_defaults timeout: @config.rpcs.list_notification_channel_descriptors.timeout,
286
261
  metadata: metadata,
287
262
  retry_policy: @config.rpcs.list_notification_channel_descriptors.retry_policy
288
- options.apply_defaults metadata: @config.metadata,
263
+
264
+ options.apply_defaults timeout: @config.timeout,
265
+ metadata: @config.metadata,
289
266
  retry_policy: @config.retry_policy
290
267
 
291
268
  @notification_channel_service_stub.call_rpc :list_notification_channel_descriptors, request, options: options do |response, operation|
@@ -355,7 +332,9 @@ module Google
355
332
  options.apply_defaults timeout: @config.rpcs.get_notification_channel_descriptor.timeout,
356
333
  metadata: metadata,
357
334
  retry_policy: @config.rpcs.get_notification_channel_descriptor.retry_policy
358
- options.apply_defaults metadata: @config.metadata,
335
+
336
+ options.apply_defaults timeout: @config.timeout,
337
+ metadata: @config.metadata,
359
338
  retry_policy: @config.retry_policy
360
339
 
361
340
  @notification_channel_service_stub.call_rpc :get_notification_channel_descriptor, request, options: options do |response, operation|
@@ -385,7 +364,8 @@ module Google
385
364
  # the default parameter values, pass an empty Hash as a request object (see above).
386
365
  #
387
366
  # @param name [::String]
388
- # Required. The project on which to execute the request. The format is:
367
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
368
+ # which to execute the request. The format is:
389
369
  #
390
370
  # projects/[PROJECT_ID_OR_NUMBER]
391
371
  #
@@ -451,7 +431,9 @@ module Google
451
431
  options.apply_defaults timeout: @config.rpcs.list_notification_channels.timeout,
452
432
  metadata: metadata,
453
433
  retry_policy: @config.rpcs.list_notification_channels.retry_policy
454
- options.apply_defaults metadata: @config.metadata,
434
+
435
+ options.apply_defaults timeout: @config.timeout,
436
+ metadata: @config.metadata,
455
437
  retry_policy: @config.retry_policy
456
438
 
457
439
  @notification_channel_service_stub.call_rpc :list_notification_channels, request, options: options do |response, operation|
@@ -524,7 +506,9 @@ module Google
524
506
  options.apply_defaults timeout: @config.rpcs.get_notification_channel.timeout,
525
507
  metadata: metadata,
526
508
  retry_policy: @config.rpcs.get_notification_channel.retry_policy
527
- options.apply_defaults metadata: @config.metadata,
509
+
510
+ options.apply_defaults timeout: @config.timeout,
511
+ metadata: @config.metadata,
528
512
  retry_policy: @config.retry_policy
529
513
 
530
514
  @notification_channel_service_stub.call_rpc :get_notification_channel, request, options: options do |response, operation|
@@ -555,7 +539,8 @@ module Google
555
539
  # the default parameter values, pass an empty Hash as a request object (see above).
556
540
  #
557
541
  # @param name [::String]
558
- # Required. The project on which to execute the request. The format is:
542
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
543
+ # which to execute the request. The format is:
559
544
  #
560
545
  # projects/[PROJECT_ID_OR_NUMBER]
561
546
  #
@@ -600,7 +585,9 @@ module Google
600
585
  options.apply_defaults timeout: @config.rpcs.create_notification_channel.timeout,
601
586
  metadata: metadata,
602
587
  retry_policy: @config.rpcs.create_notification_channel.retry_policy
603
- options.apply_defaults metadata: @config.metadata,
588
+
589
+ options.apply_defaults timeout: @config.timeout,
590
+ metadata: @config.metadata,
604
591
  retry_policy: @config.retry_policy
605
592
 
606
593
  @notification_channel_service_stub.call_rpc :create_notification_channel, request, options: options do |response, operation|
@@ -672,7 +659,9 @@ module Google
672
659
  options.apply_defaults timeout: @config.rpcs.update_notification_channel.timeout,
673
660
  metadata: metadata,
674
661
  retry_policy: @config.rpcs.update_notification_channel.retry_policy
675
- options.apply_defaults metadata: @config.metadata,
662
+
663
+ options.apply_defaults timeout: @config.timeout,
664
+ metadata: @config.metadata,
676
665
  retry_policy: @config.retry_policy
677
666
 
678
667
  @notification_channel_service_stub.call_rpc :update_notification_channel, request, options: options do |response, operation|
@@ -745,7 +734,9 @@ module Google
745
734
  options.apply_defaults timeout: @config.rpcs.delete_notification_channel.timeout,
746
735
  metadata: metadata,
747
736
  retry_policy: @config.rpcs.delete_notification_channel.retry_policy
748
- options.apply_defaults metadata: @config.metadata,
737
+
738
+ options.apply_defaults timeout: @config.timeout,
739
+ metadata: @config.metadata,
749
740
  retry_policy: @config.retry_policy
750
741
 
751
742
  @notification_channel_service_stub.call_rpc :delete_notification_channel, request, options: options do |response, operation|
@@ -812,7 +803,9 @@ module Google
812
803
  options.apply_defaults timeout: @config.rpcs.send_notification_channel_verification_code.timeout,
813
804
  metadata: metadata,
814
805
  retry_policy: @config.rpcs.send_notification_channel_verification_code.retry_policy
815
- options.apply_defaults metadata: @config.metadata,
806
+
807
+ options.apply_defaults timeout: @config.timeout,
808
+ metadata: @config.metadata,
816
809
  retry_policy: @config.retry_policy
817
810
 
818
811
  @notification_channel_service_stub.call_rpc :send_notification_channel_verification_code, request, options: options do |response, operation|
@@ -910,7 +903,9 @@ module Google
910
903
  options.apply_defaults timeout: @config.rpcs.get_notification_channel_verification_code.timeout,
911
904
  metadata: metadata,
912
905
  retry_policy: @config.rpcs.get_notification_channel_verification_code.retry_policy
913
- options.apply_defaults metadata: @config.metadata,
906
+
907
+ options.apply_defaults timeout: @config.timeout,
908
+ metadata: @config.metadata,
914
909
  retry_policy: @config.retry_policy
915
910
 
916
911
  @notification_channel_service_stub.call_rpc :get_notification_channel_verification_code, request, options: options do |response, operation|
@@ -986,7 +981,9 @@ module Google
986
981
  options.apply_defaults timeout: @config.rpcs.verify_notification_channel.timeout,
987
982
  metadata: metadata,
988
983
  retry_policy: @config.rpcs.verify_notification_channel.retry_policy
989
- options.apply_defaults metadata: @config.metadata,
984
+
985
+ options.apply_defaults timeout: @config.timeout,
986
+ metadata: @config.metadata,
990
987
  retry_policy: @config.retry_policy
991
988
 
992
989
  @notification_channel_service_stub.call_rpc :verify_notification_channel, request, options: options do |response, operation|
@@ -1010,22 +1007,21 @@ module Google
1010
1007
  # Configuration can be applied globally to all clients, or to a single client
1011
1008
  # on construction.
1012
1009
  #
1013
- # # Examples
1014
- #
1015
- # To modify the global config, setting the timeout for list_notification_channel_descriptors
1016
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1017
- #
1018
- # ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.configure do |config|
1019
- # config.timeout = 10.0
1020
- # config.rpcs.list_notification_channel_descriptors.timeout = 20.0
1021
- # end
1022
- #
1023
- # To apply the above configuration only to a new client:
1024
- #
1025
- # client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new do |config|
1026
- # config.timeout = 10.0
1027
- # config.rpcs.list_notification_channel_descriptors.timeout = 20.0
1028
- # end
1010
+ # @example
1011
+ #
1012
+ # # Modify the global config, setting the timeout for
1013
+ # # list_notification_channel_descriptors to 20 seconds,
1014
+ # # and all remaining timeouts to 10 seconds.
1015
+ # ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.configure do |config|
1016
+ # config.timeout = 10.0
1017
+ # config.rpcs.list_notification_channel_descriptors.timeout = 20.0
1018
+ # end
1019
+ #
1020
+ # # Apply the above configuration only to a new client.
1021
+ # client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new do |config|
1022
+ # config.timeout = 10.0
1023
+ # config.rpcs.list_notification_channel_descriptors.timeout = 20.0
1024
+ # end
1029
1025
  #
1030
1026
  # @!attribute [rw] endpoint
1031
1027
  # The hostname or hostname:port of the service endpoint.