google-cloud-monitoring-v3 0.4.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) 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 +166 -75
  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 +17 -2
  18. data/lib/google/monitoring/v3/alert_service_pb.rb +2 -2
  19. data/lib/google/monitoring/v3/common_pb.rb +2 -2
  20. data/lib/google/monitoring/v3/group_pb.rb +1 -1
  21. data/lib/google/monitoring/v3/group_service_pb.rb +2 -2
  22. data/lib/google/monitoring/v3/metric_pb.rb +2 -2
  23. data/lib/google/monitoring/v3/metric_service_pb.rb +2 -2
  24. data/lib/google/monitoring/v3/metric_service_services_pb.rb +12 -0
  25. data/lib/google/monitoring/v3/mutation_record_pb.rb +1 -1
  26. data/lib/google/monitoring/v3/notification_pb.rb +2 -2
  27. data/lib/google/monitoring/v3/notification_service_pb.rb +2 -2
  28. data/lib/google/monitoring/v3/query_service_pb.rb +2 -2
  29. data/lib/google/monitoring/v3/service_pb.rb +5 -2
  30. data/lib/google/monitoring/v3/service_service_pb.rb +2 -2
  31. data/lib/google/monitoring/v3/uptime_pb.rb +2 -2
  32. data/lib/google/monitoring/v3/uptime_service_pb.rb +3 -2
  33. data/proto_docs/google/api/distribution.rb +2 -2
  34. data/proto_docs/google/api/field_behavior.rb +7 -1
  35. data/proto_docs/google/api/launch_stage.rb +7 -1
  36. data/proto_docs/google/api/metric.rb +109 -36
  37. data/proto_docs/google/api/monitored_resource.rb +7 -6
  38. data/proto_docs/google/longrunning/operations.rb +164 -0
  39. data/proto_docs/google/monitoring/v3/alert.rb +68 -3
  40. data/proto_docs/google/monitoring/v3/alert_service.rb +4 -2
  41. data/proto_docs/google/monitoring/v3/common.rb +17 -5
  42. data/proto_docs/google/monitoring/v3/group_service.rb +4 -2
  43. data/proto_docs/google/monitoring/v3/metric.rb +3 -1
  44. data/proto_docs/google/monitoring/v3/metric_service.rb +13 -8
  45. data/proto_docs/google/monitoring/v3/notification_service.rb +8 -4
  46. data/proto_docs/google/monitoring/v3/service.rb +38 -6
  47. data/proto_docs/google/monitoring/v3/service_service.rb +4 -2
  48. data/proto_docs/google/monitoring/v3/span_context.rb +2 -2
  49. data/proto_docs/google/monitoring/v3/uptime.rb +5 -2
  50. data/proto_docs/google/monitoring/v3/uptime_service.rb +4 -2
  51. metadata +5 -4
@@ -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.
@@ -156,6 +156,20 @@ module Google
156
156
  "organizations/#{organization}"
157
157
  end
158
158
 
159
+ ##
160
+ # Create a fully-qualified Project resource string.
161
+ #
162
+ # The resource will be in the following format:
163
+ #
164
+ # `projects/{project}`
165
+ #
166
+ # @param project [String]
167
+ #
168
+ # @return [::String]
169
+ def project_path project:
170
+ "projects/#{project}"
171
+ end
172
+
159
173
  ##
160
174
  # Create a fully-qualified Workspace resource string.
161
175
  #
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Monitoring::V3::QueryService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all QueryService clients:
47
- #
48
- # ::Google::Cloud::Monitoring::V3::QueryService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all QueryService clients
47
+ # ::Google::Cloud::Monitoring::V3::QueryService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -94,19 +93,15 @@ module Google
94
93
  ##
95
94
  # Create a new QueryService client object.
96
95
  #
97
- # ## Examples
98
- #
99
- # To create a new QueryService client with the default
100
- # configuration:
96
+ # @example
101
97
  #
102
- # client = ::Google::Cloud::Monitoring::V3::QueryService::Client.new
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::Monitoring::V3::QueryService::Client.new
103
100
  #
104
- # To create a new QueryService client with a custom
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Monitoring::V3::QueryService::Client.new do |config|
108
- # config.timeout = 10.0
109
- # end
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::Monitoring::V3::QueryService::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
110
105
  #
111
106
  # @yield [config] Configure the QueryService client.
112
107
  # @yieldparam config [Client::Configuration]
@@ -126,14 +121,13 @@ module Google
126
121
 
127
122
  # Create credentials
128
123
  credentials = @config.credentials
129
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
130
125
  # but only if the default endpoint does not have a region prefix.
131
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
132
- @config.endpoint == Client.configure.endpoint &&
126
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
127
  !@config.endpoint.split(".").first.include?("-")
134
128
  credentials ||= Credentials.default scope: @config.scope,
135
129
  enable_self_signed_jwt: enable_self_signed_jwt
136
- if credentials.is_a?(String) || credentials.is_a?(Hash)
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
131
  credentials = Credentials.new credentials, scope: @config.scope
138
132
  end
139
133
  @quota_project_id = @config.quota_project
@@ -169,7 +163,8 @@ module Google
169
163
  # the default parameter values, pass an empty Hash as a request object (see above).
170
164
  #
171
165
  # @param name [::String]
172
- # Required. The project on which to execute the request. The format is:
166
+ # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
167
+ # which to execute the request. The format is:
173
168
  #
174
169
  # projects/[PROJECT_ID_OR_NUMBER]
175
170
  # @param query [::String]
@@ -217,7 +212,9 @@ module Google
217
212
  options.apply_defaults timeout: @config.rpcs.query_time_series.timeout,
218
213
  metadata: metadata,
219
214
  retry_policy: @config.rpcs.query_time_series.retry_policy
220
- options.apply_defaults metadata: @config.metadata,
215
+
216
+ options.apply_defaults timeout: @config.timeout,
217
+ metadata: @config.metadata,
221
218
  retry_policy: @config.retry_policy
222
219
 
223
220
  @query_service_stub.call_rpc :query_time_series, request, options: options do |response, operation|
@@ -242,22 +239,21 @@ module Google
242
239
  # Configuration can be applied globally to all clients, or to a single client
243
240
  # on construction.
244
241
  #
245
- # # Examples
246
- #
247
- # To modify the global config, setting the timeout for query_time_series
248
- # to 20 seconds, and all remaining timeouts to 10 seconds:
249
- #
250
- # ::Google::Cloud::Monitoring::V3::QueryService::Client.configure do |config|
251
- # config.timeout = 10.0
252
- # config.rpcs.query_time_series.timeout = 20.0
253
- # end
254
- #
255
- # To apply the above configuration only to a new client:
256
- #
257
- # client = ::Google::Cloud::Monitoring::V3::QueryService::Client.new do |config|
258
- # config.timeout = 10.0
259
- # config.rpcs.query_time_series.timeout = 20.0
260
- # end
242
+ # @example
243
+ #
244
+ # # Modify the global config, setting the timeout for
245
+ # # query_time_series to 20 seconds,
246
+ # # and all remaining timeouts to 10 seconds.
247
+ # ::Google::Cloud::Monitoring::V3::QueryService::Client.configure do |config|
248
+ # config.timeout = 10.0
249
+ # config.rpcs.query_time_series.timeout = 20.0
250
+ # end
251
+ #
252
+ # # Apply the above configuration only to a new client.
253
+ # client = ::Google::Cloud::Monitoring::V3::QueryService::Client.new do |config|
254
+ # config.timeout = 10.0
255
+ # config.rpcs.query_time_series.timeout = 20.0
256
+ # end
261
257
  #
262
258
  # @!attribute [rw] endpoint
263
259
  # The hostname or hostname:port of the service endpoint.