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;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for AlertCenter (v1beta1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * Manages alerts on issues affecting your domain. Note: The current version of
|
---|
27 | * this API (v1beta1) is available to all Google Workspace customers.</p>
|
---|
28 | *
|
---|
29 | * <p>
|
---|
30 | * For more information about this service, see the API
|
---|
31 | * <a href="https://developers.google.com/admin-sdk/alertcenter/" target="_blank">Documentation</a>
|
---|
32 | * </p>
|
---|
33 | *
|
---|
34 | * @author Google, Inc.
|
---|
35 | */
|
---|
36 | class AlertCenter extends \Google\Service
|
---|
37 | {
|
---|
38 | /** See and delete your domain's G Suite alerts, and send alert feedback. */
|
---|
39 | const APPS_ALERTS =
|
---|
40 | "https://www.googleapis.com/auth/apps.alerts";
|
---|
41 |
|
---|
42 | public $alerts;
|
---|
43 | public $alerts_feedback;
|
---|
44 | public $v1beta1;
|
---|
45 | public $rootUrlTemplate;
|
---|
46 |
|
---|
47 | /**
|
---|
48 | * Constructs the internal representation of the AlertCenter service.
|
---|
49 | *
|
---|
50 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
51 | * config array to pass to a new Client instance.
|
---|
52 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
53 | */
|
---|
54 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
55 | {
|
---|
56 | parent::__construct($clientOrConfig);
|
---|
57 | $this->rootUrl = $rootUrl ?: 'https://alertcenter.googleapis.com/';
|
---|
58 | $this->rootUrlTemplate = $rootUrl ?: 'https://alertcenter.UNIVERSE_DOMAIN/';
|
---|
59 | $this->servicePath = '';
|
---|
60 | $this->batchPath = 'batch';
|
---|
61 | $this->version = 'v1beta1';
|
---|
62 | $this->serviceName = 'alertcenter';
|
---|
63 |
|
---|
64 | $this->alerts = new AlertCenter\Resource\Alerts(
|
---|
65 | $this,
|
---|
66 | $this->serviceName,
|
---|
67 | 'alerts',
|
---|
68 | [
|
---|
69 | 'methods' => [
|
---|
70 | 'batchDelete' => [
|
---|
71 | 'path' => 'v1beta1/alerts:batchDelete',
|
---|
72 | 'httpMethod' => 'POST',
|
---|
73 | 'parameters' => [],
|
---|
74 | ],'batchUndelete' => [
|
---|
75 | 'path' => 'v1beta1/alerts:batchUndelete',
|
---|
76 | 'httpMethod' => 'POST',
|
---|
77 | 'parameters' => [],
|
---|
78 | ],'delete' => [
|
---|
79 | 'path' => 'v1beta1/alerts/{alertId}',
|
---|
80 | 'httpMethod' => 'DELETE',
|
---|
81 | 'parameters' => [
|
---|
82 | 'alertId' => [
|
---|
83 | 'location' => 'path',
|
---|
84 | 'type' => 'string',
|
---|
85 | 'required' => true,
|
---|
86 | ],
|
---|
87 | 'customerId' => [
|
---|
88 | 'location' => 'query',
|
---|
89 | 'type' => 'string',
|
---|
90 | ],
|
---|
91 | ],
|
---|
92 | ],'get' => [
|
---|
93 | 'path' => 'v1beta1/alerts/{alertId}',
|
---|
94 | 'httpMethod' => 'GET',
|
---|
95 | 'parameters' => [
|
---|
96 | 'alertId' => [
|
---|
97 | 'location' => 'path',
|
---|
98 | 'type' => 'string',
|
---|
99 | 'required' => true,
|
---|
100 | ],
|
---|
101 | 'customerId' => [
|
---|
102 | 'location' => 'query',
|
---|
103 | 'type' => 'string',
|
---|
104 | ],
|
---|
105 | ],
|
---|
106 | ],'getMetadata' => [
|
---|
107 | 'path' => 'v1beta1/alerts/{alertId}/metadata',
|
---|
108 | 'httpMethod' => 'GET',
|
---|
109 | 'parameters' => [
|
---|
110 | 'alertId' => [
|
---|
111 | 'location' => 'path',
|
---|
112 | 'type' => 'string',
|
---|
113 | 'required' => true,
|
---|
114 | ],
|
---|
115 | 'customerId' => [
|
---|
116 | 'location' => 'query',
|
---|
117 | 'type' => 'string',
|
---|
118 | ],
|
---|
119 | ],
|
---|
120 | ],'list' => [
|
---|
121 | 'path' => 'v1beta1/alerts',
|
---|
122 | 'httpMethod' => 'GET',
|
---|
123 | 'parameters' => [
|
---|
124 | 'customerId' => [
|
---|
125 | 'location' => 'query',
|
---|
126 | 'type' => 'string',
|
---|
127 | ],
|
---|
128 | 'filter' => [
|
---|
129 | 'location' => 'query',
|
---|
130 | 'type' => 'string',
|
---|
131 | ],
|
---|
132 | 'orderBy' => [
|
---|
133 | 'location' => 'query',
|
---|
134 | 'type' => 'string',
|
---|
135 | ],
|
---|
136 | 'pageSize' => [
|
---|
137 | 'location' => 'query',
|
---|
138 | 'type' => 'integer',
|
---|
139 | ],
|
---|
140 | 'pageToken' => [
|
---|
141 | 'location' => 'query',
|
---|
142 | 'type' => 'string',
|
---|
143 | ],
|
---|
144 | ],
|
---|
145 | ],'undelete' => [
|
---|
146 | 'path' => 'v1beta1/alerts/{alertId}:undelete',
|
---|
147 | 'httpMethod' => 'POST',
|
---|
148 | 'parameters' => [
|
---|
149 | 'alertId' => [
|
---|
150 | 'location' => 'path',
|
---|
151 | 'type' => 'string',
|
---|
152 | 'required' => true,
|
---|
153 | ],
|
---|
154 | ],
|
---|
155 | ],
|
---|
156 | ]
|
---|
157 | ]
|
---|
158 | );
|
---|
159 | $this->alerts_feedback = new AlertCenter\Resource\AlertsFeedback(
|
---|
160 | $this,
|
---|
161 | $this->serviceName,
|
---|
162 | 'feedback',
|
---|
163 | [
|
---|
164 | 'methods' => [
|
---|
165 | 'create' => [
|
---|
166 | 'path' => 'v1beta1/alerts/{alertId}/feedback',
|
---|
167 | 'httpMethod' => 'POST',
|
---|
168 | 'parameters' => [
|
---|
169 | 'alertId' => [
|
---|
170 | 'location' => 'path',
|
---|
171 | 'type' => 'string',
|
---|
172 | 'required' => true,
|
---|
173 | ],
|
---|
174 | 'customerId' => [
|
---|
175 | 'location' => 'query',
|
---|
176 | 'type' => 'string',
|
---|
177 | ],
|
---|
178 | ],
|
---|
179 | ],'list' => [
|
---|
180 | 'path' => 'v1beta1/alerts/{alertId}/feedback',
|
---|
181 | 'httpMethod' => 'GET',
|
---|
182 | 'parameters' => [
|
---|
183 | 'alertId' => [
|
---|
184 | 'location' => 'path',
|
---|
185 | 'type' => 'string',
|
---|
186 | 'required' => true,
|
---|
187 | ],
|
---|
188 | 'customerId' => [
|
---|
189 | 'location' => 'query',
|
---|
190 | 'type' => 'string',
|
---|
191 | ],
|
---|
192 | 'filter' => [
|
---|
193 | 'location' => 'query',
|
---|
194 | 'type' => 'string',
|
---|
195 | ],
|
---|
196 | ],
|
---|
197 | ],
|
---|
198 | ]
|
---|
199 | ]
|
---|
200 | );
|
---|
201 | $this->v1beta1 = new AlertCenter\Resource\V1beta1(
|
---|
202 | $this,
|
---|
203 | $this->serviceName,
|
---|
204 | 'v1beta1',
|
---|
205 | [
|
---|
206 | 'methods' => [
|
---|
207 | 'getSettings' => [
|
---|
208 | 'path' => 'v1beta1/settings',
|
---|
209 | 'httpMethod' => 'GET',
|
---|
210 | 'parameters' => [
|
---|
211 | 'customerId' => [
|
---|
212 | 'location' => 'query',
|
---|
213 | 'type' => 'string',
|
---|
214 | ],
|
---|
215 | ],
|
---|
216 | ],'updateSettings' => [
|
---|
217 | 'path' => 'v1beta1/settings',
|
---|
218 | 'httpMethod' => 'PATCH',
|
---|
219 | 'parameters' => [
|
---|
220 | 'customerId' => [
|
---|
221 | 'location' => 'query',
|
---|
222 | 'type' => 'string',
|
---|
223 | ],
|
---|
224 | ],
|
---|
225 | ],
|
---|
226 | ]
|
---|
227 | ]
|
---|
228 | );
|
---|
229 | }
|
---|
230 | }
|
---|
231 |
|
---|
232 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
233 | class_alias(AlertCenter::class, 'Google_Service_AlertCenter');
|
---|