google-cloud-error_reporting-v1beta1 0.3.0 → 0.4.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3305b2efdf1d65def2749e4c799e3f8e9c1d567c7e0592f4dc17ef13958266c
4
- data.tar.gz: a7d52a2f5ddc85eb49aa5a616c42b7ad9ba6f1f3fdf95bf44a113197d1587f29
3
+ metadata.gz: e0bfea416e014db2193aef7335f6c57ea18b76b5fe6bd17f4400af66bc9d515a
4
+ data.tar.gz: bbf345ce23074c4c14008c085e388bb57fbccb814a6efce937fe35af1ab0a32a
5
5
  SHA512:
6
- metadata.gz: ad6ae1902f9db4dfd3119ddf614ac52916e10315b2894328a5a7cfa627b7316aa3f4231a3af78f5ed1f50827c61273a08c3439fe01dcc5faa4135da2bc974503
7
- data.tar.gz: eac8d38cff5ae845e86d85167791061fceb1121045d614e0245b4277b6c0961cb024c6dd4894576595af1cf6a2c697d25afa8f494714a1f78aff3683044b90cf
6
+ metadata.gz: ca7a9b56e9b714dd54c7411ab04638656d19b868d8dcaad470c68e6f757cc24a476447677cb28d8d4f356691bf4dccb26dc7ae631f0c12f956a25932e03e3029
7
+ data.tar.gz: a45acf8f093aef70a40dc3ed6fdcb99919fa9335ac74c2849b191669913400fa5b06b2a2895c89ff409d56ab17f7d70b4ad18d83274b645798ab853b059aae72
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-error_reporting-v1beta1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Credentials}):
68
68
 
69
- 1. `ERROR_REPORTING_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `ERROR_REPORTING_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `ERROR_REPORTING_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `ERROR_REPORTING_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/error_reporting/v1beta1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/error_reporting/v1beta1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/error_reporting/v1beta1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/error_reporting/v1beta1"
34
34
 
35
35
  client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::ErrorReporting::V1beta1::GetGroupRequest.new # (request fields as keyword arguments...)
37
37
  response = client.get_group request
38
38
  ```
39
39
 
@@ -71,11 +71,11 @@ end
71
71
 
72
72
  ## Supported Ruby Versions
73
73
 
74
- This library is supported on Ruby 2.4+.
74
+ This library is supported on Ruby 2.5+.
75
75
 
76
76
  Google provides official support for Ruby versions that are actively supported
77
77
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.4
78
+ in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
81
  about the Ruby support schedule.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::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 ErrorGroupService clients:
47
- #
48
- # ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all ErrorGroupService clients
47
+ # ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::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]
@@ -60,17 +59,14 @@ module Google
60
59
  parent_config = while namespace.any?
61
60
  parent_name = namespace.join "::"
62
61
  parent_const = const_get parent_name
63
- break parent_const.configure if parent_const&.respond_to? :configure
62
+ break parent_const.configure if parent_const.respond_to? :configure
64
63
  namespace.pop
65
64
  end
66
65
  default_config = Client::Configuration.new parent_config
67
66
 
68
67
  default_config.timeout = 600.0
69
68
  default_config.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [14, 4]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
74
70
  }
75
71
 
76
72
  default_config
@@ -102,19 +98,15 @@ module Google
102
98
  ##
103
99
  # Create a new ErrorGroupService client object.
104
100
  #
105
- # ## Examples
106
- #
107
- # To create a new ErrorGroupService client with the default
108
- # configuration:
101
+ # @example
109
102
  #
110
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
111
105
  #
112
- # To create a new ErrorGroupService client with a custom
113
- # configuration:
114
- #
115
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new do |config|
116
- # config.timeout = 10.0
117
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
118
110
  #
119
111
  # @yield [config] Configure the ErrorGroupService client.
120
112
  # @yieldparam config [Client::Configuration]
@@ -134,14 +126,13 @@ module Google
134
126
 
135
127
  # Create credentials
136
128
  credentials = @config.credentials
137
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
130
  # but only if the default endpoint does not have a region prefix.
139
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
140
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
132
  !@config.endpoint.split(".").first.include?("-")
142
- credentials ||= Credentials.default scope: @config.scope,
133
+ credentials ||= Credentials.default scope: @config.scope,
143
134
  enable_self_signed_jwt: enable_self_signed_jwt
144
- if credentials.is_a?(String) || credentials.is_a?(Hash)
135
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
136
  credentials = Credentials.new credentials, scope: @config.scope
146
137
  end
147
138
  @quota_project_id = @config.quota_project
@@ -218,7 +209,9 @@ module Google
218
209
  options.apply_defaults timeout: @config.rpcs.get_group.timeout,
219
210
  metadata: metadata,
220
211
  retry_policy: @config.rpcs.get_group.retry_policy
221
- options.apply_defaults metadata: @config.metadata,
212
+
213
+ options.apply_defaults timeout: @config.timeout,
214
+ metadata: @config.metadata,
222
215
  retry_policy: @config.retry_policy
223
216
 
224
217
  @error_group_service_stub.call_rpc :get_group, request, options: options do |response, operation|
@@ -285,7 +278,9 @@ module Google
285
278
  options.apply_defaults timeout: @config.rpcs.update_group.timeout,
286
279
  metadata: metadata,
287
280
  retry_policy: @config.rpcs.update_group.retry_policy
288
- options.apply_defaults metadata: @config.metadata,
281
+
282
+ options.apply_defaults timeout: @config.timeout,
283
+ metadata: @config.metadata,
289
284
  retry_policy: @config.retry_policy
290
285
 
291
286
  @error_group_service_stub.call_rpc :update_group, request, options: options do |response, operation|
@@ -309,22 +304,21 @@ module Google
309
304
  # Configuration can be applied globally to all clients, or to a single client
310
305
  # on construction.
311
306
  #
312
- # # Examples
313
- #
314
- # To modify the global config, setting the timeout for get_group
315
- # to 20 seconds, and all remaining timeouts to 10 seconds:
316
- #
317
- # ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.configure do |config|
318
- # config.timeout = 10.0
319
- # config.rpcs.get_group.timeout = 20.0
320
- # end
307
+ # @example
321
308
  #
322
- # To apply the above configuration only to a new client:
309
+ # # Modify the global config, setting the timeout for
310
+ # # get_group to 20 seconds,
311
+ # # and all remaining timeouts to 10 seconds.
312
+ # ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.configure do |config|
313
+ # config.timeout = 10.0
314
+ # config.rpcs.get_group.timeout = 20.0
315
+ # end
323
316
  #
324
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new do |config|
325
- # config.timeout = 10.0
326
- # config.rpcs.get_group.timeout = 20.0
327
- # end
317
+ # # Apply the above configuration only to a new client.
318
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new do |config|
319
+ # config.timeout = 10.0
320
+ # config.rpcs.get_group.timeout = 20.0
321
+ # end
328
322
  #
329
323
  # @!attribute [rw] endpoint
330
324
  # The hostname or hostname:port of the service endpoint.
@@ -388,7 +382,7 @@ module Google
388
382
  config_attr :scope, nil, ::String, ::Array, nil
389
383
  config_attr :lib_name, nil, ::String, nil
390
384
  config_attr :lib_version, nil, ::String, nil
391
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
385
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
392
386
  config_attr :interceptors, nil, ::Array, nil
393
387
  config_attr :timeout, nil, ::Numeric, nil
394
388
  config_attr :metadata, nil, ::Hash, nil
@@ -409,7 +403,7 @@ module Google
409
403
  def rpcs
410
404
  @rpcs ||= begin
411
405
  parent_rpcs = nil
412
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
406
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
413
407
  Rpcs.new parent_rpcs
414
408
  end
415
409
  end
@@ -445,9 +439,9 @@ module Google
445
439
 
446
440
  # @private
447
441
  def initialize parent_rpcs = nil
448
- get_group_config = parent_rpcs&.get_group if parent_rpcs&.respond_to? :get_group
442
+ get_group_config = parent_rpcs.get_group if parent_rpcs.respond_to? :get_group
449
443
  @get_group = ::Gapic::Config::Method.new get_group_config
450
- update_group_config = parent_rpcs&.update_group if parent_rpcs&.respond_to? :update_group
444
+ update_group_config = parent_rpcs.update_group if parent_rpcs.respond_to? :update_group
451
445
  @update_group = ::Gapic::Config::Method.new update_group_config
452
446
 
453
447
  yield self if block_given?
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::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 ErrorStatsService clients:
48
- #
49
- # ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all ErrorStatsService clients
48
+ # ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::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]
@@ -61,17 +60,14 @@ module Google
61
60
  parent_config = while namespace.any?
62
61
  parent_name = namespace.join "::"
63
62
  parent_const = const_get parent_name
64
- break parent_const.configure if parent_const&.respond_to? :configure
63
+ break parent_const.configure if parent_const.respond_to? :configure
65
64
  namespace.pop
66
65
  end
67
66
  default_config = Client::Configuration.new parent_config
68
67
 
69
68
  default_config.timeout = 600.0
70
69
  default_config.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 60.0,
73
- multiplier: 1.3,
74
- retry_codes: [14, 4]
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
75
71
  }
76
72
 
77
73
  default_config
@@ -103,19 +99,15 @@ module Google
103
99
  ##
104
100
  # Create a new ErrorStatsService client object.
105
101
  #
106
- # ## Examples
107
- #
108
- # To create a new ErrorStatsService client with the default
109
- # configuration:
102
+ # @example
110
103
  #
111
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new
104
+ # # Create a client using the default configuration
105
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new
112
106
  #
113
- # To create a new ErrorStatsService client with a custom
114
- # configuration:
115
- #
116
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new do |config|
117
- # config.timeout = 10.0
118
- # end
107
+ # # Create a client using a custom configuration
108
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
119
111
  #
120
112
  # @yield [config] Configure the ErrorStatsService client.
121
113
  # @yieldparam config [Client::Configuration]
@@ -135,14 +127,13 @@ module Google
135
127
 
136
128
  # Create credentials
137
129
  credentials = @config.credentials
138
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
130
+ # Use self-signed JWT if the endpoint is unchanged from default,
139
131
  # but only if the default endpoint does not have a region prefix.
140
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
141
- @config.endpoint == Client.configure.endpoint &&
132
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
142
133
  !@config.endpoint.split(".").first.include?("-")
143
- credentials ||= Credentials.default scope: @config.scope,
134
+ credentials ||= Credentials.default scope: @config.scope,
144
135
  enable_self_signed_jwt: enable_self_signed_jwt
145
- if credentials.is_a?(String) || credentials.is_a?(Hash)
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
146
137
  credentials = Credentials.new credentials, scope: @config.scope
147
138
  end
148
139
  @quota_project_id = @config.quota_project
@@ -253,7 +244,9 @@ module Google
253
244
  options.apply_defaults timeout: @config.rpcs.list_group_stats.timeout,
254
245
  metadata: metadata,
255
246
  retry_policy: @config.rpcs.list_group_stats.retry_policy
256
- options.apply_defaults metadata: @config.metadata,
247
+
248
+ options.apply_defaults timeout: @config.timeout,
249
+ metadata: @config.metadata,
257
250
  retry_policy: @config.retry_policy
258
251
 
259
252
  @error_stats_service_stub.call_rpc :list_group_stats, request, options: options do |response, operation|
@@ -339,7 +332,9 @@ module Google
339
332
  options.apply_defaults timeout: @config.rpcs.list_events.timeout,
340
333
  metadata: metadata,
341
334
  retry_policy: @config.rpcs.list_events.retry_policy
342
- options.apply_defaults metadata: @config.metadata,
335
+
336
+ options.apply_defaults timeout: @config.timeout,
337
+ metadata: @config.metadata,
343
338
  retry_policy: @config.retry_policy
344
339
 
345
340
  @error_stats_service_stub.call_rpc :list_events, request, options: options do |response, operation|
@@ -411,7 +406,9 @@ module Google
411
406
  options.apply_defaults timeout: @config.rpcs.delete_events.timeout,
412
407
  metadata: metadata,
413
408
  retry_policy: @config.rpcs.delete_events.retry_policy
414
- options.apply_defaults metadata: @config.metadata,
409
+
410
+ options.apply_defaults timeout: @config.timeout,
411
+ metadata: @config.metadata,
415
412
  retry_policy: @config.retry_policy
416
413
 
417
414
  @error_stats_service_stub.call_rpc :delete_events, request, options: options do |response, operation|
@@ -435,22 +432,21 @@ module Google
435
432
  # Configuration can be applied globally to all clients, or to a single client
436
433
  # on construction.
437
434
  #
438
- # # Examples
439
- #
440
- # To modify the global config, setting the timeout for list_group_stats
441
- # to 20 seconds, and all remaining timeouts to 10 seconds:
442
- #
443
- # ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.configure do |config|
444
- # config.timeout = 10.0
445
- # config.rpcs.list_group_stats.timeout = 20.0
446
- # end
435
+ # @example
447
436
  #
448
- # To apply the above configuration only to a new client:
437
+ # # Modify the global config, setting the timeout for
438
+ # # list_group_stats to 20 seconds,
439
+ # # and all remaining timeouts to 10 seconds.
440
+ # ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.configure do |config|
441
+ # config.timeout = 10.0
442
+ # config.rpcs.list_group_stats.timeout = 20.0
443
+ # end
449
444
  #
450
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new do |config|
451
- # config.timeout = 10.0
452
- # config.rpcs.list_group_stats.timeout = 20.0
453
- # end
445
+ # # Apply the above configuration only to a new client.
446
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new do |config|
447
+ # config.timeout = 10.0
448
+ # config.rpcs.list_group_stats.timeout = 20.0
449
+ # end
454
450
  #
455
451
  # @!attribute [rw] endpoint
456
452
  # The hostname or hostname:port of the service endpoint.
@@ -514,7 +510,7 @@ module Google
514
510
  config_attr :scope, nil, ::String, ::Array, nil
515
511
  config_attr :lib_name, nil, ::String, nil
516
512
  config_attr :lib_version, nil, ::String, nil
517
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
513
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
518
514
  config_attr :interceptors, nil, ::Array, nil
519
515
  config_attr :timeout, nil, ::Numeric, nil
520
516
  config_attr :metadata, nil, ::Hash, nil
@@ -535,7 +531,7 @@ module Google
535
531
  def rpcs
536
532
  @rpcs ||= begin
537
533
  parent_rpcs = nil
538
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
534
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
539
535
  Rpcs.new parent_rpcs
540
536
  end
541
537
  end
@@ -576,11 +572,11 @@ module Google
576
572
 
577
573
  # @private
578
574
  def initialize parent_rpcs = nil
579
- list_group_stats_config = parent_rpcs&.list_group_stats if parent_rpcs&.respond_to? :list_group_stats
575
+ list_group_stats_config = parent_rpcs.list_group_stats if parent_rpcs.respond_to? :list_group_stats
580
576
  @list_group_stats = ::Gapic::Config::Method.new list_group_stats_config
581
- list_events_config = parent_rpcs&.list_events if parent_rpcs&.respond_to? :list_events
577
+ list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events
582
578
  @list_events = ::Gapic::Config::Method.new list_events_config
583
- delete_events_config = parent_rpcs&.delete_events if parent_rpcs&.respond_to? :delete_events
579
+ delete_events_config = parent_rpcs.delete_events if parent_rpcs.respond_to? :delete_events
584
580
  @delete_events = ::Gapic::Config::Method.new delete_events_config
585
581
 
586
582
  yield self if block_given?
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::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 ReportErrorsService clients:
47
- #
48
- # ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all ReportErrorsService clients
47
+ # ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::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]
@@ -60,7 +59,7 @@ module Google
60
59
  parent_config = while namespace.any?
61
60
  parent_name = namespace.join "::"
62
61
  parent_const = const_get parent_name
63
- break parent_const.configure if parent_const&.respond_to? :configure
62
+ break parent_const.configure if parent_const.respond_to? :configure
64
63
  namespace.pop
65
64
  end
66
65
  default_config = Client::Configuration.new parent_config
@@ -96,19 +95,15 @@ module Google
96
95
  ##
97
96
  # Create a new ReportErrorsService client object.
98
97
  #
99
- # ## Examples
100
- #
101
- # To create a new ReportErrorsService client with the default
102
- # configuration:
103
- #
104
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new
98
+ # @example
105
99
  #
106
- # To create a new ReportErrorsService client with a custom
107
- # configuration:
100
+ # # Create a client using the default configuration
101
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new
108
102
  #
109
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new do |config|
110
- # config.timeout = 10.0
111
- # end
103
+ # # Create a client using a custom configuration
104
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new do |config|
105
+ # config.timeout = 10.0
106
+ # end
112
107
  #
113
108
  # @yield [config] Configure the ReportErrorsService client.
114
109
  # @yieldparam config [Client::Configuration]
@@ -128,14 +123,13 @@ module Google
128
123
 
129
124
  # Create credentials
130
125
  credentials = @config.credentials
131
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
126
+ # Use self-signed JWT if the endpoint is unchanged from default,
132
127
  # but only if the default endpoint does not have a region prefix.
133
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
134
- @config.endpoint == Client.configure.endpoint &&
128
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
135
129
  !@config.endpoint.split(".").first.include?("-")
136
- credentials ||= Credentials.default scope: @config.scope,
130
+ credentials ||= Credentials.default scope: @config.scope,
137
131
  enable_self_signed_jwt: enable_self_signed_jwt
138
- if credentials.is_a?(String) || credentials.is_a?(Hash)
132
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
139
133
  credentials = Credentials.new credentials, scope: @config.scope
140
134
  end
141
135
  @quota_project_id = @config.quota_project
@@ -230,7 +224,9 @@ module Google
230
224
  options.apply_defaults timeout: @config.rpcs.report_error_event.timeout,
231
225
  metadata: metadata,
232
226
  retry_policy: @config.rpcs.report_error_event.retry_policy
233
- options.apply_defaults metadata: @config.metadata,
227
+
228
+ options.apply_defaults timeout: @config.timeout,
229
+ metadata: @config.metadata,
234
230
  retry_policy: @config.retry_policy
235
231
 
236
232
  @report_errors_service_stub.call_rpc :report_error_event, request, options: options do |response, operation|
@@ -254,22 +250,21 @@ module Google
254
250
  # Configuration can be applied globally to all clients, or to a single client
255
251
  # on construction.
256
252
  #
257
- # # Examples
258
- #
259
- # To modify the global config, setting the timeout for report_error_event
260
- # to 20 seconds, and all remaining timeouts to 10 seconds:
261
- #
262
- # ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.configure do |config|
263
- # config.timeout = 10.0
264
- # config.rpcs.report_error_event.timeout = 20.0
265
- # end
253
+ # @example
266
254
  #
267
- # To apply the above configuration only to a new client:
255
+ # # Modify the global config, setting the timeout for
256
+ # # report_error_event to 20 seconds,
257
+ # # and all remaining timeouts to 10 seconds.
258
+ # ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.configure do |config|
259
+ # config.timeout = 10.0
260
+ # config.rpcs.report_error_event.timeout = 20.0
261
+ # end
268
262
  #
269
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new do |config|
270
- # config.timeout = 10.0
271
- # config.rpcs.report_error_event.timeout = 20.0
272
- # end
263
+ # # Apply the above configuration only to a new client.
264
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new do |config|
265
+ # config.timeout = 10.0
266
+ # config.rpcs.report_error_event.timeout = 20.0
267
+ # end
273
268
  #
274
269
  # @!attribute [rw] endpoint
275
270
  # The hostname or hostname:port of the service endpoint.
@@ -333,7 +328,7 @@ module Google
333
328
  config_attr :scope, nil, ::String, ::Array, nil
334
329
  config_attr :lib_name, nil, ::String, nil
335
330
  config_attr :lib_version, nil, ::String, nil
336
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
331
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
337
332
  config_attr :interceptors, nil, ::Array, nil
338
333
  config_attr :timeout, nil, ::Numeric, nil
339
334
  config_attr :metadata, nil, ::Hash, nil
@@ -354,7 +349,7 @@ module Google
354
349
  def rpcs
355
350
  @rpcs ||= begin
356
351
  parent_rpcs = nil
357
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
352
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
358
353
  Rpcs.new parent_rpcs
359
354
  end
360
355
  end
@@ -385,7 +380,7 @@ module Google
385
380
 
386
381
  # @private
387
382
  def initialize parent_rpcs = nil
388
- report_error_event_config = parent_rpcs&.report_error_event if parent_rpcs&.respond_to? :report_error_event
383
+ report_error_event_config = parent_rpcs.report_error_event if parent_rpcs.respond_to? :report_error_event
389
384
  @report_error_event = ::Gapic::Config::Method.new report_error_event_config
390
385
 
391
386
  yield self if block_given?
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ErrorReporting
23
23
  module V1beta1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.4.3"
25
25
  end
26
26
  end
27
27
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-error_reporting-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-23 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +50,14 @@ dependencies:
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 1.24.0
53
+ version: 1.25.1
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 1.24.0
60
+ version: 1.25.1
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: minitest
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -207,14 +213,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
213
  requirements:
208
214
  - - ">="
209
215
  - !ruby/object:Gem::Version
210
- version: '2.4'
216
+ version: '2.5'
211
217
  required_rubygems_version: !ruby/object:Gem::Requirement
212
218
  requirements:
213
219
  - - ">="
214
220
  - !ruby/object:Gem::Version
215
221
  version: '0'
216
222
  requirements: []
217
- rubygems_version: 3.2.6
223
+ rubygems_version: 3.2.17
218
224
  signing_key:
219
225
  specification_version: 4
220
226
  summary: API Client library for the Cloud Error Reporting V1beta1 API