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 Essentialcontacts (v1).
24 *
25 * <p>
26</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/essentialcontacts/docs/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Essentialcontacts extends \Google\Service
36{
37  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
38  const CLOUD_PLATFORM =
39      "https://www.googleapis.com/auth/cloud-platform";
40
41  public $folders_contacts;
42  public $organizations_contacts;
43  public $projects_contacts;
44
45  /**
46   * Constructs the internal representation of the Essentialcontacts 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://essentialcontacts.googleapis.com/';
56    $this->servicePath = '';
57    $this->batchPath = 'batch';
58    $this->version = 'v1';
59    $this->serviceName = 'essentialcontacts';
60
61    $this->folders_contacts = new Essentialcontacts\Resource\FoldersContacts(
62        $this,
63        $this->serviceName,
64        'contacts',
65        [
66          'methods' => [
67            'compute' => [
68              'path' => 'v1/{+parent}/contacts:compute',
69              'httpMethod' => 'GET',
70              'parameters' => [
71                'parent' => [
72                  'location' => 'path',
73                  'type' => 'string',
74                  'required' => true,
75                ],
76                'notificationCategories' => [
77                  'location' => 'query',
78                  'type' => 'string',
79                  'repeated' => true,
80                ],
81                'pageSize' => [
82                  'location' => 'query',
83                  'type' => 'integer',
84                ],
85                'pageToken' => [
86                  'location' => 'query',
87                  'type' => 'string',
88                ],
89              ],
90            ],'create' => [
91              'path' => 'v1/{+parent}/contacts',
92              'httpMethod' => 'POST',
93              'parameters' => [
94                'parent' => [
95                  'location' => 'path',
96                  'type' => 'string',
97                  'required' => true,
98                ],
99              ],
100            ],'delete' => [
101              'path' => 'v1/{+name}',
102              'httpMethod' => 'DELETE',
103              'parameters' => [
104                'name' => [
105                  'location' => 'path',
106                  'type' => 'string',
107                  'required' => true,
108                ],
109              ],
110            ],'get' => [
111              'path' => 'v1/{+name}',
112              'httpMethod' => 'GET',
113              'parameters' => [
114                'name' => [
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ],
119              ],
120            ],'list' => [
121              'path' => 'v1/{+parent}/contacts',
122              'httpMethod' => 'GET',
123              'parameters' => [
124                'parent' => [
125                  'location' => 'path',
126                  'type' => 'string',
127                  'required' => true,
128                ],
129                'pageSize' => [
130                  'location' => 'query',
131                  'type' => 'integer',
132                ],
133                'pageToken' => [
134                  'location' => 'query',
135                  'type' => 'string',
136                ],
137              ],
138            ],'patch' => [
139              'path' => 'v1/{+name}',
140              'httpMethod' => 'PATCH',
141              'parameters' => [
142                'name' => [
143                  'location' => 'path',
144                  'type' => 'string',
145                  'required' => true,
146                ],
147                'updateMask' => [
148                  'location' => 'query',
149                  'type' => 'string',
150                ],
151              ],
152            ],'sendTestMessage' => [
153              'path' => 'v1/{+resource}/contacts:sendTestMessage',
154              'httpMethod' => 'POST',
155              'parameters' => [
156                'resource' => [
157                  'location' => 'path',
158                  'type' => 'string',
159                  'required' => true,
160                ],
161              ],
162            ],
163          ]
164        ]
165    );
166    $this->organizations_contacts = new Essentialcontacts\Resource\OrganizationsContacts(
167        $this,
168        $this->serviceName,
169        'contacts',
170        [
171          'methods' => [
172            'compute' => [
173              'path' => 'v1/{+parent}/contacts:compute',
174              'httpMethod' => 'GET',
175              'parameters' => [
176                'parent' => [
177                  'location' => 'path',
178                  'type' => 'string',
179                  'required' => true,
180                ],
181                'notificationCategories' => [
182                  'location' => 'query',
183                  'type' => 'string',
184                  'repeated' => true,
185                ],
186                'pageSize' => [
187                  'location' => 'query',
188                  'type' => 'integer',
189                ],
190                'pageToken' => [
191                  'location' => 'query',
192                  'type' => 'string',
193                ],
194              ],
195            ],'create' => [
196              'path' => 'v1/{+parent}/contacts',
197              'httpMethod' => 'POST',
198              'parameters' => [
199                'parent' => [
200                  'location' => 'path',
201                  'type' => 'string',
202                  'required' => true,
203                ],
204              ],
205            ],'delete' => [
206              'path' => 'v1/{+name}',
207              'httpMethod' => 'DELETE',
208              'parameters' => [
209                'name' => [
210                  'location' => 'path',
211                  'type' => 'string',
212                  'required' => true,
213                ],
214              ],
215            ],'get' => [
216              'path' => 'v1/{+name}',
217              'httpMethod' => 'GET',
218              'parameters' => [
219                'name' => [
220                  'location' => 'path',
221                  'type' => 'string',
222                  'required' => true,
223                ],
224              ],
225            ],'list' => [
226              'path' => 'v1/{+parent}/contacts',
227              'httpMethod' => 'GET',
228              'parameters' => [
229                'parent' => [
230                  'location' => 'path',
231                  'type' => 'string',
232                  'required' => true,
233                ],
234                'pageSize' => [
235                  'location' => 'query',
236                  'type' => 'integer',
237                ],
238                'pageToken' => [
239                  'location' => 'query',
240                  'type' => 'string',
241                ],
242              ],
243            ],'patch' => [
244              'path' => 'v1/{+name}',
245              'httpMethod' => 'PATCH',
246              'parameters' => [
247                'name' => [
248                  'location' => 'path',
249                  'type' => 'string',
250                  'required' => true,
251                ],
252                'updateMask' => [
253                  'location' => 'query',
254                  'type' => 'string',
255                ],
256              ],
257            ],'sendTestMessage' => [
258              'path' => 'v1/{+resource}/contacts:sendTestMessage',
259              'httpMethod' => 'POST',
260              'parameters' => [
261                'resource' => [
262                  'location' => 'path',
263                  'type' => 'string',
264                  'required' => true,
265                ],
266              ],
267            ],
268          ]
269        ]
270    );
271    $this->projects_contacts = new Essentialcontacts\Resource\ProjectsContacts(
272        $this,
273        $this->serviceName,
274        'contacts',
275        [
276          'methods' => [
277            'compute' => [
278              'path' => 'v1/{+parent}/contacts:compute',
279              'httpMethod' => 'GET',
280              'parameters' => [
281                'parent' => [
282                  'location' => 'path',
283                  'type' => 'string',
284                  'required' => true,
285                ],
286                'notificationCategories' => [
287                  'location' => 'query',
288                  'type' => 'string',
289                  'repeated' => true,
290                ],
291                'pageSize' => [
292                  'location' => 'query',
293                  'type' => 'integer',
294                ],
295                'pageToken' => [
296                  'location' => 'query',
297                  'type' => 'string',
298                ],
299              ],
300            ],'create' => [
301              'path' => 'v1/{+parent}/contacts',
302              'httpMethod' => 'POST',
303              'parameters' => [
304                'parent' => [
305                  'location' => 'path',
306                  'type' => 'string',
307                  'required' => true,
308                ],
309              ],
310            ],'delete' => [
311              'path' => 'v1/{+name}',
312              'httpMethod' => 'DELETE',
313              'parameters' => [
314                'name' => [
315                  'location' => 'path',
316                  'type' => 'string',
317                  'required' => true,
318                ],
319              ],
320            ],'get' => [
321              'path' => 'v1/{+name}',
322              'httpMethod' => 'GET',
323              'parameters' => [
324                'name' => [
325                  'location' => 'path',
326                  'type' => 'string',
327                  'required' => true,
328                ],
329              ],
330            ],'list' => [
331              'path' => 'v1/{+parent}/contacts',
332              'httpMethod' => 'GET',
333              'parameters' => [
334                'parent' => [
335                  'location' => 'path',
336                  'type' => 'string',
337                  'required' => true,
338                ],
339                'pageSize' => [
340                  'location' => 'query',
341                  'type' => 'integer',
342                ],
343                'pageToken' => [
344                  'location' => 'query',
345                  'type' => 'string',
346                ],
347              ],
348            ],'patch' => [
349              'path' => 'v1/{+name}',
350              'httpMethod' => 'PATCH',
351              'parameters' => [
352                'name' => [
353                  'location' => 'path',
354                  'type' => 'string',
355                  'required' => true,
356                ],
357                'updateMask' => [
358                  'location' => 'query',
359                  'type' => 'string',
360                ],
361              ],
362            ],'sendTestMessage' => [
363              'path' => 'v1/{+resource}/contacts:sendTestMessage',
364              'httpMethod' => 'POST',
365              'parameters' => [
366                'resource' => [
367                  'location' => 'path',
368                  'type' => 'string',
369                  'required' => true,
370                ],
371              ],
372            ],
373          ]
374        ]
375    );
376  }
377}
378
379// Adding a class alias for backwards compatibility with the previous class name.
380class_alias(Essentialcontacts::class, 'Google_Service_Essentialcontacts');
381