google-apis-clouderrorreporting_v1beta1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-clouderrorreporting_v1beta1.rb +15 -0
- data/lib/google/apis/clouderrorreporting_v1beta1.rb +37 -0
- data/lib/google/apis/clouderrorreporting_v1beta1/classes.rb +606 -0
- data/lib/google/apis/clouderrorreporting_v1beta1/gem_version.rb +28 -0
- data/lib/google/apis/clouderrorreporting_v1beta1/representations.rb +269 -0
- data/lib/google/apis/clouderrorreporting_v1beta1/service.rb +335 -0
- metadata +76 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module ClouderrorreportingV1beta1
|
18
|
+
# Version of the google-apis-clouderrorreporting_v1beta1 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.1.1"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20200827"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,269 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module ClouderrorreportingV1beta1
|
24
|
+
|
25
|
+
class DeleteEventsResponse
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class ErrorContext
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class ErrorEvent
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class ErrorGroup
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class ErrorGroupStats
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class HttpRequestContext
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class ListEventsResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class ListGroupStatsResponse
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class ReportErrorEventResponse
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class ReportedErrorEvent
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class ServiceContext
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class SourceLocation
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class SourceReference
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class TimedCount
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class TrackingIssue
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class DeleteEventsResponse
|
116
|
+
# @private
|
117
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
class ErrorContext
|
122
|
+
# @private
|
123
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
124
|
+
property :http_request, as: 'httpRequest', class: Google::Apis::ClouderrorreportingV1beta1::HttpRequestContext, decorator: Google::Apis::ClouderrorreportingV1beta1::HttpRequestContext::Representation
|
125
|
+
|
126
|
+
property :report_location, as: 'reportLocation', class: Google::Apis::ClouderrorreportingV1beta1::SourceLocation, decorator: Google::Apis::ClouderrorreportingV1beta1::SourceLocation::Representation
|
127
|
+
|
128
|
+
collection :source_references, as: 'sourceReferences', class: Google::Apis::ClouderrorreportingV1beta1::SourceReference, decorator: Google::Apis::ClouderrorreportingV1beta1::SourceReference::Representation
|
129
|
+
|
130
|
+
property :user, as: 'user'
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
class ErrorEvent
|
135
|
+
# @private
|
136
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
137
|
+
property :context, as: 'context', class: Google::Apis::ClouderrorreportingV1beta1::ErrorContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorContext::Representation
|
138
|
+
|
139
|
+
property :event_time, as: 'eventTime'
|
140
|
+
property :message, as: 'message'
|
141
|
+
property :service_context, as: 'serviceContext', class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ServiceContext::Representation
|
142
|
+
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
class ErrorGroup
|
147
|
+
# @private
|
148
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
149
|
+
property :group_id, as: 'groupId'
|
150
|
+
property :name, as: 'name'
|
151
|
+
property :resolution_status, as: 'resolutionStatus'
|
152
|
+
collection :tracking_issues, as: 'trackingIssues', class: Google::Apis::ClouderrorreportingV1beta1::TrackingIssue, decorator: Google::Apis::ClouderrorreportingV1beta1::TrackingIssue::Representation
|
153
|
+
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
class ErrorGroupStats
|
158
|
+
# @private
|
159
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
160
|
+
collection :affected_services, as: 'affectedServices', class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ServiceContext::Representation
|
161
|
+
|
162
|
+
property :affected_users_count, :numeric_string => true, as: 'affectedUsersCount'
|
163
|
+
property :count, :numeric_string => true, as: 'count'
|
164
|
+
property :first_seen_time, as: 'firstSeenTime'
|
165
|
+
property :group, as: 'group', class: Google::Apis::ClouderrorreportingV1beta1::ErrorGroup, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation
|
166
|
+
|
167
|
+
property :last_seen_time, as: 'lastSeenTime'
|
168
|
+
property :num_affected_services, as: 'numAffectedServices'
|
169
|
+
property :representative, as: 'representative', class: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent::Representation
|
170
|
+
|
171
|
+
collection :timed_counts, as: 'timedCounts', class: Google::Apis::ClouderrorreportingV1beta1::TimedCount, decorator: Google::Apis::ClouderrorreportingV1beta1::TimedCount::Representation
|
172
|
+
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
class HttpRequestContext
|
177
|
+
# @private
|
178
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
179
|
+
property :method_prop, as: 'method'
|
180
|
+
property :referrer, as: 'referrer'
|
181
|
+
property :remote_ip, as: 'remoteIp'
|
182
|
+
property :response_status_code, as: 'responseStatusCode'
|
183
|
+
property :url, as: 'url'
|
184
|
+
property :user_agent, as: 'userAgent'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class ListEventsResponse
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
collection :error_events, as: 'errorEvents', class: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent::Representation
|
192
|
+
|
193
|
+
property :next_page_token, as: 'nextPageToken'
|
194
|
+
property :time_range_begin, as: 'timeRangeBegin'
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
class ListGroupStatsResponse
|
199
|
+
# @private
|
200
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
201
|
+
collection :error_group_stats, as: 'errorGroupStats', class: Google::Apis::ClouderrorreportingV1beta1::ErrorGroupStats, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorGroupStats::Representation
|
202
|
+
|
203
|
+
property :next_page_token, as: 'nextPageToken'
|
204
|
+
property :time_range_begin, as: 'timeRangeBegin'
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
class ReportErrorEventResponse
|
209
|
+
# @private
|
210
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
class ReportedErrorEvent
|
215
|
+
# @private
|
216
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
217
|
+
property :context, as: 'context', class: Google::Apis::ClouderrorreportingV1beta1::ErrorContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorContext::Representation
|
218
|
+
|
219
|
+
property :event_time, as: 'eventTime'
|
220
|
+
property :message, as: 'message'
|
221
|
+
property :service_context, as: 'serviceContext', class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ServiceContext::Representation
|
222
|
+
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
class ServiceContext
|
227
|
+
# @private
|
228
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
229
|
+
property :resource_type, as: 'resourceType'
|
230
|
+
property :service, as: 'service'
|
231
|
+
property :version, as: 'version'
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
class SourceLocation
|
236
|
+
# @private
|
237
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
238
|
+
property :file_path, as: 'filePath'
|
239
|
+
property :function_name, as: 'functionName'
|
240
|
+
property :line_number, as: 'lineNumber'
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
class SourceReference
|
245
|
+
# @private
|
246
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
247
|
+
property :repository, as: 'repository'
|
248
|
+
property :revision_id, as: 'revisionId'
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
class TimedCount
|
253
|
+
# @private
|
254
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
255
|
+
property :count, :numeric_string => true, as: 'count'
|
256
|
+
property :end_time, as: 'endTime'
|
257
|
+
property :start_time, as: 'startTime'
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
class TrackingIssue
|
262
|
+
# @private
|
263
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
264
|
+
property :url, as: 'url'
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
@@ -0,0 +1,335 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module ClouderrorreportingV1beta1
|
23
|
+
# Error Reporting API
|
24
|
+
#
|
25
|
+
# Groups and counts similar errors from cloud services and applications, reports
|
26
|
+
# new errors, and provides access to error groups and their associated errors.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/clouderrorreporting_v1beta1'
|
30
|
+
#
|
31
|
+
# Clouderrorreporting = Google::Apis::ClouderrorreportingV1beta1 # Alias the module
|
32
|
+
# service = Clouderrorreporting::ClouderrorreportingService.new
|
33
|
+
#
|
34
|
+
# @see https://cloud.google.com/error-reporting/
|
35
|
+
class ClouderrorreportingService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://clouderrorreporting.googleapis.com/', '',
|
48
|
+
client_name: 'google-apis-clouderrorreporting_v1beta1',
|
49
|
+
client_version: Google::Apis::ClouderrorreportingV1beta1::GEM_VERSION)
|
50
|
+
@batch_path = 'batch'
|
51
|
+
end
|
52
|
+
|
53
|
+
# Deletes all error events of a given project.
|
54
|
+
# @param [String] project_name
|
55
|
+
# Required. The resource name of the Google Cloud Platform project. Written as `
|
56
|
+
# projects/`projectID``, where ``projectID`` is the [Google Cloud Platform
|
57
|
+
# project ID](https://support.google.com/cloud/answer/6158840). Example: `
|
58
|
+
# projects/my-project-123`.
|
59
|
+
# @param [String] fields
|
60
|
+
# Selector specifying which fields to include in a partial response.
|
61
|
+
# @param [String] quota_user
|
62
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
63
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
64
|
+
# @param [Google::Apis::RequestOptions] options
|
65
|
+
# Request-specific options
|
66
|
+
#
|
67
|
+
# @yield [result, err] Result & error if block supplied
|
68
|
+
# @yieldparam result [Google::Apis::ClouderrorreportingV1beta1::DeleteEventsResponse] parsed result object
|
69
|
+
# @yieldparam err [StandardError] error object if request failed
|
70
|
+
#
|
71
|
+
# @return [Google::Apis::ClouderrorreportingV1beta1::DeleteEventsResponse]
|
72
|
+
#
|
73
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
74
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
75
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
76
|
+
def delete_project_events(project_name, fields: nil, quota_user: nil, options: nil, &block)
|
77
|
+
command = make_simple_command(:delete, 'v1beta1/{+projectName}/events', options)
|
78
|
+
command.response_representation = Google::Apis::ClouderrorreportingV1beta1::DeleteEventsResponse::Representation
|
79
|
+
command.response_class = Google::Apis::ClouderrorreportingV1beta1::DeleteEventsResponse
|
80
|
+
command.params['projectName'] = project_name unless project_name.nil?
|
81
|
+
command.query['fields'] = fields unless fields.nil?
|
82
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
|
+
execute_or_queue_command(command, &block)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Lists the specified events.
|
87
|
+
# @param [String] project_name
|
88
|
+
# Required. The resource name of the Google Cloud Platform project. Written as `
|
89
|
+
# projects/`projectID``, where ``projectID`` is the [Google Cloud Platform
|
90
|
+
# project ID](https://support.google.com/cloud/answer/6158840). Example: `
|
91
|
+
# projects/my-project-123`.
|
92
|
+
# @param [String] group_id
|
93
|
+
# Required. The group for which events shall be returned.
|
94
|
+
# @param [Fixnum] page_size
|
95
|
+
# Optional. The maximum number of results to return per response.
|
96
|
+
# @param [String] page_token
|
97
|
+
# Optional. A `next_page_token` provided by a previous response.
|
98
|
+
# @param [String] service_filter_resource_type
|
99
|
+
# Optional. The exact value to match against [`ServiceContext.resource_type`](/
|
100
|
+
# error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
|
101
|
+
# @param [String] service_filter_service
|
102
|
+
# Optional. The exact value to match against [`ServiceContext.service`](/error-
|
103
|
+
# reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
|
104
|
+
# @param [String] service_filter_version
|
105
|
+
# Optional. The exact value to match against [`ServiceContext.version`](/error-
|
106
|
+
# reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
|
107
|
+
# @param [String] time_range_period
|
108
|
+
# Restricts the query to the specified time range.
|
109
|
+
# @param [String] fields
|
110
|
+
# Selector specifying which fields to include in a partial response.
|
111
|
+
# @param [String] quota_user
|
112
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
113
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
114
|
+
# @param [Google::Apis::RequestOptions] options
|
115
|
+
# Request-specific options
|
116
|
+
#
|
117
|
+
# @yield [result, err] Result & error if block supplied
|
118
|
+
# @yieldparam result [Google::Apis::ClouderrorreportingV1beta1::ListEventsResponse] parsed result object
|
119
|
+
# @yieldparam err [StandardError] error object if request failed
|
120
|
+
#
|
121
|
+
# @return [Google::Apis::ClouderrorreportingV1beta1::ListEventsResponse]
|
122
|
+
#
|
123
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
124
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
125
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
126
|
+
def list_project_events(project_name, group_id: nil, page_size: nil, page_token: nil, service_filter_resource_type: nil, service_filter_service: nil, service_filter_version: nil, time_range_period: nil, fields: nil, quota_user: nil, options: nil, &block)
|
127
|
+
command = make_simple_command(:get, 'v1beta1/{+projectName}/events', options)
|
128
|
+
command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ListEventsResponse::Representation
|
129
|
+
command.response_class = Google::Apis::ClouderrorreportingV1beta1::ListEventsResponse
|
130
|
+
command.params['projectName'] = project_name unless project_name.nil?
|
131
|
+
command.query['groupId'] = group_id unless group_id.nil?
|
132
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
133
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
134
|
+
command.query['serviceFilter.resourceType'] = service_filter_resource_type unless service_filter_resource_type.nil?
|
135
|
+
command.query['serviceFilter.service'] = service_filter_service unless service_filter_service.nil?
|
136
|
+
command.query['serviceFilter.version'] = service_filter_version unless service_filter_version.nil?
|
137
|
+
command.query['timeRange.period'] = time_range_period unless time_range_period.nil?
|
138
|
+
command.query['fields'] = fields unless fields.nil?
|
139
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
140
|
+
execute_or_queue_command(command, &block)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Report an individual error event. This endpoint accepts **either** an OAuth
|
144
|
+
# token, **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 a `
|
146
|
+
# key` parameter. For example: `POST https://clouderrorreporting.googleapis.com/
|
147
|
+
# v1beta1/`projectName`/events:report?key=123ABC456`
|
148
|
+
# @param [String] project_name
|
149
|
+
# Required. The resource name of the Google Cloud Platform project. Written as `
|
150
|
+
# projects/`projectId``, where ``projectId`` is the [Google Cloud Platform
|
151
|
+
# project ID](https://support.google.com/cloud/answer/6158840). Example: // `
|
152
|
+
# projects/my-project-123`.
|
153
|
+
# @param [Google::Apis::ClouderrorreportingV1beta1::ReportedErrorEvent] reported_error_event_object
|
154
|
+
# @param [String] fields
|
155
|
+
# Selector specifying which fields to include in a partial response.
|
156
|
+
# @param [String] quota_user
|
157
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
158
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
159
|
+
# @param [Google::Apis::RequestOptions] options
|
160
|
+
# Request-specific options
|
161
|
+
#
|
162
|
+
# @yield [result, err] Result & error if block supplied
|
163
|
+
# @yieldparam result [Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse] parsed result object
|
164
|
+
# @yieldparam err [StandardError] error object if request failed
|
165
|
+
#
|
166
|
+
# @return [Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse]
|
167
|
+
#
|
168
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
169
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
170
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
171
|
+
def report_project_event(project_name, reported_error_event_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
172
|
+
command = make_simple_command(:post, 'v1beta1/{+projectName}/events:report', options)
|
173
|
+
command.request_representation = Google::Apis::ClouderrorreportingV1beta1::ReportedErrorEvent::Representation
|
174
|
+
command.request_object = reported_error_event_object
|
175
|
+
command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse::Representation
|
176
|
+
command.response_class = Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse
|
177
|
+
command.params['projectName'] = project_name unless project_name.nil?
|
178
|
+
command.query['fields'] = fields unless fields.nil?
|
179
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
180
|
+
execute_or_queue_command(command, &block)
|
181
|
+
end
|
182
|
+
|
183
|
+
# Lists the specified groups.
|
184
|
+
# @param [String] project_name
|
185
|
+
# Required. The resource name of the Google Cloud Platform project. Written as `
|
186
|
+
# projects/`projectID``, where ``projectID`` is the [Google Cloud Platform
|
187
|
+
# project ID](https://support.google.com/cloud/answer/6158840). Example: `
|
188
|
+
# projects/my-project-123`.
|
189
|
+
# @param [String] alignment
|
190
|
+
# Optional. The alignment of the timed counts to be returned. Default is `
|
191
|
+
# ALIGNMENT_EQUAL_AT_END`.
|
192
|
+
# @param [String] alignment_time
|
193
|
+
# Optional. Time where the timed counts shall be aligned if rounded alignment is
|
194
|
+
# chosen. Default is 00:00 UTC.
|
195
|
+
# @param [Array<String>, String] group_id
|
196
|
+
# Optional. List all ErrorGroupStats with these IDs.
|
197
|
+
# @param [String] order
|
198
|
+
# Optional. The sort order in which the results are returned. Default is `
|
199
|
+
# COUNT_DESC`.
|
200
|
+
# @param [Fixnum] page_size
|
201
|
+
# Optional. The maximum number of results to return per response. Default is 20.
|
202
|
+
# @param [String] page_token
|
203
|
+
# Optional. A `next_page_token` provided by a previous response. To view
|
204
|
+
# additional results, pass this token along with the identical query parameters
|
205
|
+
# as the first request.
|
206
|
+
# @param [String] service_filter_resource_type
|
207
|
+
# Optional. The exact value to match against [`ServiceContext.resource_type`](/
|
208
|
+
# error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
|
209
|
+
# @param [String] service_filter_service
|
210
|
+
# Optional. The exact value to match against [`ServiceContext.service`](/error-
|
211
|
+
# reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
|
212
|
+
# @param [String] service_filter_version
|
213
|
+
# Optional. The exact value to match against [`ServiceContext.version`](/error-
|
214
|
+
# reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
|
215
|
+
# @param [String] time_range_period
|
216
|
+
# Restricts the query to the specified time range.
|
217
|
+
# @param [String] timed_count_duration
|
218
|
+
# Optional. The preferred duration for a single returned `TimedCount`. If not
|
219
|
+
# set, no timed counts are returned.
|
220
|
+
# @param [String] fields
|
221
|
+
# Selector specifying which fields to include in a partial response.
|
222
|
+
# @param [String] quota_user
|
223
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
224
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
225
|
+
# @param [Google::Apis::RequestOptions] options
|
226
|
+
# Request-specific options
|
227
|
+
#
|
228
|
+
# @yield [result, err] Result & error if block supplied
|
229
|
+
# @yieldparam result [Google::Apis::ClouderrorreportingV1beta1::ListGroupStatsResponse] parsed result object
|
230
|
+
# @yieldparam err [StandardError] error object if request failed
|
231
|
+
#
|
232
|
+
# @return [Google::Apis::ClouderrorreportingV1beta1::ListGroupStatsResponse]
|
233
|
+
#
|
234
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
235
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
236
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
237
|
+
def list_project_group_stats(project_name, alignment: nil, alignment_time: nil, group_id: nil, order: nil, page_size: nil, page_token: nil, service_filter_resource_type: nil, service_filter_service: nil, service_filter_version: nil, time_range_period: nil, timed_count_duration: nil, fields: nil, quota_user: nil, options: nil, &block)
|
238
|
+
command = make_simple_command(:get, 'v1beta1/{+projectName}/groupStats', options)
|
239
|
+
command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ListGroupStatsResponse::Representation
|
240
|
+
command.response_class = Google::Apis::ClouderrorreportingV1beta1::ListGroupStatsResponse
|
241
|
+
command.params['projectName'] = project_name unless project_name.nil?
|
242
|
+
command.query['alignment'] = alignment unless alignment.nil?
|
243
|
+
command.query['alignmentTime'] = alignment_time unless alignment_time.nil?
|
244
|
+
command.query['groupId'] = group_id unless group_id.nil?
|
245
|
+
command.query['order'] = order unless order.nil?
|
246
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
247
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
248
|
+
command.query['serviceFilter.resourceType'] = service_filter_resource_type unless service_filter_resource_type.nil?
|
249
|
+
command.query['serviceFilter.service'] = service_filter_service unless service_filter_service.nil?
|
250
|
+
command.query['serviceFilter.version'] = service_filter_version unless service_filter_version.nil?
|
251
|
+
command.query['timeRange.period'] = time_range_period unless time_range_period.nil?
|
252
|
+
command.query['timedCountDuration'] = timed_count_duration unless timed_count_duration.nil?
|
253
|
+
command.query['fields'] = fields unless fields.nil?
|
254
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
255
|
+
execute_or_queue_command(command, &block)
|
256
|
+
end
|
257
|
+
|
258
|
+
# Get the specified group.
|
259
|
+
# @param [String] group_name
|
260
|
+
# Required. The group resource name. Written as `projects/`projectID`/groups/`
|
261
|
+
# group_name``. Call [`groupStats.list`](https://cloud.google.com/error-
|
262
|
+
# reporting/reference/rest/v1beta1/projects.groupStats/list) to return a list of
|
263
|
+
# groups belonging to this project. Example: `projects/my-project-123/groups/my-
|
264
|
+
# group`
|
265
|
+
# @param [String] fields
|
266
|
+
# Selector specifying which fields to include in a partial response.
|
267
|
+
# @param [String] quota_user
|
268
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
269
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
270
|
+
# @param [Google::Apis::RequestOptions] options
|
271
|
+
# Request-specific options
|
272
|
+
#
|
273
|
+
# @yield [result, err] Result & error if block supplied
|
274
|
+
# @yieldparam result [Google::Apis::ClouderrorreportingV1beta1::ErrorGroup] parsed result object
|
275
|
+
# @yieldparam err [StandardError] error object if request failed
|
276
|
+
#
|
277
|
+
# @return [Google::Apis::ClouderrorreportingV1beta1::ErrorGroup]
|
278
|
+
#
|
279
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
280
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
281
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
282
|
+
def get_project_group(group_name, fields: nil, quota_user: nil, options: nil, &block)
|
283
|
+
command = make_simple_command(:get, 'v1beta1/{+groupName}', options)
|
284
|
+
command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation
|
285
|
+
command.response_class = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup
|
286
|
+
command.params['groupName'] = group_name unless group_name.nil?
|
287
|
+
command.query['fields'] = fields unless fields.nil?
|
288
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
289
|
+
execute_or_queue_command(command, &block)
|
290
|
+
end
|
291
|
+
|
292
|
+
# Replace the data for the specified group. Fails if the group does not exist.
|
293
|
+
# @param [String] name
|
294
|
+
# The group resource name. Example: projects/my-project-123/groups/
|
295
|
+
# CNSgkpnppqKCUw
|
296
|
+
# @param [Google::Apis::ClouderrorreportingV1beta1::ErrorGroup] error_group_object
|
297
|
+
# @param [String] fields
|
298
|
+
# Selector specifying which fields to include in a partial response.
|
299
|
+
# @param [String] quota_user
|
300
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
301
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
302
|
+
# @param [Google::Apis::RequestOptions] options
|
303
|
+
# Request-specific options
|
304
|
+
#
|
305
|
+
# @yield [result, err] Result & error if block supplied
|
306
|
+
# @yieldparam result [Google::Apis::ClouderrorreportingV1beta1::ErrorGroup] parsed result object
|
307
|
+
# @yieldparam err [StandardError] error object if request failed
|
308
|
+
#
|
309
|
+
# @return [Google::Apis::ClouderrorreportingV1beta1::ErrorGroup]
|
310
|
+
#
|
311
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
312
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
313
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
314
|
+
def update_project_group(name, error_group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
315
|
+
command = make_simple_command(:put, 'v1beta1/{+name}', options)
|
316
|
+
command.request_representation = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation
|
317
|
+
command.request_object = error_group_object
|
318
|
+
command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation
|
319
|
+
command.response_class = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup
|
320
|
+
command.params['name'] = name unless name.nil?
|
321
|
+
command.query['fields'] = fields unless fields.nil?
|
322
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
323
|
+
execute_or_queue_command(command, &block)
|
324
|
+
end
|
325
|
+
|
326
|
+
protected
|
327
|
+
|
328
|
+
def apply_command_defaults(command)
|
329
|
+
command.query['key'] = key unless key.nil?
|
330
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
331
|
+
end
|
332
|
+
end
|
333
|
+
end
|
334
|
+
end
|
335
|
+
end
|