1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://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, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\AlertCenter\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\AlertCenter\AlertFeedback;
|
---|
21 | use Google\Service\AlertCenter\ListAlertFeedbackResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "feedback" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $alertcenterService = new Google\Service\AlertCenter(...);
|
---|
28 | * $feedback = $alertcenterService->alerts_feedback;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class AlertsFeedback extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Creates new feedback for an alert. Attempting to create a feedback for a non-
|
---|
35 | * existent alert returns `NOT_FOUND` error. Attempting to create a feedback for
|
---|
36 | * an alert that is marked for deletion returns `FAILED_PRECONDITION' error.
|
---|
37 | * (feedback.create)
|
---|
38 | *
|
---|
39 | * @param string $alertId Required. The identifier of the alert this feedback
|
---|
40 | * belongs to.
|
---|
41 | * @param AlertFeedback $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | *
|
---|
44 | * @opt_param string customerId Optional. The unique identifier of the Google
|
---|
45 | * Workspace account of the customer the alert is associated with. The
|
---|
46 | * `customer_id` must have the initial "C" stripped (for example, `046psxkn`).
|
---|
47 | * Inferred from the caller identity if not provided. [Find your customer
|
---|
48 | * ID](https://support.google.com/cloudidentity/answer/10070793).
|
---|
49 | * @return AlertFeedback
|
---|
50 | * @throws \Google\Service\Exception
|
---|
51 | */
|
---|
52 | public function create($alertId, AlertFeedback $postBody, $optParams = [])
|
---|
53 | {
|
---|
54 | $params = ['alertId' => $alertId, 'postBody' => $postBody];
|
---|
55 | $params = array_merge($params, $optParams);
|
---|
56 | return $this->call('create', [$params], AlertFeedback::class);
|
---|
57 | }
|
---|
58 | /**
|
---|
59 | * Lists all the feedback for an alert. Attempting to list feedbacks for a non-
|
---|
60 | * existent alert returns `NOT_FOUND` error. (feedback.listAlertsFeedback)
|
---|
61 | *
|
---|
62 | * @param string $alertId Required. The alert identifier. The "-" wildcard could
|
---|
63 | * be used to represent all alerts.
|
---|
64 | * @param array $optParams Optional parameters.
|
---|
65 | *
|
---|
66 | * @opt_param string customerId Optional. The unique identifier of the Google
|
---|
67 | * Workspace account of the customer the alert is associated with. The
|
---|
68 | * `customer_id` must have the initial "C" stripped (for example, `046psxkn`).
|
---|
69 | * Inferred from the caller identity if not provided. [Find your customer
|
---|
70 | * ID](https://support.google.com/cloudidentity/answer/10070793).
|
---|
71 | * @opt_param string filter Optional. A query string for filtering alert
|
---|
72 | * feedback results. For more details, see [Query
|
---|
73 | * filters](https://developers.google.com/admin-sdk/alertcenter/guides/query-
|
---|
74 | * filters) and [Supported query filter
|
---|
75 | * fields](https://developers.google.com/admin-sdk/alertcenter/reference/filter-
|
---|
76 | * fields#alerts.feedback.list).
|
---|
77 | * @return ListAlertFeedbackResponse
|
---|
78 | * @throws \Google\Service\Exception
|
---|
79 | */
|
---|
80 | public function listAlertsFeedback($alertId, $optParams = [])
|
---|
81 | {
|
---|
82 | $params = ['alertId' => $alertId];
|
---|
83 | $params = array_merge($params, $optParams);
|
---|
84 | return $this->call('list', [$params], ListAlertFeedbackResponse::class);
|
---|
85 | }
|
---|
86 | }
|
---|
87 |
|
---|
88 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
89 | class_alias(AlertsFeedback::class, 'Google_Service_AlertCenter_Resource_AlertsFeedback');
|
---|