google-cloud-error_reporting-v1beta1 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/error_reporting/v1beta1/error_group_service/rest/client.rb +424 -0
  5. data/lib/google/cloud/error_reporting/v1beta1/error_group_service/rest/service_stub.rb +167 -0
  6. data/lib/google/cloud/error_reporting/v1beta1/error_group_service/rest.rb +52 -0
  7. data/lib/google/cloud/error_reporting/v1beta1/error_group_service.rb +7 -1
  8. data/lib/google/cloud/error_reporting/v1beta1/error_stats_service/client.rb +8 -12
  9. data/lib/google/cloud/error_reporting/v1beta1/error_stats_service/rest/client.rb +553 -0
  10. data/lib/google/cloud/error_reporting/v1beta1/error_stats_service/rest/service_stub.rb +225 -0
  11. data/lib/google/cloud/error_reporting/v1beta1/error_stats_service/rest.rb +53 -0
  12. data/lib/google/cloud/error_reporting/v1beta1/error_stats_service.rb +7 -1
  13. data/lib/google/cloud/error_reporting/v1beta1/report_errors_service/client.rb +0 -4
  14. data/lib/google/cloud/error_reporting/v1beta1/report_errors_service/rest/client.rb +365 -0
  15. data/lib/google/cloud/error_reporting/v1beta1/report_errors_service/rest/service_stub.rb +108 -0
  16. data/lib/google/cloud/error_reporting/v1beta1/report_errors_service/rest.rb +52 -0
  17. data/lib/google/cloud/error_reporting/v1beta1/report_errors_service.rb +7 -1
  18. data/lib/google/cloud/error_reporting/v1beta1/rest.rb +39 -0
  19. data/lib/google/cloud/error_reporting/v1beta1/version.rb +1 -1
  20. data/lib/google/cloud/error_reporting/v1beta1.rb +7 -2
  21. data/lib/google/devtools/clouderrorreporting/v1beta1/common_pb.rb +0 -1
  22. data/lib/google/devtools/clouderrorreporting/v1beta1/report_errors_service_services_pb.rb +0 -3
  23. data/proto_docs/google/api/client.rb +318 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. metadata +21 -8
@@ -0,0 +1,365 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/devtools/clouderrorreporting/v1beta1/report_errors_service_pb"
21
+ require "google/cloud/error_reporting/v1beta1/report_errors_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module ErrorReporting
26
+ module V1beta1
27
+ module ReportErrorsService
28
+ module Rest
29
+ ##
30
+ # REST client for the ReportErrorsService service.
31
+ #
32
+ # An API for reporting error events.
33
+ #
34
+ class Client
35
+ include Paths
36
+
37
+ # @private
38
+ attr_reader :report_errors_service_stub
39
+
40
+ ##
41
+ # Configure the ReportErrorsService Client class.
42
+ #
43
+ # See {::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all ReportErrorsService clients
49
+ # ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "ErrorReporting", "V1beta1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.timeout = 600.0
70
+
71
+ default_config
72
+ end
73
+ yield @configure if block_given?
74
+ @configure
75
+ end
76
+
77
+ ##
78
+ # Configure the ReportErrorsService Client instance.
79
+ #
80
+ # The configuration is set to the derived mode, meaning that values can be changed,
81
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
82
+ # should be made on {Client.configure}.
83
+ #
84
+ # See {::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client::Configuration}
85
+ # for a description of the configuration fields.
86
+ #
87
+ # @yield [config] Configure the Client client.
88
+ # @yieldparam config [Client::Configuration]
89
+ #
90
+ # @return [Client::Configuration]
91
+ #
92
+ def configure
93
+ yield @config if block_given?
94
+ @config
95
+ end
96
+
97
+ ##
98
+ # Create a new ReportErrorsService REST client object.
99
+ #
100
+ # @example
101
+ #
102
+ # # Create a client using the default configuration
103
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client.new
104
+ #
105
+ # # Create a client using a custom configuration
106
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client.new do |config|
107
+ # config.timeout = 10.0
108
+ # end
109
+ #
110
+ # @yield [config] Configure the ReportErrorsService client.
111
+ # @yieldparam config [Client::Configuration]
112
+ #
113
+ def initialize
114
+ # Create the configuration object
115
+ @config = Configuration.new Client.configure
116
+
117
+ # Yield the configuration if needed
118
+ yield @config if block_given?
119
+
120
+ # Create credentials
121
+ credentials = @config.credentials
122
+ # Use self-signed JWT if the endpoint is unchanged from default,
123
+ # but only if the default endpoint does not have a region prefix.
124
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
125
+ !@config.endpoint.split(".").first.include?("-")
126
+ credentials ||= Credentials.default scope: @config.scope,
127
+ enable_self_signed_jwt: enable_self_signed_jwt
128
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
129
+ credentials = Credentials.new credentials, scope: @config.scope
130
+ end
131
+
132
+ @quota_project_id = @config.quota_project
133
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
134
+
135
+ @report_errors_service_stub = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
136
+ end
137
+
138
+ # Service calls
139
+
140
+ ##
141
+ # Report an individual error event and record the event to a log.
142
+ #
143
+ # This endpoint accepts **either** an OAuth token,
144
+ # **or** an [API key](https://support.google.com/cloud/answer/6158862)
145
+ # for authentication. To use an API key, append it to the URL as the value of
146
+ # a `key` parameter. For example:
147
+ #
148
+ # `POST
149
+ # https://clouderrorreporting.googleapis.com/v1beta1/\\{projectName}/events:report?key=123ABC456`
150
+ #
151
+ # **Note:** [Error Reporting](/error-reporting) is a global service built
152
+ # on Cloud Logging and doesn't analyze logs stored
153
+ # in regional log buckets or logs routed to other Google Cloud projects.
154
+ #
155
+ # @overload report_error_event(request, options = nil)
156
+ # Pass arguments to `report_error_event` via a request object, either of type
157
+ # {::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest} or an equivalent Hash.
158
+ #
159
+ # @param request [::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest, ::Hash]
160
+ # A request object representing the call parameters. Required. To specify no
161
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
162
+ # @param options [::Gapic::CallOptions, ::Hash]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @overload report_error_event(project_name: nil, event: nil)
166
+ # Pass arguments to `report_error_event` via keyword arguments. Note that at
167
+ # least one keyword argument is required. To specify no parameters, or to keep all
168
+ # the default parameter values, pass an empty Hash as a request object (see above).
169
+ #
170
+ # @param project_name [::String]
171
+ # Required. The resource name of the Google Cloud Platform project. Written
172
+ # as `projects/{projectId}`, where `{projectId}` is the
173
+ # [Google Cloud Platform project
174
+ # ID](https://support.google.com/cloud/answer/6158840).
175
+ #
176
+ # Example: // `projects/my-project-123`.
177
+ # @param event [::Google::Cloud::ErrorReporting::V1beta1::ReportedErrorEvent, ::Hash]
178
+ # Required. The error event to be reported.
179
+ # @yield [result, operation] Access the result along with the TransportOperation object
180
+ # @yieldparam result [::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse]
181
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
182
+ #
183
+ # @return [::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse]
184
+ #
185
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
186
+ def report_error_event request, options = nil
187
+ raise ::ArgumentError, "request must be provided" if request.nil?
188
+
189
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest
190
+
191
+ # Converts hash and nil to an options object
192
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
193
+
194
+ # Customize the options with defaults
195
+ call_metadata = @config.rpcs.report_error_event.metadata.to_h
196
+
197
+ # Set x-goog-api-client and x-goog-user-project headers
198
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
199
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
200
+ gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION,
201
+ transports_version_send: [:rest]
202
+
203
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
204
+
205
+ options.apply_defaults timeout: @config.rpcs.report_error_event.timeout,
206
+ metadata: call_metadata,
207
+ retry_policy: @config.rpcs.report_error_event.retry_policy
208
+
209
+ options.apply_defaults timeout: @config.timeout,
210
+ metadata: @config.metadata,
211
+ retry_policy: @config.retry_policy
212
+
213
+ @report_errors_service_stub.report_error_event request, options do |result, operation|
214
+ yield result, operation if block_given?
215
+ return result
216
+ end
217
+ rescue ::Gapic::Rest::Error => e
218
+ raise ::Google::Cloud::Error.from_error(e)
219
+ end
220
+
221
+ ##
222
+ # Configuration class for the ReportErrorsService REST API.
223
+ #
224
+ # This class represents the configuration for ReportErrorsService REST,
225
+ # providing control over timeouts, retry behavior, logging, transport
226
+ # parameters, and other low-level controls. Certain parameters can also be
227
+ # applied individually to specific RPCs. See
228
+ # {::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client::Configuration::Rpcs}
229
+ # for a list of RPCs that can be configured independently.
230
+ #
231
+ # Configuration can be applied globally to all clients, or to a single client
232
+ # on construction.
233
+ #
234
+ # @example
235
+ #
236
+ # # Modify the global config, setting the timeout for
237
+ # # report_error_event to 20 seconds,
238
+ # # and all remaining timeouts to 10 seconds.
239
+ # ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client.configure do |config|
240
+ # config.timeout = 10.0
241
+ # config.rpcs.report_error_event.timeout = 20.0
242
+ # end
243
+ #
244
+ # # Apply the above configuration only to a new client.
245
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client.new do |config|
246
+ # config.timeout = 10.0
247
+ # config.rpcs.report_error_event.timeout = 20.0
248
+ # end
249
+ #
250
+ # @!attribute [rw] endpoint
251
+ # The hostname or hostname:port of the service endpoint.
252
+ # Defaults to `"clouderrorreporting.googleapis.com"`.
253
+ # @return [::String]
254
+ # @!attribute [rw] credentials
255
+ # Credentials to send with calls. You may provide any of the following types:
256
+ # * (`String`) The path to a service account key file in JSON format
257
+ # * (`Hash`) A service account key as a Hash
258
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
259
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
260
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
261
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
262
+ # * (`nil`) indicating no credentials
263
+ # @return [::Object]
264
+ # @!attribute [rw] scope
265
+ # The OAuth scopes
266
+ # @return [::Array<::String>]
267
+ # @!attribute [rw] lib_name
268
+ # The library name as recorded in instrumentation and logging
269
+ # @return [::String]
270
+ # @!attribute [rw] lib_version
271
+ # The library version as recorded in instrumentation and logging
272
+ # @return [::String]
273
+ # @!attribute [rw] timeout
274
+ # The call timeout in seconds.
275
+ # @return [::Numeric]
276
+ # @!attribute [rw] metadata
277
+ # Additional headers to be sent with the call.
278
+ # @return [::Hash{::Symbol=>::String}]
279
+ # @!attribute [rw] retry_policy
280
+ # The retry policy. The value is a hash with the following keys:
281
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
282
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
283
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
284
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
285
+ # trigger a retry.
286
+ # @return [::Hash]
287
+ # @!attribute [rw] quota_project
288
+ # A separate project against which to charge quota.
289
+ # @return [::String]
290
+ #
291
+ class Configuration
292
+ extend ::Gapic::Config
293
+
294
+ config_attr :endpoint, "clouderrorreporting.googleapis.com", ::String
295
+ config_attr :credentials, nil do |value|
296
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
297
+ allowed.any? { |klass| klass === value }
298
+ end
299
+ config_attr :scope, nil, ::String, ::Array, nil
300
+ config_attr :lib_name, nil, ::String, nil
301
+ config_attr :lib_version, nil, ::String, nil
302
+ config_attr :timeout, nil, ::Numeric, nil
303
+ config_attr :metadata, nil, ::Hash, nil
304
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
305
+ config_attr :quota_project, nil, ::String, nil
306
+
307
+ # @private
308
+ def initialize parent_config = nil
309
+ @parent_config = parent_config unless parent_config.nil?
310
+
311
+ yield self if block_given?
312
+ end
313
+
314
+ ##
315
+ # Configurations for individual RPCs
316
+ # @return [Rpcs]
317
+ #
318
+ def rpcs
319
+ @rpcs ||= begin
320
+ parent_rpcs = nil
321
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
322
+ Rpcs.new parent_rpcs
323
+ end
324
+ end
325
+
326
+ ##
327
+ # Configuration RPC class for the ReportErrorsService API.
328
+ #
329
+ # Includes fields providing the configuration for each RPC in this service.
330
+ # Each configuration object is of type `Gapic::Config::Method` and includes
331
+ # the following configuration fields:
332
+ #
333
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
334
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
335
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
336
+ # include the following keys:
337
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
338
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
339
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
340
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
341
+ # trigger a retry.
342
+ #
343
+ class Rpcs
344
+ ##
345
+ # RPC-specific configuration for `report_error_event`
346
+ # @return [::Gapic::Config::Method]
347
+ #
348
+ attr_reader :report_error_event
349
+
350
+ # @private
351
+ def initialize parent_rpcs = nil
352
+ report_error_event_config = parent_rpcs.report_error_event if parent_rpcs.respond_to? :report_error_event
353
+ @report_error_event = ::Gapic::Config::Method.new report_error_event_config
354
+
355
+ yield self if block_given?
356
+ end
357
+ end
358
+ end
359
+ end
360
+ end
361
+ end
362
+ end
363
+ end
364
+ end
365
+ end
@@ -0,0 +1,108 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/devtools/clouderrorreporting/v1beta1/report_errors_service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module ErrorReporting
24
+ module V1beta1
25
+ module ReportErrorsService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the ReportErrorsService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the report_error_event REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse]
56
+ # A result object deserialized from the server's reply
57
+ def report_error_event request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_report_error_event_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # @private
83
+ #
84
+ # GRPC transcoding helper method for the report_error_event REST call
85
+ #
86
+ # @param request_pb [::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest]
87
+ # A request object representing the call parameters. Required.
88
+ # @return [Array(String, [String, nil], Hash{String => String})]
89
+ # Uri, Body, Query string parameters
90
+ def self.transcode_report_error_event_request request_pb
91
+ transcoder = Gapic::Rest::GrpcTranscoder.new
92
+ .with_bindings(
93
+ uri_method: :post,
94
+ uri_template: "/v1beta1/{project_name}/events:report",
95
+ body: "event",
96
+ matches: [
97
+ ["project_name", %r{^projects/[^/]+/?$}, false]
98
+ ]
99
+ )
100
+ transcoder.transcode request_pb
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/error_reporting/v1beta1/version"
24
+
25
+ require "google/cloud/error_reporting/v1beta1/report_errors_service/credentials"
26
+ require "google/cloud/error_reporting/v1beta1/report_errors_service/paths"
27
+ require "google/cloud/error_reporting/v1beta1/report_errors_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module ErrorReporting
32
+ module V1beta1
33
+ ##
34
+ # An API for reporting error events.
35
+ #
36
+ # To load this service and instantiate a REST client:
37
+ #
38
+ # require "google/cloud/error_reporting/v1beta1/report_errors_service/rest"
39
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client.new
40
+ #
41
+ module ReportErrorsService
42
+ # Client for the REST transport
43
+ module Rest
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
52
+ require "google/cloud/error_reporting/v1beta1/report_errors_service/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/error_reporting/v1beta1/version"
25
25
  require "google/cloud/error_reporting/v1beta1/report_errors_service/credentials"
26
26
  require "google/cloud/error_reporting/v1beta1/report_errors_service/paths"
27
27
  require "google/cloud/error_reporting/v1beta1/report_errors_service/client"
28
+ require "google/cloud/error_reporting/v1beta1/report_errors_service/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -33,11 +34,16 @@ module Google
33
34
  ##
34
35
  # An API for reporting error events.
35
36
  #
36
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
37
38
  #
38
39
  # require "google/cloud/error_reporting/v1beta1/report_errors_service"
39
40
  # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new
40
41
  #
42
+ # @example Load this service and instantiate a REST client
43
+ #
44
+ # require "google/cloud/error_reporting/v1beta1/report_errors_service/rest"
45
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Rest::Client.new
46
+ #
41
47
  module ReportErrorsService
42
48
  end
43
49
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/error_reporting/v1beta1/error_group_service/rest"
20
+ require "google/cloud/error_reporting/v1beta1/error_stats_service/rest"
21
+ require "google/cloud/error_reporting/v1beta1/report_errors_service/rest"
22
+ require "google/cloud/error_reporting/v1beta1/version"
23
+
24
+ module Google
25
+ module Cloud
26
+ module ErrorReporting
27
+ ##
28
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
29
+ #
30
+ # @example
31
+ #
32
+ # require "google/cloud/error_reporting/v1beta1/rest"
33
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Rest::Client.new
34
+ #
35
+ module V1beta1
36
+ end
37
+ end
38
+ end
39
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ErrorReporting
23
23
  module V1beta1
24
- VERSION = "0.5.0"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,13 +25,18 @@ module Google
25
25
  module Cloud
26
26
  module ErrorReporting
27
27
  ##
28
- # To load this package, including all its services, and instantiate a client:
28
+ # API client module.
29
29
  #
30
- # @example
30
+ # @example Load this package, including all its services, and instantiate a gRPC client
31
31
  #
32
32
  # require "google/cloud/error_reporting/v1beta1"
33
33
  # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Client.new
34
34
  #
35
+ # @example Load this package, including all its services, and instantiate a REST client
36
+ #
37
+ # require "google/cloud/error_reporting/v1beta1"
38
+ # client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::Rest::Client.new
39
+ #
35
40
  module V1beta1
36
41
  end
37
42
  end
@@ -5,7 +5,6 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/api/resource_pb'
7
7
  require 'google/protobuf/timestamp_pb'
8
- require 'google/api/annotations_pb'
9
8
 
10
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
10
  add_file("google/devtools/clouderrorreporting/v1beta1/common.proto", :syntax => :proto3) do
@@ -47,9 +47,6 @@ module Google
47
47
  # on Cloud Logging and doesn't analyze logs stored
48
48
  # in regional log buckets or logs routed to other Google Cloud projects.
49
49
  #
50
- # For more information, see
51
- # [Using Error Reporting with regionalized
52
- # logs](/error-reporting/docs/regionalization).
53
50
  rpc :ReportErrorEvent, ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest, ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse
54
51
  end
55
52