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/**
19 * Service definition for Dialogflow (v2).
20 *
21 * <p>
22 * Builds conversational interfaces (for example, chatbots, and voice-powered
23 * apps and devices).</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://cloud.google.com/dialogflow-enterprise/" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_Dialogflow extends Google_Service
33{
34  /** View and manage your data across Google Cloud Platform services. */
35  const CLOUD_PLATFORM =
36      "https://www.googleapis.com/auth/cloud-platform";
37  /** View, manage and query your Dialogflow agents. */
38  const DIALOGFLOW =
39      "https://www.googleapis.com/auth/dialogflow";
40
41  public $projects;
42  public $projects_agent;
43  public $projects_agent_entityTypes;
44  public $projects_agent_entityTypes_entities;
45  public $projects_agent_intents;
46  public $projects_agent_sessions;
47  public $projects_agent_sessions_contexts;
48  public $projects_agent_sessions_entityTypes;
49  public $projects_operations;
50
51  /**
52   * Constructs the internal representation of the Dialogflow service.
53   *
54   * @param Google_Client $client
55   */
56  public function __construct(Google_Client $client)
57  {
58    parent::__construct($client);
59    $this->rootUrl = 'https://dialogflow.googleapis.com/';
60    $this->servicePath = '';
61    $this->batchPath = 'batch';
62    $this->version = 'v2';
63    $this->serviceName = 'dialogflow';
64
65    $this->projects = new Google_Service_Dialogflow_Resource_Projects(
66        $this,
67        $this->serviceName,
68        'projects',
69        array(
70          'methods' => array(
71            'getAgent' => array(
72              'path' => 'v2/{+parent}/agent',
73              'httpMethod' => 'GET',
74              'parameters' => array(
75                'parent' => array(
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ),
80              ),
81            ),
82          )
83        )
84    );
85    $this->projects_agent = new Google_Service_Dialogflow_Resource_ProjectsAgent(
86        $this,
87        $this->serviceName,
88        'agent',
89        array(
90          'methods' => array(
91            'export' => array(
92              'path' => 'v2/{+parent}/agent:export',
93              'httpMethod' => 'POST',
94              'parameters' => array(
95                'parent' => array(
96                  'location' => 'path',
97                  'type' => 'string',
98                  'required' => true,
99                ),
100              ),
101            ),'import' => array(
102              'path' => 'v2/{+parent}/agent:import',
103              'httpMethod' => 'POST',
104              'parameters' => array(
105                'parent' => array(
106                  'location' => 'path',
107                  'type' => 'string',
108                  'required' => true,
109                ),
110              ),
111            ),'restore' => array(
112              'path' => 'v2/{+parent}/agent:restore',
113              'httpMethod' => 'POST',
114              'parameters' => array(
115                'parent' => array(
116                  'location' => 'path',
117                  'type' => 'string',
118                  'required' => true,
119                ),
120              ),
121            ),'search' => array(
122              'path' => 'v2/{+parent}/agent:search',
123              'httpMethod' => 'GET',
124              'parameters' => array(
125                'parent' => array(
126                  'location' => 'path',
127                  'type' => 'string',
128                  'required' => true,
129                ),
130                'pageToken' => array(
131                  'location' => 'query',
132                  'type' => 'string',
133                ),
134                'pageSize' => array(
135                  'location' => 'query',
136                  'type' => 'integer',
137                ),
138              ),
139            ),'train' => array(
140              'path' => 'v2/{+parent}/agent:train',
141              'httpMethod' => 'POST',
142              'parameters' => array(
143                'parent' => array(
144                  'location' => 'path',
145                  'type' => 'string',
146                  'required' => true,
147                ),
148              ),
149            ),
150          )
151        )
152    );
153    $this->projects_agent_entityTypes = new Google_Service_Dialogflow_Resource_ProjectsAgentEntityTypes(
154        $this,
155        $this->serviceName,
156        'entityTypes',
157        array(
158          'methods' => array(
159            'batchDelete' => array(
160              'path' => 'v2/{+parent}/entityTypes:batchDelete',
161              'httpMethod' => 'POST',
162              'parameters' => array(
163                'parent' => array(
164                  'location' => 'path',
165                  'type' => 'string',
166                  'required' => true,
167                ),
168              ),
169            ),'batchUpdate' => array(
170              'path' => 'v2/{+parent}/entityTypes:batchUpdate',
171              'httpMethod' => 'POST',
172              'parameters' => array(
173                'parent' => array(
174                  'location' => 'path',
175                  'type' => 'string',
176                  'required' => true,
177                ),
178              ),
179            ),'create' => array(
180              'path' => 'v2/{+parent}/entityTypes',
181              'httpMethod' => 'POST',
182              'parameters' => array(
183                'parent' => array(
184                  'location' => 'path',
185                  'type' => 'string',
186                  'required' => true,
187                ),
188                'languageCode' => array(
189                  'location' => 'query',
190                  'type' => 'string',
191                ),
192              ),
193            ),'delete' => array(
194              'path' => 'v2/{+name}',
195              'httpMethod' => 'DELETE',
196              'parameters' => array(
197                'name' => array(
198                  'location' => 'path',
199                  'type' => 'string',
200                  'required' => true,
201                ),
202              ),
203            ),'get' => array(
204              'path' => 'v2/{+name}',
205              'httpMethod' => 'GET',
206              'parameters' => array(
207                'name' => array(
208                  'location' => 'path',
209                  'type' => 'string',
210                  'required' => true,
211                ),
212                'languageCode' => array(
213                  'location' => 'query',
214                  'type' => 'string',
215                ),
216              ),
217            ),'list' => array(
218              'path' => 'v2/{+parent}/entityTypes',
219              'httpMethod' => 'GET',
220              'parameters' => array(
221                'parent' => array(
222                  'location' => 'path',
223                  'type' => 'string',
224                  'required' => true,
225                ),
226                'pageToken' => array(
227                  'location' => 'query',
228                  'type' => 'string',
229                ),
230                'pageSize' => array(
231                  'location' => 'query',
232                  'type' => 'integer',
233                ),
234                'languageCode' => array(
235                  'location' => 'query',
236                  'type' => 'string',
237                ),
238              ),
239            ),'patch' => array(
240              'path' => 'v2/{+name}',
241              'httpMethod' => 'PATCH',
242              'parameters' => array(
243                'name' => array(
244                  'location' => 'path',
245                  'type' => 'string',
246                  'required' => true,
247                ),
248                'languageCode' => array(
249                  'location' => 'query',
250                  'type' => 'string',
251                ),
252                'updateMask' => array(
253                  'location' => 'query',
254                  'type' => 'string',
255                ),
256              ),
257            ),
258          )
259        )
260    );
261    $this->projects_agent_entityTypes_entities = new Google_Service_Dialogflow_Resource_ProjectsAgentEntityTypesEntities(
262        $this,
263        $this->serviceName,
264        'entities',
265        array(
266          'methods' => array(
267            'batchCreate' => array(
268              'path' => 'v2/{+parent}/entities:batchCreate',
269              'httpMethod' => 'POST',
270              'parameters' => array(
271                'parent' => array(
272                  'location' => 'path',
273                  'type' => 'string',
274                  'required' => true,
275                ),
276              ),
277            ),'batchDelete' => array(
278              'path' => 'v2/{+parent}/entities:batchDelete',
279              'httpMethod' => 'POST',
280              'parameters' => array(
281                'parent' => array(
282                  'location' => 'path',
283                  'type' => 'string',
284                  'required' => true,
285                ),
286              ),
287            ),'batchUpdate' => array(
288              'path' => 'v2/{+parent}/entities:batchUpdate',
289              'httpMethod' => 'POST',
290              'parameters' => array(
291                'parent' => array(
292                  'location' => 'path',
293                  'type' => 'string',
294                  'required' => true,
295                ),
296              ),
297            ),
298          )
299        )
300    );
301    $this->projects_agent_intents = new Google_Service_Dialogflow_Resource_ProjectsAgentIntents(
302        $this,
303        $this->serviceName,
304        'intents',
305        array(
306          'methods' => array(
307            'batchDelete' => array(
308              'path' => 'v2/{+parent}/intents:batchDelete',
309              'httpMethod' => 'POST',
310              'parameters' => array(
311                'parent' => array(
312                  'location' => 'path',
313                  'type' => 'string',
314                  'required' => true,
315                ),
316              ),
317            ),'batchUpdate' => array(
318              'path' => 'v2/{+parent}/intents:batchUpdate',
319              'httpMethod' => 'POST',
320              'parameters' => array(
321                'parent' => array(
322                  'location' => 'path',
323                  'type' => 'string',
324                  'required' => true,
325                ),
326              ),
327            ),'create' => array(
328              'path' => 'v2/{+parent}/intents',
329              'httpMethod' => 'POST',
330              'parameters' => array(
331                'parent' => array(
332                  'location' => 'path',
333                  'type' => 'string',
334                  'required' => true,
335                ),
336                'intentView' => array(
337                  'location' => 'query',
338                  'type' => 'string',
339                ),
340                'languageCode' => array(
341                  'location' => 'query',
342                  'type' => 'string',
343                ),
344              ),
345            ),'delete' => array(
346              'path' => 'v2/{+name}',
347              'httpMethod' => 'DELETE',
348              'parameters' => array(
349                'name' => array(
350                  'location' => 'path',
351                  'type' => 'string',
352                  'required' => true,
353                ),
354              ),
355            ),'get' => array(
356              'path' => 'v2/{+name}',
357              'httpMethod' => 'GET',
358              'parameters' => array(
359                'name' => array(
360                  'location' => 'path',
361                  'type' => 'string',
362                  'required' => true,
363                ),
364                'intentView' => array(
365                  'location' => 'query',
366                  'type' => 'string',
367                ),
368                'languageCode' => array(
369                  'location' => 'query',
370                  'type' => 'string',
371                ),
372              ),
373            ),'list' => array(
374              'path' => 'v2/{+parent}/intents',
375              'httpMethod' => 'GET',
376              'parameters' => array(
377                'parent' => array(
378                  'location' => 'path',
379                  'type' => 'string',
380                  'required' => true,
381                ),
382                'pageToken' => array(
383                  'location' => 'query',
384                  'type' => 'string',
385                ),
386                'pageSize' => array(
387                  'location' => 'query',
388                  'type' => 'integer',
389                ),
390                'intentView' => array(
391                  'location' => 'query',
392                  'type' => 'string',
393                ),
394                'languageCode' => array(
395                  'location' => 'query',
396                  'type' => 'string',
397                ),
398              ),
399            ),'patch' => array(
400              'path' => 'v2/{+name}',
401              'httpMethod' => 'PATCH',
402              'parameters' => array(
403                'name' => array(
404                  'location' => 'path',
405                  'type' => 'string',
406                  'required' => true,
407                ),
408                'intentView' => array(
409                  'location' => 'query',
410                  'type' => 'string',
411                ),
412                'languageCode' => array(
413                  'location' => 'query',
414                  'type' => 'string',
415                ),
416                'updateMask' => array(
417                  'location' => 'query',
418                  'type' => 'string',
419                ),
420              ),
421            ),
422          )
423        )
424    );
425    $this->projects_agent_sessions = new Google_Service_Dialogflow_Resource_ProjectsAgentSessions(
426        $this,
427        $this->serviceName,
428        'sessions',
429        array(
430          'methods' => array(
431            'deleteContexts' => array(
432              'path' => 'v2/{+parent}/contexts',
433              'httpMethod' => 'DELETE',
434              'parameters' => array(
435                'parent' => array(
436                  'location' => 'path',
437                  'type' => 'string',
438                  'required' => true,
439                ),
440              ),
441            ),'detectIntent' => array(
442              'path' => 'v2/{+session}:detectIntent',
443              'httpMethod' => 'POST',
444              'parameters' => array(
445                'session' => array(
446                  'location' => 'path',
447                  'type' => 'string',
448                  'required' => true,
449                ),
450              ),
451            ),
452          )
453        )
454    );
455    $this->projects_agent_sessions_contexts = new Google_Service_Dialogflow_Resource_ProjectsAgentSessionsContexts(
456        $this,
457        $this->serviceName,
458        'contexts',
459        array(
460          'methods' => array(
461            'create' => array(
462              'path' => 'v2/{+parent}/contexts',
463              'httpMethod' => 'POST',
464              'parameters' => array(
465                'parent' => array(
466                  'location' => 'path',
467                  'type' => 'string',
468                  'required' => true,
469                ),
470              ),
471            ),'delete' => array(
472              'path' => 'v2/{+name}',
473              'httpMethod' => 'DELETE',
474              'parameters' => array(
475                'name' => array(
476                  'location' => 'path',
477                  'type' => 'string',
478                  'required' => true,
479                ),
480              ),
481            ),'get' => array(
482              'path' => 'v2/{+name}',
483              'httpMethod' => 'GET',
484              'parameters' => array(
485                'name' => array(
486                  'location' => 'path',
487                  'type' => 'string',
488                  'required' => true,
489                ),
490              ),
491            ),'list' => array(
492              'path' => 'v2/{+parent}/contexts',
493              'httpMethod' => 'GET',
494              'parameters' => array(
495                'parent' => array(
496                  'location' => 'path',
497                  'type' => 'string',
498                  'required' => true,
499                ),
500                'pageToken' => array(
501                  'location' => 'query',
502                  'type' => 'string',
503                ),
504                'pageSize' => array(
505                  'location' => 'query',
506                  'type' => 'integer',
507                ),
508              ),
509            ),'patch' => array(
510              'path' => 'v2/{+name}',
511              'httpMethod' => 'PATCH',
512              'parameters' => array(
513                'name' => array(
514                  'location' => 'path',
515                  'type' => 'string',
516                  'required' => true,
517                ),
518                'updateMask' => array(
519                  'location' => 'query',
520                  'type' => 'string',
521                ),
522              ),
523            ),
524          )
525        )
526    );
527    $this->projects_agent_sessions_entityTypes = new Google_Service_Dialogflow_Resource_ProjectsAgentSessionsEntityTypes(
528        $this,
529        $this->serviceName,
530        'entityTypes',
531        array(
532          'methods' => array(
533            'create' => array(
534              'path' => 'v2/{+parent}/entityTypes',
535              'httpMethod' => 'POST',
536              'parameters' => array(
537                'parent' => array(
538                  'location' => 'path',
539                  'type' => 'string',
540                  'required' => true,
541                ),
542              ),
543            ),'delete' => array(
544              'path' => 'v2/{+name}',
545              'httpMethod' => 'DELETE',
546              'parameters' => array(
547                'name' => array(
548                  'location' => 'path',
549                  'type' => 'string',
550                  'required' => true,
551                ),
552              ),
553            ),'get' => array(
554              'path' => 'v2/{+name}',
555              'httpMethod' => 'GET',
556              'parameters' => array(
557                'name' => array(
558                  'location' => 'path',
559                  'type' => 'string',
560                  'required' => true,
561                ),
562              ),
563            ),'list' => array(
564              'path' => 'v2/{+parent}/entityTypes',
565              'httpMethod' => 'GET',
566              'parameters' => array(
567                'parent' => array(
568                  'location' => 'path',
569                  'type' => 'string',
570                  'required' => true,
571                ),
572                'pageToken' => array(
573                  'location' => 'query',
574                  'type' => 'string',
575                ),
576                'pageSize' => array(
577                  'location' => 'query',
578                  'type' => 'integer',
579                ),
580              ),
581            ),'patch' => array(
582              'path' => 'v2/{+name}',
583              'httpMethod' => 'PATCH',
584              'parameters' => array(
585                'name' => array(
586                  'location' => 'path',
587                  'type' => 'string',
588                  'required' => true,
589                ),
590                'updateMask' => array(
591                  'location' => 'query',
592                  'type' => 'string',
593                ),
594              ),
595            ),
596          )
597        )
598    );
599    $this->projects_operations = new Google_Service_Dialogflow_Resource_ProjectsOperations(
600        $this,
601        $this->serviceName,
602        'operations',
603        array(
604          'methods' => array(
605            'get' => array(
606              'path' => 'v2/{+name}',
607              'httpMethod' => 'GET',
608              'parameters' => array(
609                'name' => array(
610                  'location' => 'path',
611                  'type' => 'string',
612                  'required' => true,
613                ),
614              ),
615            ),
616          )
617        )
618    );
619  }
620}
621