2019-03-10 23:30:23 +01:00

621 lines
20 KiB
PHP

<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* Service definition for Dialogflow (v2).
*
* <p>
* Builds conversational interfaces (for example, chatbots, and voice-powered
* apps and devices).</p>
*
* <p>
* For more information about this service, see the API
* <a href="https://cloud.google.com/dialogflow-enterprise/" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class Google_Service_Dialogflow extends Google_Service
{
/** View and manage your data across Google Cloud Platform services. */
const CLOUD_PLATFORM =
"https://www.googleapis.com/auth/cloud-platform";
/** View, manage and query your Dialogflow agents. */
const DIALOGFLOW =
"https://www.googleapis.com/auth/dialogflow";
public $projects;
public $projects_agent;
public $projects_agent_entityTypes;
public $projects_agent_entityTypes_entities;
public $projects_agent_intents;
public $projects_agent_sessions;
public $projects_agent_sessions_contexts;
public $projects_agent_sessions_entityTypes;
public $projects_operations;
/**
* Constructs the internal representation of the Dialogflow service.
*
* @param Google_Client $client
*/
public function __construct(Google_Client $client)
{
parent::__construct($client);
$this->rootUrl = 'https://dialogflow.googleapis.com/';
$this->servicePath = '';
$this->batchPath = 'batch';
$this->version = 'v2';
$this->serviceName = 'dialogflow';
$this->projects = new Google_Service_Dialogflow_Resource_Projects(
$this,
$this->serviceName,
'projects',
array(
'methods' => array(
'getAgent' => array(
'path' => 'v2/{+parent}/agent',
'httpMethod' => 'GET',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->projects_agent = new Google_Service_Dialogflow_Resource_ProjectsAgent(
$this,
$this->serviceName,
'agent',
array(
'methods' => array(
'export' => array(
'path' => 'v2/{+parent}/agent:export',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'import' => array(
'path' => 'v2/{+parent}/agent:import',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'restore' => array(
'path' => 'v2/{+parent}/agent:restore',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'search' => array(
'path' => 'v2/{+parent}/agent:search',
'httpMethod' => 'GET',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'pageSize' => array(
'location' => 'query',
'type' => 'integer',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
),
),'train' => array(
'path' => 'v2/{+parent}/agent:train',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->projects_agent_entityTypes = new Google_Service_Dialogflow_Resource_ProjectsAgentEntityTypes(
$this,
$this->serviceName,
'entityTypes',
array(
'methods' => array(
'batchDelete' => array(
'path' => 'v2/{+parent}/entityTypes:batchDelete',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'batchUpdate' => array(
'path' => 'v2/{+parent}/entityTypes:batchUpdate',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'create' => array(
'path' => 'v2/{+parent}/entityTypes',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
),
),'delete' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'DELETE',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'GET',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
),
),'list' => array(
'path' => 'v2/{+parent}/entityTypes',
'httpMethod' => 'GET',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'pageSize' => array(
'location' => 'query',
'type' => 'integer',
),
),
),'patch' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'PATCH',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
'updateMask' => array(
'location' => 'query',
'type' => 'string',
),
),
),
)
)
);
$this->projects_agent_entityTypes_entities = new Google_Service_Dialogflow_Resource_ProjectsAgentEntityTypesEntities(
$this,
$this->serviceName,
'entities',
array(
'methods' => array(
'batchCreate' => array(
'path' => 'v2/{+parent}/entities:batchCreate',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'batchDelete' => array(
'path' => 'v2/{+parent}/entities:batchDelete',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'batchUpdate' => array(
'path' => 'v2/{+parent}/entities:batchUpdate',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->projects_agent_intents = new Google_Service_Dialogflow_Resource_ProjectsAgentIntents(
$this,
$this->serviceName,
'intents',
array(
'methods' => array(
'batchDelete' => array(
'path' => 'v2/{+parent}/intents:batchDelete',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'batchUpdate' => array(
'path' => 'v2/{+parent}/intents:batchUpdate',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'create' => array(
'path' => 'v2/{+parent}/intents',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'intentView' => array(
'location' => 'query',
'type' => 'string',
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
),
),'delete' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'DELETE',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'GET',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
'intentView' => array(
'location' => 'query',
'type' => 'string',
),
),
),'list' => array(
'path' => 'v2/{+parent}/intents',
'httpMethod' => 'GET',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'pageSize' => array(
'location' => 'query',
'type' => 'integer',
),
'intentView' => array(
'location' => 'query',
'type' => 'string',
),
),
),'patch' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'PATCH',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'intentView' => array(
'location' => 'query',
'type' => 'string',
),
'languageCode' => array(
'location' => 'query',
'type' => 'string',
),
'updateMask' => array(
'location' => 'query',
'type' => 'string',
),
),
),
)
)
);
$this->projects_agent_sessions = new Google_Service_Dialogflow_Resource_ProjectsAgentSessions(
$this,
$this->serviceName,
'sessions',
array(
'methods' => array(
'deleteContexts' => array(
'path' => 'v2/{+parent}/contexts',
'httpMethod' => 'DELETE',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'detectIntent' => array(
'path' => 'v2/{+session}:detectIntent',
'httpMethod' => 'POST',
'parameters' => array(
'session' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->projects_agent_sessions_contexts = new Google_Service_Dialogflow_Resource_ProjectsAgentSessionsContexts(
$this,
$this->serviceName,
'contexts',
array(
'methods' => array(
'create' => array(
'path' => 'v2/{+parent}/contexts',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'delete' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'DELETE',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'GET',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'v2/{+parent}/contexts',
'httpMethod' => 'GET',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'pageSize' => array(
'location' => 'query',
'type' => 'integer',
),
),
),'patch' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'PATCH',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'updateMask' => array(
'location' => 'query',
'type' => 'string',
),
),
),
)
)
);
$this->projects_agent_sessions_entityTypes = new Google_Service_Dialogflow_Resource_ProjectsAgentSessionsEntityTypes(
$this,
$this->serviceName,
'entityTypes',
array(
'methods' => array(
'create' => array(
'path' => 'v2/{+parent}/entityTypes',
'httpMethod' => 'POST',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'delete' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'DELETE',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'GET',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'v2/{+parent}/entityTypes',
'httpMethod' => 'GET',
'parameters' => array(
'parent' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'pageSize' => array(
'location' => 'query',
'type' => 'integer',
),
),
),'patch' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'PATCH',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'updateMask' => array(
'location' => 'query',
'type' => 'string',
),
),
),
)
)
);
$this->projects_operations = new Google_Service_Dialogflow_Resource_ProjectsOperations(
$this,
$this->serviceName,
'operations',
array(
'methods' => array(
'get' => array(
'path' => 'v2/{+name}',
'httpMethod' => 'GET',
'parameters' => array(
'name' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
}
}