google-apis-alertcenter_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-alertcenter_v1beta1.rb +15 -0
- data/lib/google/apis/alertcenter_v1beta1.rb +36 -0
- data/lib/google/apis/alertcenter_v1beta1/classes.rb +1537 -0
- data/lib/google/apis/alertcenter_v1beta1/gem_version.rb +28 -0
- data/lib/google/apis/alertcenter_v1beta1/representations.rb +726 -0
- data/lib/google/apis/alertcenter_v1beta1/service.rb +473 -0
- metadata +76 -0
@@ -0,0 +1,473 @@
|
|
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 AlertcenterV1beta1
|
23
|
+
# Google Workspace Alert Center API
|
24
|
+
#
|
25
|
+
# Manages alerts on issues affecting your domain.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/alertcenter_v1beta1'
|
29
|
+
#
|
30
|
+
# Alertcenter = Google::Apis::AlertcenterV1beta1 # Alias the module
|
31
|
+
# service = Alertcenter::AlertCenterService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/admin-sdk/alertcenter/
|
34
|
+
class AlertCenterService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://alertcenter.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-alertcenter_v1beta1',
|
48
|
+
client_version: Google::Apis::AlertcenterV1beta1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Performs batch delete operation on alerts.
|
53
|
+
# @param [Google::Apis::AlertcenterV1beta1::BatchDeleteAlertsRequest] batch_delete_alerts_request_object
|
54
|
+
# @param [String] fields
|
55
|
+
# Selector specifying which fields to include in a partial response.
|
56
|
+
# @param [String] quota_user
|
57
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
58
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
59
|
+
# @param [Google::Apis::RequestOptions] options
|
60
|
+
# Request-specific options
|
61
|
+
#
|
62
|
+
# @yield [result, err] Result & error if block supplied
|
63
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::BatchDeleteAlertsResponse] parsed result object
|
64
|
+
# @yieldparam err [StandardError] error object if request failed
|
65
|
+
#
|
66
|
+
# @return [Google::Apis::AlertcenterV1beta1::BatchDeleteAlertsResponse]
|
67
|
+
#
|
68
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
69
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
70
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
71
|
+
def batch_delete_alerts(batch_delete_alerts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
72
|
+
command = make_simple_command(:post, 'v1beta1/alerts:batchDelete', options)
|
73
|
+
command.request_representation = Google::Apis::AlertcenterV1beta1::BatchDeleteAlertsRequest::Representation
|
74
|
+
command.request_object = batch_delete_alerts_request_object
|
75
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::BatchDeleteAlertsResponse::Representation
|
76
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::BatchDeleteAlertsResponse
|
77
|
+
command.query['fields'] = fields unless fields.nil?
|
78
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
79
|
+
execute_or_queue_command(command, &block)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Performs batch undelete operation on alerts.
|
83
|
+
# @param [Google::Apis::AlertcenterV1beta1::BatchUndeleteAlertsRequest] batch_undelete_alerts_request_object
|
84
|
+
# @param [String] fields
|
85
|
+
# Selector specifying which fields to include in a partial response.
|
86
|
+
# @param [String] quota_user
|
87
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
88
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
89
|
+
# @param [Google::Apis::RequestOptions] options
|
90
|
+
# Request-specific options
|
91
|
+
#
|
92
|
+
# @yield [result, err] Result & error if block supplied
|
93
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::BatchUndeleteAlertsResponse] parsed result object
|
94
|
+
# @yieldparam err [StandardError] error object if request failed
|
95
|
+
#
|
96
|
+
# @return [Google::Apis::AlertcenterV1beta1::BatchUndeleteAlertsResponse]
|
97
|
+
#
|
98
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
99
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
100
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
101
|
+
def batch_undelete_alerts(batch_undelete_alerts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
102
|
+
command = make_simple_command(:post, 'v1beta1/alerts:batchUndelete', options)
|
103
|
+
command.request_representation = Google::Apis::AlertcenterV1beta1::BatchUndeleteAlertsRequest::Representation
|
104
|
+
command.request_object = batch_undelete_alerts_request_object
|
105
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::BatchUndeleteAlertsResponse::Representation
|
106
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::BatchUndeleteAlertsResponse
|
107
|
+
command.query['fields'] = fields unless fields.nil?
|
108
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
109
|
+
execute_or_queue_command(command, &block)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Marks the specified alert for deletion. An alert that has been marked for
|
113
|
+
# deletion is removed from Alert Center after 30 days. Marking an alert for
|
114
|
+
# deletion has no effect on an alert which has already been marked for deletion.
|
115
|
+
# Attempting to mark a nonexistent alert for deletion results in a `NOT_FOUND`
|
116
|
+
# error.
|
117
|
+
# @param [String] alert_id
|
118
|
+
# Required. The identifier of the alert to delete.
|
119
|
+
# @param [String] customer_id
|
120
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
121
|
+
# of the customer the alert is associated with. Inferred from the caller
|
122
|
+
# identity if not provided.
|
123
|
+
# @param [String] fields
|
124
|
+
# Selector specifying which fields to include in a partial response.
|
125
|
+
# @param [String] quota_user
|
126
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
127
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
128
|
+
# @param [Google::Apis::RequestOptions] options
|
129
|
+
# Request-specific options
|
130
|
+
#
|
131
|
+
# @yield [result, err] Result & error if block supplied
|
132
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::Empty] parsed result object
|
133
|
+
# @yieldparam err [StandardError] error object if request failed
|
134
|
+
#
|
135
|
+
# @return [Google::Apis::AlertcenterV1beta1::Empty]
|
136
|
+
#
|
137
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
138
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
139
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
140
|
+
def delete_alert(alert_id, customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
141
|
+
command = make_simple_command(:delete, 'v1beta1/alerts/{alertId}', options)
|
142
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::Empty::Representation
|
143
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::Empty
|
144
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
145
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
146
|
+
command.query['fields'] = fields unless fields.nil?
|
147
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
148
|
+
execute_or_queue_command(command, &block)
|
149
|
+
end
|
150
|
+
|
151
|
+
# Gets the specified alert. Attempting to get a nonexistent alert returns `
|
152
|
+
# NOT_FOUND` error.
|
153
|
+
# @param [String] alert_id
|
154
|
+
# Required. The identifier of the alert to retrieve.
|
155
|
+
# @param [String] customer_id
|
156
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
157
|
+
# of the customer the alert is associated with. Inferred from the caller
|
158
|
+
# identity if not provided.
|
159
|
+
# @param [String] fields
|
160
|
+
# Selector specifying which fields to include in a partial response.
|
161
|
+
# @param [String] quota_user
|
162
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
163
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
164
|
+
# @param [Google::Apis::RequestOptions] options
|
165
|
+
# Request-specific options
|
166
|
+
#
|
167
|
+
# @yield [result, err] Result & error if block supplied
|
168
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::Alert] parsed result object
|
169
|
+
# @yieldparam err [StandardError] error object if request failed
|
170
|
+
#
|
171
|
+
# @return [Google::Apis::AlertcenterV1beta1::Alert]
|
172
|
+
#
|
173
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
174
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
175
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
176
|
+
def get_alert(alert_id, customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
177
|
+
command = make_simple_command(:get, 'v1beta1/alerts/{alertId}', options)
|
178
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::Alert::Representation
|
179
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::Alert
|
180
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
181
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
182
|
+
command.query['fields'] = fields unless fields.nil?
|
183
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
184
|
+
execute_or_queue_command(command, &block)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the metadata of an alert. Attempting to get metadata for a non-
|
188
|
+
# existent alert returns `NOT_FOUND` error.
|
189
|
+
# @param [String] alert_id
|
190
|
+
# Required. The identifier of the alert this metadata belongs to.
|
191
|
+
# @param [String] customer_id
|
192
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
193
|
+
# of the customer the alert metadata is associated with. Inferred from the
|
194
|
+
# caller identity if not provided.
|
195
|
+
# @param [String] fields
|
196
|
+
# Selector specifying which fields to include in a partial response.
|
197
|
+
# @param [String] quota_user
|
198
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
199
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
200
|
+
# @param [Google::Apis::RequestOptions] options
|
201
|
+
# Request-specific options
|
202
|
+
#
|
203
|
+
# @yield [result, err] Result & error if block supplied
|
204
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::AlertMetadata] parsed result object
|
205
|
+
# @yieldparam err [StandardError] error object if request failed
|
206
|
+
#
|
207
|
+
# @return [Google::Apis::AlertcenterV1beta1::AlertMetadata]
|
208
|
+
#
|
209
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
210
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
211
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
212
|
+
def get_alert_metadata(alert_id, customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
213
|
+
command = make_simple_command(:get, 'v1beta1/alerts/{alertId}/metadata', options)
|
214
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::AlertMetadata::Representation
|
215
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::AlertMetadata
|
216
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
217
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
218
|
+
command.query['fields'] = fields unless fields.nil?
|
219
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
220
|
+
execute_or_queue_command(command, &block)
|
221
|
+
end
|
222
|
+
|
223
|
+
# Lists the alerts.
|
224
|
+
# @param [String] customer_id
|
225
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
226
|
+
# of the customer the alerts are associated with. Inferred from the caller
|
227
|
+
# identity if not provided.
|
228
|
+
# @param [String] filter
|
229
|
+
# Optional. A query string for filtering alert results. For more details, see [
|
230
|
+
# Query filters](/admin-sdk/alertcenter/guides/query-filters) and [Supported
|
231
|
+
# query filter fields](/admin-sdk/alertcenter/reference/filter-fields#alerts.
|
232
|
+
# list).
|
233
|
+
# @param [String] order_by
|
234
|
+
# Optional. The sort order of the list results. If not specified results may be
|
235
|
+
# returned in arbitrary order. You can sort the results in descending order
|
236
|
+
# based on the creation timestamp using `order_by="create_time desc"`. Currently,
|
237
|
+
# supported sorting are `create_time asc`, `create_time desc`, `update_time
|
238
|
+
# desc`
|
239
|
+
# @param [Fixnum] page_size
|
240
|
+
# Optional. The requested page size. Server may return fewer items than
|
241
|
+
# requested. If unspecified, server picks an appropriate default.
|
242
|
+
# @param [String] page_token
|
243
|
+
# Optional. A token identifying a page of results the server should return. If
|
244
|
+
# empty, a new iteration is started. To continue an iteration, pass in the value
|
245
|
+
# from the previous ListAlertsResponse's next_page_token field.
|
246
|
+
# @param [String] fields
|
247
|
+
# Selector specifying which fields to include in a partial response.
|
248
|
+
# @param [String] quota_user
|
249
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
250
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
251
|
+
# @param [Google::Apis::RequestOptions] options
|
252
|
+
# Request-specific options
|
253
|
+
#
|
254
|
+
# @yield [result, err] Result & error if block supplied
|
255
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::ListAlertsResponse] parsed result object
|
256
|
+
# @yieldparam err [StandardError] error object if request failed
|
257
|
+
#
|
258
|
+
# @return [Google::Apis::AlertcenterV1beta1::ListAlertsResponse]
|
259
|
+
#
|
260
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
261
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
262
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
263
|
+
def list_alerts(customer_id: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
264
|
+
command = make_simple_command(:get, 'v1beta1/alerts', options)
|
265
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::ListAlertsResponse::Representation
|
266
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::ListAlertsResponse
|
267
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
268
|
+
command.query['filter'] = filter unless filter.nil?
|
269
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
270
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
271
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
272
|
+
command.query['fields'] = fields unless fields.nil?
|
273
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
274
|
+
execute_or_queue_command(command, &block)
|
275
|
+
end
|
276
|
+
|
277
|
+
# Restores, or "undeletes", an alert that was marked for deletion within the
|
278
|
+
# past 30 days. Attempting to undelete an alert which was marked for deletion
|
279
|
+
# over 30 days ago (which has been removed from the Alert Center database) or a
|
280
|
+
# nonexistent alert returns a `NOT_FOUND` error. Attempting to undelete an alert
|
281
|
+
# which has not been marked for deletion has no effect.
|
282
|
+
# @param [String] alert_id
|
283
|
+
# Required. The identifier of the alert to undelete.
|
284
|
+
# @param [Google::Apis::AlertcenterV1beta1::UndeleteAlertRequest] undelete_alert_request_object
|
285
|
+
# @param [String] fields
|
286
|
+
# Selector specifying which fields to include in a partial response.
|
287
|
+
# @param [String] quota_user
|
288
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
289
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
290
|
+
# @param [Google::Apis::RequestOptions] options
|
291
|
+
# Request-specific options
|
292
|
+
#
|
293
|
+
# @yield [result, err] Result & error if block supplied
|
294
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::Alert] parsed result object
|
295
|
+
# @yieldparam err [StandardError] error object if request failed
|
296
|
+
#
|
297
|
+
# @return [Google::Apis::AlertcenterV1beta1::Alert]
|
298
|
+
#
|
299
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
300
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
301
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
302
|
+
def undelete_alert(alert_id, undelete_alert_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
303
|
+
command = make_simple_command(:post, 'v1beta1/alerts/{alertId}:undelete', options)
|
304
|
+
command.request_representation = Google::Apis::AlertcenterV1beta1::UndeleteAlertRequest::Representation
|
305
|
+
command.request_object = undelete_alert_request_object
|
306
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::Alert::Representation
|
307
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::Alert
|
308
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
309
|
+
command.query['fields'] = fields unless fields.nil?
|
310
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
311
|
+
execute_or_queue_command(command, &block)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Creates new feedback for an alert. Attempting to create a feedback for a non-
|
315
|
+
# existent alert returns `NOT_FOUND` error. Attempting to create a feedback for
|
316
|
+
# an alert that is marked for deletion returns `FAILED_PRECONDITION' error.
|
317
|
+
# @param [String] alert_id
|
318
|
+
# Required. The identifier of the alert this feedback belongs to.
|
319
|
+
# @param [Google::Apis::AlertcenterV1beta1::AlertFeedback] alert_feedback_object
|
320
|
+
# @param [String] customer_id
|
321
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
322
|
+
# of the customer the alert is associated with. Inferred from the caller
|
323
|
+
# identity if not provided.
|
324
|
+
# @param [String] fields
|
325
|
+
# Selector specifying which fields to include in a partial response.
|
326
|
+
# @param [String] quota_user
|
327
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
328
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
329
|
+
# @param [Google::Apis::RequestOptions] options
|
330
|
+
# Request-specific options
|
331
|
+
#
|
332
|
+
# @yield [result, err] Result & error if block supplied
|
333
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::AlertFeedback] parsed result object
|
334
|
+
# @yieldparam err [StandardError] error object if request failed
|
335
|
+
#
|
336
|
+
# @return [Google::Apis::AlertcenterV1beta1::AlertFeedback]
|
337
|
+
#
|
338
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
339
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
340
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
341
|
+
def create_alert_feedback(alert_id, alert_feedback_object = nil, customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
342
|
+
command = make_simple_command(:post, 'v1beta1/alerts/{alertId}/feedback', options)
|
343
|
+
command.request_representation = Google::Apis::AlertcenterV1beta1::AlertFeedback::Representation
|
344
|
+
command.request_object = alert_feedback_object
|
345
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::AlertFeedback::Representation
|
346
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::AlertFeedback
|
347
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
348
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
349
|
+
command.query['fields'] = fields unless fields.nil?
|
350
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
351
|
+
execute_or_queue_command(command, &block)
|
352
|
+
end
|
353
|
+
|
354
|
+
# Lists all the feedback for an alert. Attempting to list feedbacks for a non-
|
355
|
+
# existent alert returns `NOT_FOUND` error.
|
356
|
+
# @param [String] alert_id
|
357
|
+
# Required. The alert identifier. The "-" wildcard could be used to represent
|
358
|
+
# all alerts.
|
359
|
+
# @param [String] customer_id
|
360
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
361
|
+
# of the customer the alert feedback are associated with. Inferred from the
|
362
|
+
# caller identity if not provided.
|
363
|
+
# @param [String] filter
|
364
|
+
# Optional. A query string for filtering alert feedback results. For more
|
365
|
+
# details, see [Query filters](/admin-sdk/alertcenter/guides/query-filters) and [
|
366
|
+
# Supported query filter fields](/admin-sdk/alertcenter/reference/filter-fields#
|
367
|
+
# alerts.feedback.list).
|
368
|
+
# @param [String] fields
|
369
|
+
# Selector specifying which fields to include in a partial response.
|
370
|
+
# @param [String] quota_user
|
371
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
372
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
373
|
+
# @param [Google::Apis::RequestOptions] options
|
374
|
+
# Request-specific options
|
375
|
+
#
|
376
|
+
# @yield [result, err] Result & error if block supplied
|
377
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::ListAlertFeedbackResponse] parsed result object
|
378
|
+
# @yieldparam err [StandardError] error object if request failed
|
379
|
+
#
|
380
|
+
# @return [Google::Apis::AlertcenterV1beta1::ListAlertFeedbackResponse]
|
381
|
+
#
|
382
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
383
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
384
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
385
|
+
def list_alert_feedbacks(alert_id, customer_id: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
386
|
+
command = make_simple_command(:get, 'v1beta1/alerts/{alertId}/feedback', options)
|
387
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::ListAlertFeedbackResponse::Representation
|
388
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::ListAlertFeedbackResponse
|
389
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
390
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
391
|
+
command.query['filter'] = filter unless filter.nil?
|
392
|
+
command.query['fields'] = fields unless fields.nil?
|
393
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
394
|
+
execute_or_queue_command(command, &block)
|
395
|
+
end
|
396
|
+
|
397
|
+
# Returns customer-level settings.
|
398
|
+
# @param [String] customer_id
|
399
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
400
|
+
# of the customer the alert settings are associated with. Inferred from the
|
401
|
+
# caller identity if not provided.
|
402
|
+
# @param [String] fields
|
403
|
+
# Selector specifying which fields to include in a partial response.
|
404
|
+
# @param [String] quota_user
|
405
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
406
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
407
|
+
# @param [Google::Apis::RequestOptions] options
|
408
|
+
# Request-specific options
|
409
|
+
#
|
410
|
+
# @yield [result, err] Result & error if block supplied
|
411
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::Settings] parsed result object
|
412
|
+
# @yieldparam err [StandardError] error object if request failed
|
413
|
+
#
|
414
|
+
# @return [Google::Apis::AlertcenterV1beta1::Settings]
|
415
|
+
#
|
416
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
417
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
418
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
419
|
+
def get_settings(customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
420
|
+
command = make_simple_command(:get, 'v1beta1/settings', options)
|
421
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::Settings::Representation
|
422
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::Settings
|
423
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
424
|
+
command.query['fields'] = fields unless fields.nil?
|
425
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
426
|
+
execute_or_queue_command(command, &block)
|
427
|
+
end
|
428
|
+
|
429
|
+
# Updates the customer-level settings.
|
430
|
+
# @param [Google::Apis::AlertcenterV1beta1::Settings] settings_object
|
431
|
+
# @param [String] customer_id
|
432
|
+
# Optional. The unique identifier of the Google Workspace organization account
|
433
|
+
# of the customer the alert settings are associated with. Inferred from the
|
434
|
+
# caller identity if not provided.
|
435
|
+
# @param [String] fields
|
436
|
+
# Selector specifying which fields to include in a partial response.
|
437
|
+
# @param [String] quota_user
|
438
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
439
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
440
|
+
# @param [Google::Apis::RequestOptions] options
|
441
|
+
# Request-specific options
|
442
|
+
#
|
443
|
+
# @yield [result, err] Result & error if block supplied
|
444
|
+
# @yieldparam result [Google::Apis::AlertcenterV1beta1::Settings] parsed result object
|
445
|
+
# @yieldparam err [StandardError] error object if request failed
|
446
|
+
#
|
447
|
+
# @return [Google::Apis::AlertcenterV1beta1::Settings]
|
448
|
+
#
|
449
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
450
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
451
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
452
|
+
def update_settings(settings_object = nil, customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
453
|
+
command = make_simple_command(:patch, 'v1beta1/settings', options)
|
454
|
+
command.request_representation = Google::Apis::AlertcenterV1beta1::Settings::Representation
|
455
|
+
command.request_object = settings_object
|
456
|
+
command.response_representation = Google::Apis::AlertcenterV1beta1::Settings::Representation
|
457
|
+
command.response_class = Google::Apis::AlertcenterV1beta1::Settings
|
458
|
+
command.query['customerId'] = customer_id unless customer_id.nil?
|
459
|
+
command.query['fields'] = fields unless fields.nil?
|
460
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
461
|
+
execute_or_queue_command(command, &block)
|
462
|
+
end
|
463
|
+
|
464
|
+
protected
|
465
|
+
|
466
|
+
def apply_command_defaults(command)
|
467
|
+
command.query['key'] = key unless key.nil?
|
468
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
469
|
+
end
|
470
|
+
end
|
471
|
+
end
|
472
|
+
end
|
473
|
+
end
|