google-cloud-error_reporting-v1beta1 0.4.1 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24bc8b10cbf819cbf6dc575dc15f8b62e07f9a3efc33433deb58dcb21e9d55a6
4
- data.tar.gz: 6d369e49d242c40df6b79b2b9e128f7654e319756f8c6f936f065135a2e9528e
3
+ metadata.gz: fc7c1cffbbbd3180e8c4c1d837e45b9a58acd268c0a79ba954d59cd58569a2a3
4
+ data.tar.gz: 5f919094e3280add088d0e8307ab350bdc98d3f08797c3b3dedb548f7ed09001
5
5
  SHA512:
6
- metadata.gz: fa5b263e3dea8e8c0ea7ec3a4cba31f0d797f5b985f19a327622869091f7e9cc5110fc53fd7be99193d8cf25084543b561afb1fb7e9b78fe2916fef0523975e3
7
- data.tar.gz: cceb8203fab2779a5429504948953b65292efa75e89fb577fda39cafbbfe5f79a12a09a2407877c20c97795688a72adbfd417a6537c03b63b60cd9c64e62c730
6
+ metadata.gz: dda5bbe832a15c357ca83d6c42d7e722372bea6a7b62cdce02fc69d7f528c7819b9c05d0fe61373c44e21136b58092c5032f8d326321204539f51025c9852794
7
+ data.tar.gz: 5ff2dd79e54fc8c18d722da6f9da1823ba8c2eccd4325d539a76f2e43b922125d92896cb7e07307532b88cb0235a1cf8328e11de756b70f243af1ec2f33787c3
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Error Reporting V1beta1 API
2
+ --title="Cloud Error Reporting V1beta1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
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"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
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
 
@@ -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]
@@ -67,10 +66,7 @@ module Google
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:
109
- #
110
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
101
+ # @example
111
102
  #
112
- # To create a new ErrorGroupService client with a custom
113
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
114
105
  #
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
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
@@ -192,6 +183,21 @@ module Google
192
183
  #
193
184
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
194
185
  #
186
+ # @example Basic example
187
+ # require "google/cloud/error_reporting/v1beta1"
188
+ #
189
+ # # Create a client object. The client can be reused for multiple calls.
190
+ # client = Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
191
+ #
192
+ # # Create a request. To set request fields, pass in keyword arguments.
193
+ # request = Google::Cloud::ErrorReporting::V1beta1::GetGroupRequest.new
194
+ #
195
+ # # Call the get_group method.
196
+ # result = client.get_group request
197
+ #
198
+ # # The returned object is of type Google::Cloud::ErrorReporting::V1beta1::ErrorGroup.
199
+ # p result
200
+ #
195
201
  def get_group request, options = nil
196
202
  raise ::ArgumentError, "request must be provided" if request.nil?
197
203
 
@@ -209,16 +215,20 @@ module Google
209
215
  gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION
210
216
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
211
217
 
212
- header_params = {
213
- "group_name" => request.group_name
214
- }
218
+ header_params = {}
219
+ if request.group_name
220
+ header_params["group_name"] = request.group_name
221
+ end
222
+
215
223
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
216
224
  metadata[:"x-goog-request-params"] ||= request_params_header
217
225
 
218
226
  options.apply_defaults timeout: @config.rpcs.get_group.timeout,
219
227
  metadata: metadata,
220
228
  retry_policy: @config.rpcs.get_group.retry_policy
221
- options.apply_defaults metadata: @config.metadata,
229
+
230
+ options.apply_defaults timeout: @config.timeout,
231
+ metadata: @config.metadata,
222
232
  retry_policy: @config.retry_policy
223
233
 
224
234
  @error_group_service_stub.call_rpc :get_group, request, options: options do |response, operation|
@@ -259,6 +269,21 @@ module Google
259
269
  #
260
270
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
261
271
  #
272
+ # @example Basic example
273
+ # require "google/cloud/error_reporting/v1beta1"
274
+ #
275
+ # # Create a client object. The client can be reused for multiple calls.
276
+ # client = Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
277
+ #
278
+ # # Create a request. To set request fields, pass in keyword arguments.
279
+ # request = Google::Cloud::ErrorReporting::V1beta1::UpdateGroupRequest.new
280
+ #
281
+ # # Call the update_group method.
282
+ # result = client.update_group request
283
+ #
284
+ # # The returned object is of type Google::Cloud::ErrorReporting::V1beta1::ErrorGroup.
285
+ # p result
286
+ #
262
287
  def update_group request, options = nil
263
288
  raise ::ArgumentError, "request must be provided" if request.nil?
264
289
 
@@ -276,16 +301,20 @@ module Google
276
301
  gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION
277
302
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
278
303
 
279
- header_params = {
280
- "group.name" => request.group.name
281
- }
304
+ header_params = {}
305
+ if request.group&.name
306
+ header_params["group.name"] = request.group.name
307
+ end
308
+
282
309
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
283
310
  metadata[:"x-goog-request-params"] ||= request_params_header
284
311
 
285
312
  options.apply_defaults timeout: @config.rpcs.update_group.timeout,
286
313
  metadata: metadata,
287
314
  retry_policy: @config.rpcs.update_group.retry_policy
288
- options.apply_defaults metadata: @config.metadata,
315
+
316
+ options.apply_defaults timeout: @config.timeout,
317
+ metadata: @config.metadata,
289
318
  retry_policy: @config.retry_policy
290
319
 
291
320
  @error_group_service_stub.call_rpc :update_group, request, options: options do |response, operation|
@@ -309,22 +338,21 @@ module Google
309
338
  # Configuration can be applied globally to all clients, or to a single client
310
339
  # on construction.
311
340
  #
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
321
- #
322
- # To apply the above configuration only to a new client:
323
- #
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
341
+ # @example
342
+ #
343
+ # # Modify the global config, setting the timeout for
344
+ # # get_group to 20 seconds,
345
+ # # and all remaining timeouts to 10 seconds.
346
+ # ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.configure do |config|
347
+ # config.timeout = 10.0
348
+ # config.rpcs.get_group.timeout = 20.0
349
+ # end
350
+ #
351
+ # # Apply the above configuration only to a new client.
352
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new do |config|
353
+ # config.timeout = 10.0
354
+ # config.rpcs.get_group.timeout = 20.0
355
+ # end
328
356
  #
329
357
  # @!attribute [rw] endpoint
330
358
  # The hostname or hostname:port of the service endpoint.
@@ -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]
@@ -68,10 +67,7 @@ module Google
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
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
@@ -227,6 +218,27 @@ module Google
227
218
  #
228
219
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
229
220
  #
221
+ # @example Basic example
222
+ # require "google/cloud/error_reporting/v1beta1"
223
+ #
224
+ # # Create a client object. The client can be reused for multiple calls.
225
+ # client = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new
226
+ #
227
+ # # Create a request. To set request fields, pass in keyword arguments.
228
+ # request = Google::Cloud::ErrorReporting::V1beta1::ListGroupStatsRequest.new
229
+ #
230
+ # # Call the list_group_stats method.
231
+ # result = client.list_group_stats request
232
+ #
233
+ # # The returned object is of type Gapic::PagedEnumerable. You can
234
+ # # iterate over all elements by calling #each, and the enumerable
235
+ # # will lazily make API calls to fetch subsequent pages. Other
236
+ # # methods are also available for managing paging directly.
237
+ # result.each do |response|
238
+ # # Each element is of type ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupStats.
239
+ # p response
240
+ # end
241
+ #
230
242
  def list_group_stats request, options = nil
231
243
  raise ::ArgumentError, "request must be provided" if request.nil?
232
244
 
@@ -244,16 +256,20 @@ module Google
244
256
  gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION
245
257
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
246
258
 
247
- header_params = {
248
- "project_name" => request.project_name
249
- }
259
+ header_params = {}
260
+ if request.project_name
261
+ header_params["project_name"] = request.project_name
262
+ end
263
+
250
264
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
251
265
  metadata[:"x-goog-request-params"] ||= request_params_header
252
266
 
253
267
  options.apply_defaults timeout: @config.rpcs.list_group_stats.timeout,
254
268
  metadata: metadata,
255
269
  retry_policy: @config.rpcs.list_group_stats.retry_policy
256
- options.apply_defaults metadata: @config.metadata,
270
+
271
+ options.apply_defaults timeout: @config.timeout,
272
+ metadata: @config.metadata,
257
273
  retry_policy: @config.retry_policy
258
274
 
259
275
  @error_stats_service_stub.call_rpc :list_group_stats, request, options: options do |response, operation|
@@ -313,6 +329,27 @@ module Google
313
329
  #
314
330
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
315
331
  #
332
+ # @example Basic example
333
+ # require "google/cloud/error_reporting/v1beta1"
334
+ #
335
+ # # Create a client object. The client can be reused for multiple calls.
336
+ # client = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new
337
+ #
338
+ # # Create a request. To set request fields, pass in keyword arguments.
339
+ # request = Google::Cloud::ErrorReporting::V1beta1::ListEventsRequest.new
340
+ #
341
+ # # Call the list_events method.
342
+ # result = client.list_events request
343
+ #
344
+ # # The returned object is of type Gapic::PagedEnumerable. You can
345
+ # # iterate over all elements by calling #each, and the enumerable
346
+ # # will lazily make API calls to fetch subsequent pages. Other
347
+ # # methods are also available for managing paging directly.
348
+ # result.each do |response|
349
+ # # Each element is of type ::Google::Cloud::ErrorReporting::V1beta1::ErrorEvent.
350
+ # p response
351
+ # end
352
+ #
316
353
  def list_events request, options = nil
317
354
  raise ::ArgumentError, "request must be provided" if request.nil?
318
355
 
@@ -330,16 +367,20 @@ module Google
330
367
  gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION
331
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
332
369
 
333
- header_params = {
334
- "project_name" => request.project_name
335
- }
370
+ header_params = {}
371
+ if request.project_name
372
+ header_params["project_name"] = request.project_name
373
+ end
374
+
336
375
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
337
376
  metadata[:"x-goog-request-params"] ||= request_params_header
338
377
 
339
378
  options.apply_defaults timeout: @config.rpcs.list_events.timeout,
340
379
  metadata: metadata,
341
380
  retry_policy: @config.rpcs.list_events.retry_policy
342
- options.apply_defaults metadata: @config.metadata,
381
+
382
+ options.apply_defaults timeout: @config.timeout,
383
+ metadata: @config.metadata,
343
384
  retry_policy: @config.retry_policy
344
385
 
345
386
  @error_stats_service_stub.call_rpc :list_events, request, options: options do |response, operation|
@@ -385,6 +426,21 @@ module Google
385
426
  #
386
427
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
387
428
  #
429
+ # @example Basic example
430
+ # require "google/cloud/error_reporting/v1beta1"
431
+ #
432
+ # # Create a client object. The client can be reused for multiple calls.
433
+ # client = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new
434
+ #
435
+ # # Create a request. To set request fields, pass in keyword arguments.
436
+ # request = Google::Cloud::ErrorReporting::V1beta1::DeleteEventsRequest.new
437
+ #
438
+ # # Call the delete_events method.
439
+ # result = client.delete_events request
440
+ #
441
+ # # The returned object is of type Google::Cloud::ErrorReporting::V1beta1::DeleteEventsResponse.
442
+ # p result
443
+ #
388
444
  def delete_events request, options = nil
389
445
  raise ::ArgumentError, "request must be provided" if request.nil?
390
446
 
@@ -402,16 +458,20 @@ module Google
402
458
  gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION
403
459
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
404
460
 
405
- header_params = {
406
- "project_name" => request.project_name
407
- }
461
+ header_params = {}
462
+ if request.project_name
463
+ header_params["project_name"] = request.project_name
464
+ end
465
+
408
466
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
409
467
  metadata[:"x-goog-request-params"] ||= request_params_header
410
468
 
411
469
  options.apply_defaults timeout: @config.rpcs.delete_events.timeout,
412
470
  metadata: metadata,
413
471
  retry_policy: @config.rpcs.delete_events.retry_policy
414
- options.apply_defaults metadata: @config.metadata,
472
+
473
+ options.apply_defaults timeout: @config.timeout,
474
+ metadata: @config.metadata,
415
475
  retry_policy: @config.retry_policy
416
476
 
417
477
  @error_stats_service_stub.call_rpc :delete_events, request, options: options do |response, operation|
@@ -435,22 +495,21 @@ module Google
435
495
  # Configuration can be applied globally to all clients, or to a single client
436
496
  # on construction.
437
497
  #
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
447
- #
448
- # To apply the above configuration only to a new client:
449
- #
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
498
+ # @example
499
+ #
500
+ # # Modify the global config, setting the timeout for
501
+ # # list_group_stats to 20 seconds,
502
+ # # and all remaining timeouts to 10 seconds.
503
+ # ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.configure do |config|
504
+ # config.timeout = 10.0
505
+ # config.rpcs.list_group_stats.timeout = 20.0
506
+ # end
507
+ #
508
+ # # Apply the above configuration only to a new client.
509
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Client.new do |config|
510
+ # config.timeout = 10.0
511
+ # config.rpcs.list_group_stats.timeout = 20.0
512
+ # end
454
513
  #
455
514
  # @!attribute [rw] endpoint
456
515
  # The hostname or hostname:port of the service endpoint.
@@ -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]
@@ -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:
98
+ # @example
103
99
  #
104
- # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new
100
+ # # Create a client using the default configuration
101
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new
105
102
  #
106
- # To create a new ReportErrorsService client with a custom
107
- # configuration:
108
- #
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
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
@@ -204,6 +198,21 @@ module Google
204
198
  #
205
199
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
206
200
  #
201
+ # @example Basic example
202
+ # require "google/cloud/error_reporting/v1beta1"
203
+ #
204
+ # # Create a client object. The client can be reused for multiple calls.
205
+ # client = Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest.new
209
+ #
210
+ # # Call the report_error_event method.
211
+ # result = client.report_error_event request
212
+ #
213
+ # # The returned object is of type Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse.
214
+ # p result
215
+ #
207
216
  def report_error_event request, options = nil
208
217
  raise ::ArgumentError, "request must be provided" if request.nil?
209
218
 
@@ -221,16 +230,20 @@ module Google
221
230
  gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION
222
231
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
223
232
 
224
- header_params = {
225
- "project_name" => request.project_name
226
- }
233
+ header_params = {}
234
+ if request.project_name
235
+ header_params["project_name"] = request.project_name
236
+ end
237
+
227
238
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
228
239
  metadata[:"x-goog-request-params"] ||= request_params_header
229
240
 
230
241
  options.apply_defaults timeout: @config.rpcs.report_error_event.timeout,
231
242
  metadata: metadata,
232
243
  retry_policy: @config.rpcs.report_error_event.retry_policy
233
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
234
247
  retry_policy: @config.retry_policy
235
248
 
236
249
  @report_errors_service_stub.call_rpc :report_error_event, request, options: options do |response, operation|
@@ -254,22 +267,21 @@ module Google
254
267
  # Configuration can be applied globally to all clients, or to a single client
255
268
  # on construction.
256
269
  #
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
266
- #
267
- # To apply the above configuration only to a new client:
268
- #
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
270
+ # @example
271
+ #
272
+ # # Modify the global config, setting the timeout for
273
+ # # report_error_event to 20 seconds,
274
+ # # and all remaining timeouts to 10 seconds.
275
+ # ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.configure do |config|
276
+ # config.timeout = 10.0
277
+ # config.rpcs.report_error_event.timeout = 20.0
278
+ # end
279
+ #
280
+ # # Apply the above configuration only to a new client.
281
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new do |config|
282
+ # config.timeout = 10.0
283
+ # config.rpcs.report_error_event.timeout = 20.0
284
+ # end
273
285
  #
274
286
  # @!attribute [rw] endpoint
275
287
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ErrorReporting
23
23
  module V1beta1
24
- VERSION = "0.4.1"
24
+ VERSION = "0.4.5"
25
25
  end
26
26
  end
27
27
  end
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/clouderrorreporting/v1beta1/common.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/devtools/clouderrorreporting/v1beta1/common.proto", :syntax => :proto3) do
11
11
  add_message "google.devtools.clouderrorreporting.v1beta1.ErrorGroup" do
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/clouderrorreporting/v1beta1/error_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'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/devtools/clouderrorreporting/v1beta1/common_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/devtools/clouderrorreporting/v1beta1/error_group_service.proto", :syntax => :proto3) do
13
13
  add_message "google.devtools.clouderrorreporting.v1beta1.GetGroupRequest" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/clouderrorreporting/v1beta1/error_stats_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/devtools/clouderrorreporting/v1beta1/common_pb'
11
9
  require 'google/protobuf/duration_pb'
12
10
  require 'google/protobuf/timestamp_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto", :syntax => :proto3) do
15
15
  add_message "google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest" do
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/devtools/clouderrorreporting/v1beta1/report_errors_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'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/devtools/clouderrorreporting/v1beta1/common_pb'
11
9
  require 'google/protobuf/timestamp_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto", :syntax => :proto3) do
14
14
  add_message "google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest" do
@@ -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
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-error_reporting-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.5
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-06-17 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubygems_version: 3.2.17
223
+ rubygems_version: 3.3.4
224
224
  signing_key:
225
225
  specification_version: 4
226
226
  summary: API Client library for the Cloud Error Reporting V1beta1 API