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