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 Contactcenterinsights (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/contact-center/insights/docs" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Contactcenterinsights 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 $projects_locations;
42  public $projects_locations_conversations;
43  public $projects_locations_conversations_analyses;
44  public $projects_locations_insightsdata;
45  public $projects_locations_issueModels;
46  public $projects_locations_issueModels_issues;
47  public $projects_locations_operations;
48  public $projects_locations_phraseMatchers;
49  public $projects_locations_views;
50
51  /**
52   * Constructs the internal representation of the Contactcenterinsights
53   * service.
54   *
55   * @param Client|array $clientOrConfig The client used to deliver requests, or a
56   *                                     config array to pass to a new Client instance.
57   * @param string $rootUrl The root URL used for requests to the service.
58   */
59  public function __construct($clientOrConfig = [], $rootUrl = null)
60  {
61    parent::__construct($clientOrConfig);
62    $this->rootUrl = $rootUrl ?: 'https://contactcenterinsights.googleapis.com/';
63    $this->servicePath = '';
64    $this->batchPath = 'batch';
65    $this->version = 'v1';
66    $this->serviceName = 'contactcenterinsights';
67
68    $this->projects_locations = new Contactcenterinsights\Resource\ProjectsLocations(
69        $this,
70        $this->serviceName,
71        'locations',
72        [
73          'methods' => [
74            'getSettings' => [
75              'path' => 'v1/{+name}',
76              'httpMethod' => 'GET',
77              'parameters' => [
78                'name' => [
79                  'location' => 'path',
80                  'type' => 'string',
81                  'required' => true,
82                ],
83              ],
84            ],'updateSettings' => [
85              'path' => 'v1/{+name}',
86              'httpMethod' => 'PATCH',
87              'parameters' => [
88                'name' => [
89                  'location' => 'path',
90                  'type' => 'string',
91                  'required' => true,
92                ],
93                'updateMask' => [
94                  'location' => 'query',
95                  'type' => 'string',
96                ],
97              ],
98            ],
99          ]
100        ]
101    );
102    $this->projects_locations_conversations = new Contactcenterinsights\Resource\ProjectsLocationsConversations(
103        $this,
104        $this->serviceName,
105        'conversations',
106        [
107          'methods' => [
108            'calculateStats' => [
109              'path' => 'v1/{+location}/conversations:calculateStats',
110              'httpMethod' => 'GET',
111              'parameters' => [
112                'location' => [
113                  'location' => 'path',
114                  'type' => 'string',
115                  'required' => true,
116                ],
117                'filter' => [
118                  'location' => 'query',
119                  'type' => 'string',
120                ],
121              ],
122            ],'create' => [
123              'path' => 'v1/{+parent}/conversations',
124              'httpMethod' => 'POST',
125              'parameters' => [
126                'parent' => [
127                  'location' => 'path',
128                  'type' => 'string',
129                  'required' => true,
130                ],
131                'conversationId' => [
132                  'location' => 'query',
133                  'type' => 'string',
134                ],
135              ],
136            ],'delete' => [
137              'path' => 'v1/{+name}',
138              'httpMethod' => 'DELETE',
139              'parameters' => [
140                'name' => [
141                  'location' => 'path',
142                  'type' => 'string',
143                  'required' => true,
144                ],
145                'force' => [
146                  'location' => 'query',
147                  'type' => 'boolean',
148                ],
149              ],
150            ],'get' => [
151              'path' => 'v1/{+name}',
152              'httpMethod' => 'GET',
153              'parameters' => [
154                'name' => [
155                  'location' => 'path',
156                  'type' => 'string',
157                  'required' => true,
158                ],
159                'view' => [
160                  'location' => 'query',
161                  'type' => 'string',
162                ],
163              ],
164            ],'list' => [
165              'path' => 'v1/{+parent}/conversations',
166              'httpMethod' => 'GET',
167              'parameters' => [
168                'parent' => [
169                  'location' => 'path',
170                  'type' => 'string',
171                  'required' => true,
172                ],
173                'filter' => [
174                  'location' => 'query',
175                  'type' => 'string',
176                ],
177                'pageSize' => [
178                  'location' => 'query',
179                  'type' => 'integer',
180                ],
181                'pageToken' => [
182                  'location' => 'query',
183                  'type' => 'string',
184                ],
185                'view' => [
186                  'location' => 'query',
187                  'type' => 'string',
188                ],
189              ],
190            ],'patch' => [
191              'path' => 'v1/{+name}',
192              'httpMethod' => 'PATCH',
193              'parameters' => [
194                'name' => [
195                  'location' => 'path',
196                  'type' => 'string',
197                  'required' => true,
198                ],
199                'updateMask' => [
200                  'location' => 'query',
201                  'type' => 'string',
202                ],
203              ],
204            ],
205          ]
206        ]
207    );
208    $this->projects_locations_conversations_analyses = new Contactcenterinsights\Resource\ProjectsLocationsConversationsAnalyses(
209        $this,
210        $this->serviceName,
211        'analyses',
212        [
213          'methods' => [
214            'create' => [
215              'path' => 'v1/{+parent}/analyses',
216              'httpMethod' => 'POST',
217              'parameters' => [
218                'parent' => [
219                  'location' => 'path',
220                  'type' => 'string',
221                  'required' => true,
222                ],
223              ],
224            ],'delete' => [
225              'path' => 'v1/{+name}',
226              'httpMethod' => 'DELETE',
227              'parameters' => [
228                'name' => [
229                  'location' => 'path',
230                  'type' => 'string',
231                  'required' => true,
232                ],
233              ],
234            ],'get' => [
235              'path' => 'v1/{+name}',
236              'httpMethod' => 'GET',
237              'parameters' => [
238                'name' => [
239                  'location' => 'path',
240                  'type' => 'string',
241                  'required' => true,
242                ],
243              ],
244            ],'list' => [
245              'path' => 'v1/{+parent}/analyses',
246              'httpMethod' => 'GET',
247              'parameters' => [
248                'parent' => [
249                  'location' => 'path',
250                  'type' => 'string',
251                  'required' => true,
252                ],
253                'filter' => [
254                  'location' => 'query',
255                  'type' => 'string',
256                ],
257                'pageSize' => [
258                  'location' => 'query',
259                  'type' => 'integer',
260                ],
261                'pageToken' => [
262                  'location' => 'query',
263                  'type' => 'string',
264                ],
265              ],
266            ],
267          ]
268        ]
269    );
270    $this->projects_locations_insightsdata = new Contactcenterinsights\Resource\ProjectsLocationsInsightsdata(
271        $this,
272        $this->serviceName,
273        'insightsdata',
274        [
275          'methods' => [
276            'export' => [
277              'path' => 'v1/{+parent}/insightsdata:export',
278              'httpMethod' => 'POST',
279              'parameters' => [
280                'parent' => [
281                  'location' => 'path',
282                  'type' => 'string',
283                  'required' => true,
284                ],
285              ],
286            ],
287          ]
288        ]
289    );
290    $this->projects_locations_issueModels = new Contactcenterinsights\Resource\ProjectsLocationsIssueModels(
291        $this,
292        $this->serviceName,
293        'issueModels',
294        [
295          'methods' => [
296            'calculateIssueModelStats' => [
297              'path' => 'v1/{+issueModel}:calculateIssueModelStats',
298              'httpMethod' => 'GET',
299              'parameters' => [
300                'issueModel' => [
301                  'location' => 'path',
302                  'type' => 'string',
303                  'required' => true,
304                ],
305              ],
306            ],'create' => [
307              'path' => 'v1/{+parent}/issueModels',
308              'httpMethod' => 'POST',
309              'parameters' => [
310                'parent' => [
311                  'location' => 'path',
312                  'type' => 'string',
313                  'required' => true,
314                ],
315              ],
316            ],'delete' => [
317              'path' => 'v1/{+name}',
318              'httpMethod' => 'DELETE',
319              'parameters' => [
320                'name' => [
321                  'location' => 'path',
322                  'type' => 'string',
323                  'required' => true,
324                ],
325              ],
326            ],'deploy' => [
327              'path' => 'v1/{+name}:deploy',
328              'httpMethod' => 'POST',
329              'parameters' => [
330                'name' => [
331                  'location' => 'path',
332                  'type' => 'string',
333                  'required' => true,
334                ],
335              ],
336            ],'get' => [
337              'path' => 'v1/{+name}',
338              'httpMethod' => 'GET',
339              'parameters' => [
340                'name' => [
341                  'location' => 'path',
342                  'type' => 'string',
343                  'required' => true,
344                ],
345              ],
346            ],'list' => [
347              'path' => 'v1/{+parent}/issueModels',
348              'httpMethod' => 'GET',
349              'parameters' => [
350                'parent' => [
351                  'location' => 'path',
352                  'type' => 'string',
353                  'required' => true,
354                ],
355              ],
356            ],'patch' => [
357              'path' => 'v1/{+name}',
358              'httpMethod' => 'PATCH',
359              'parameters' => [
360                'name' => [
361                  'location' => 'path',
362                  'type' => 'string',
363                  'required' => true,
364                ],
365                'updateMask' => [
366                  'location' => 'query',
367                  'type' => 'string',
368                ],
369              ],
370            ],'undeploy' => [
371              'path' => 'v1/{+name}:undeploy',
372              'httpMethod' => 'POST',
373              'parameters' => [
374                'name' => [
375                  'location' => 'path',
376                  'type' => 'string',
377                  'required' => true,
378                ],
379              ],
380            ],
381          ]
382        ]
383    );
384    $this->projects_locations_issueModels_issues = new Contactcenterinsights\Resource\ProjectsLocationsIssueModelsIssues(
385        $this,
386        $this->serviceName,
387        'issues',
388        [
389          'methods' => [
390            'get' => [
391              'path' => 'v1/{+name}',
392              'httpMethod' => 'GET',
393              'parameters' => [
394                'name' => [
395                  'location' => 'path',
396                  'type' => 'string',
397                  'required' => true,
398                ],
399              ],
400            ],'list' => [
401              'path' => 'v1/{+parent}/issues',
402              'httpMethod' => 'GET',
403              'parameters' => [
404                'parent' => [
405                  'location' => 'path',
406                  'type' => 'string',
407                  'required' => true,
408                ],
409              ],
410            ],'patch' => [
411              'path' => 'v1/{+name}',
412              'httpMethod' => 'PATCH',
413              'parameters' => [
414                'name' => [
415                  'location' => 'path',
416                  'type' => 'string',
417                  'required' => true,
418                ],
419                'updateMask' => [
420                  'location' => 'query',
421                  'type' => 'string',
422                ],
423              ],
424            ],
425          ]
426        ]
427    );
428    $this->projects_locations_operations = new Contactcenterinsights\Resource\ProjectsLocationsOperations(
429        $this,
430        $this->serviceName,
431        'operations',
432        [
433          'methods' => [
434            'cancel' => [
435              'path' => 'v1/{+name}:cancel',
436              'httpMethod' => 'POST',
437              'parameters' => [
438                'name' => [
439                  'location' => 'path',
440                  'type' => 'string',
441                  'required' => true,
442                ],
443              ],
444            ],'get' => [
445              'path' => 'v1/{+name}',
446              'httpMethod' => 'GET',
447              'parameters' => [
448                'name' => [
449                  'location' => 'path',
450                  'type' => 'string',
451                  'required' => true,
452                ],
453              ],
454            ],'list' => [
455              'path' => 'v1/{+name}/operations',
456              'httpMethod' => 'GET',
457              'parameters' => [
458                'name' => [
459                  'location' => 'path',
460                  'type' => 'string',
461                  'required' => true,
462                ],
463                'filter' => [
464                  'location' => 'query',
465                  'type' => 'string',
466                ],
467                'pageSize' => [
468                  'location' => 'query',
469                  'type' => 'integer',
470                ],
471                'pageToken' => [
472                  'location' => 'query',
473                  'type' => 'string',
474                ],
475              ],
476            ],
477          ]
478        ]
479    );
480    $this->projects_locations_phraseMatchers = new Contactcenterinsights\Resource\ProjectsLocationsPhraseMatchers(
481        $this,
482        $this->serviceName,
483        'phraseMatchers',
484        [
485          'methods' => [
486            'create' => [
487              'path' => 'v1/{+parent}/phraseMatchers',
488              'httpMethod' => 'POST',
489              'parameters' => [
490                'parent' => [
491                  'location' => 'path',
492                  'type' => 'string',
493                  'required' => true,
494                ],
495              ],
496            ],'delete' => [
497              'path' => 'v1/{+name}',
498              'httpMethod' => 'DELETE',
499              'parameters' => [
500                'name' => [
501                  'location' => 'path',
502                  'type' => 'string',
503                  'required' => true,
504                ],
505              ],
506            ],'get' => [
507              'path' => 'v1/{+name}',
508              'httpMethod' => 'GET',
509              'parameters' => [
510                'name' => [
511                  'location' => 'path',
512                  'type' => 'string',
513                  'required' => true,
514                ],
515              ],
516            ],'list' => [
517              'path' => 'v1/{+parent}/phraseMatchers',
518              'httpMethod' => 'GET',
519              'parameters' => [
520                'parent' => [
521                  'location' => 'path',
522                  'type' => 'string',
523                  'required' => true,
524                ],
525                'filter' => [
526                  'location' => 'query',
527                  'type' => 'string',
528                ],
529                'pageSize' => [
530                  'location' => 'query',
531                  'type' => 'integer',
532                ],
533                'pageToken' => [
534                  'location' => 'query',
535                  'type' => 'string',
536                ],
537              ],
538            ],'patch' => [
539              'path' => 'v1/{+name}',
540              'httpMethod' => 'PATCH',
541              'parameters' => [
542                'name' => [
543                  'location' => 'path',
544                  'type' => 'string',
545                  'required' => true,
546                ],
547                'updateMask' => [
548                  'location' => 'query',
549                  'type' => 'string',
550                ],
551              ],
552            ],
553          ]
554        ]
555    );
556    $this->projects_locations_views = new Contactcenterinsights\Resource\ProjectsLocationsViews(
557        $this,
558        $this->serviceName,
559        'views',
560        [
561          'methods' => [
562            'create' => [
563              'path' => 'v1/{+parent}/views',
564              'httpMethod' => 'POST',
565              'parameters' => [
566                'parent' => [
567                  'location' => 'path',
568                  'type' => 'string',
569                  'required' => true,
570                ],
571              ],
572            ],'delete' => [
573              'path' => 'v1/{+name}',
574              'httpMethod' => 'DELETE',
575              'parameters' => [
576                'name' => [
577                  'location' => 'path',
578                  'type' => 'string',
579                  'required' => true,
580                ],
581              ],
582            ],'get' => [
583              'path' => 'v1/{+name}',
584              'httpMethod' => 'GET',
585              'parameters' => [
586                'name' => [
587                  'location' => 'path',
588                  'type' => 'string',
589                  'required' => true,
590                ],
591              ],
592            ],'list' => [
593              'path' => 'v1/{+parent}/views',
594              'httpMethod' => 'GET',
595              'parameters' => [
596                'parent' => [
597                  'location' => 'path',
598                  'type' => 'string',
599                  'required' => true,
600                ],
601                'pageSize' => [
602                  'location' => 'query',
603                  'type' => 'integer',
604                ],
605                'pageToken' => [
606                  'location' => 'query',
607                  'type' => 'string',
608                ],
609              ],
610            ],'patch' => [
611              'path' => 'v1/{+name}',
612              'httpMethod' => 'PATCH',
613              'parameters' => [
614                'name' => [
615                  'location' => 'path',
616                  'type' => 'string',
617                  'required' => true,
618                ],
619                'updateMask' => [
620                  'location' => 'query',
621                  'type' => 'string',
622                ],
623              ],
624            ],
625          ]
626        ]
627    );
628  }
629}
630
631// Adding a class alias for backwards compatibility with the previous class name.
632class_alias(Contactcenterinsights::class, 'Google_Service_Contactcenterinsights');
633