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 CloudSupport (v2beta).
24 *
25 * <p>
26 * Manages Google Cloud technical support cases for Customer Care support
27 * offerings.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/support/docs/apis" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class CloudSupport extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41
42  public $attachments;
43  public $caseClassifications;
44  public $cases;
45  public $cases_attachments;
46  public $cases_comments;
47  public $media;
48
49  /**
50   * Constructs the internal representation of the CloudSupport service.
51   *
52   * @param Client|array $clientOrConfig The client used to deliver requests, or a
53   *                                     config array to pass to a new Client instance.
54   * @param string $rootUrl The root URL used for requests to the service.
55   */
56  public function __construct($clientOrConfig = [], $rootUrl = null)
57  {
58    parent::__construct($clientOrConfig);
59    $this->rootUrl = $rootUrl ?: 'https://cloudsupport.googleapis.com/';
60    $this->servicePath = '';
61    $this->batchPath = 'batch';
62    $this->version = 'v2beta';
63    $this->serviceName = 'cloudsupport';
64
65    $this->attachments = new CloudSupport\Resource\Attachments(
66        $this,
67        $this->serviceName,
68        'attachments',
69        [
70          'methods' => [
71            'create' => [
72              'path' => 'v2beta/{+parent}/attachments',
73              'httpMethod' => 'POST',
74              'parameters' => [
75                'parent' => [
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ],
80              ],
81            ],
82          ]
83        ]
84    );
85    $this->caseClassifications = new CloudSupport\Resource\CaseClassifications(
86        $this,
87        $this->serviceName,
88        'caseClassifications',
89        [
90          'methods' => [
91            'search' => [
92              'path' => 'v2beta/caseClassifications:search',
93              'httpMethod' => 'GET',
94              'parameters' => [
95                'pageSize' => [
96                  'location' => 'query',
97                  'type' => 'integer',
98                ],
99                'pageToken' => [
100                  'location' => 'query',
101                  'type' => 'string',
102                ],
103                'query' => [
104                  'location' => 'query',
105                  'type' => 'string',
106                ],
107              ],
108            ],
109          ]
110        ]
111    );
112    $this->cases = new CloudSupport\Resource\Cases(
113        $this,
114        $this->serviceName,
115        'cases',
116        [
117          'methods' => [
118            'close' => [
119              'path' => 'v2beta/{+name}:close',
120              'httpMethod' => 'POST',
121              'parameters' => [
122                'name' => [
123                  'location' => 'path',
124                  'type' => 'string',
125                  'required' => true,
126                ],
127              ],
128            ],'create' => [
129              'path' => 'v2beta/{+parent}/cases',
130              'httpMethod' => 'POST',
131              'parameters' => [
132                'parent' => [
133                  'location' => 'path',
134                  'type' => 'string',
135                  'required' => true,
136                ],
137              ],
138            ],'escalate' => [
139              'path' => 'v2beta/{+name}:escalate',
140              'httpMethod' => 'POST',
141              'parameters' => [
142                'name' => [
143                  'location' => 'path',
144                  'type' => 'string',
145                  'required' => true,
146                ],
147              ],
148            ],'get' => [
149              'path' => 'v2beta/{+name}',
150              'httpMethod' => 'GET',
151              'parameters' => [
152                'name' => [
153                  'location' => 'path',
154                  'type' => 'string',
155                  'required' => true,
156                ],
157              ],
158            ],'list' => [
159              'path' => 'v2beta/{+parent}/cases',
160              'httpMethod' => 'GET',
161              'parameters' => [
162                'parent' => [
163                  'location' => 'path',
164                  'type' => 'string',
165                  'required' => true,
166                ],
167                'filter' => [
168                  'location' => 'query',
169                  'type' => 'string',
170                ],
171                'pageSize' => [
172                  'location' => 'query',
173                  'type' => 'integer',
174                ],
175                'pageToken' => [
176                  'location' => 'query',
177                  'type' => 'string',
178                ],
179              ],
180            ],'patch' => [
181              'path' => 'v2beta/{+name}',
182              'httpMethod' => 'PATCH',
183              'parameters' => [
184                'name' => [
185                  'location' => 'path',
186                  'type' => 'string',
187                  'required' => true,
188                ],
189                'updateMask' => [
190                  'location' => 'query',
191                  'type' => 'string',
192                ],
193              ],
194            ],'search' => [
195              'path' => 'v2beta/cases:search',
196              'httpMethod' => 'GET',
197              'parameters' => [
198                'pageSize' => [
199                  'location' => 'query',
200                  'type' => 'integer',
201                ],
202                'pageToken' => [
203                  'location' => 'query',
204                  'type' => 'string',
205                ],
206                'query' => [
207                  'location' => 'query',
208                  'type' => 'string',
209                ],
210              ],
211            ],
212          ]
213        ]
214    );
215    $this->cases_attachments = new CloudSupport\Resource\CasesAttachments(
216        $this,
217        $this->serviceName,
218        'attachments',
219        [
220          'methods' => [
221            'list' => [
222              'path' => 'v2beta/{+parent}/attachments',
223              'httpMethod' => 'GET',
224              'parameters' => [
225                'parent' => [
226                  'location' => 'path',
227                  'type' => 'string',
228                  'required' => true,
229                ],
230                'pageSize' => [
231                  'location' => 'query',
232                  'type' => 'integer',
233                ],
234                'pageToken' => [
235                  'location' => 'query',
236                  'type' => 'string',
237                ],
238              ],
239            ],
240          ]
241        ]
242    );
243    $this->cases_comments = new CloudSupport\Resource\CasesComments(
244        $this,
245        $this->serviceName,
246        'comments',
247        [
248          'methods' => [
249            'create' => [
250              'path' => 'v2beta/{+parent}/comments',
251              'httpMethod' => 'POST',
252              'parameters' => [
253                'parent' => [
254                  'location' => 'path',
255                  'type' => 'string',
256                  'required' => true,
257                ],
258              ],
259            ],'list' => [
260              'path' => 'v2beta/{+parent}/comments',
261              'httpMethod' => 'GET',
262              'parameters' => [
263                'parent' => [
264                  'location' => 'path',
265                  'type' => 'string',
266                  'required' => true,
267                ],
268                'pageSize' => [
269                  'location' => 'query',
270                  'type' => 'integer',
271                ],
272                'pageToken' => [
273                  'location' => 'query',
274                  'type' => 'string',
275                ],
276              ],
277            ],
278          ]
279        ]
280    );
281    $this->media = new CloudSupport\Resource\Media(
282        $this,
283        $this->serviceName,
284        'media',
285        [
286          'methods' => [
287            'download' => [
288              'path' => 'v2beta/{+name}:download',
289              'httpMethod' => 'GET',
290              'parameters' => [
291                'name' => [
292                  'location' => 'path',
293                  'type' => 'string',
294                  'required' => true,
295                ],
296              ],
297            ],'upload' => [
298              'path' => 'v2beta/{+parent}/attachments',
299              'httpMethod' => 'POST',
300              'parameters' => [
301                'parent' => [
302                  'location' => 'path',
303                  'type' => 'string',
304                  'required' => true,
305                ],
306              ],
307            ],
308          ]
309        ]
310    );
311  }
312}
313
314// Adding a class alias for backwards compatibility with the previous class name.
315class_alias(CloudSupport::class, 'Google_Service_CloudSupport');
316