Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $projects = $dialogflowService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_Dialogflow_Resource_Projects');

View File

@@ -0,0 +1,74 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudLocationListLocationsResponse;
use Google\Service\Dialogflow\GoogleCloudLocationLocation;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $locations = $dialogflowService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* Gets information about a location. (locations.get)
*
* @param string $name Resource name for the location.
* @param array $optParams Optional parameters.
* @return GoogleCloudLocationLocation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudLocationLocation::class);
}
/**
* Lists information about the supported locations for this service.
* (locations.listProjectsLocations)
*
* @param string $name The resource that owns the locations collection, if
* applicable.
* @param array $optParams Optional parameters.
*
* @opt_param string filter A filter to narrow down results to a preferred
* subset. The filtering language accepts strings like `"displayName=tokyo"`,
* and is documented in more detail in [AIP-160](https://google.aip.dev/160).
* @opt_param int pageSize The maximum number of results to return. If not set,
* the service selects a default.
* @opt_param string pageToken A page token received from the `next_page_token`
* field in the response. Send that page token to receive the subsequent page.
* @return GoogleCloudLocationListLocationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudLocationListLocationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_Dialogflow_Resource_ProjectsLocations');

View File

@@ -0,0 +1,261 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Agent;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3AgentValidationResult;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ExportAgentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3GenerativeSettings;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListAgentsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3RestoreAgentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ValidateAgentRequest;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "agents" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $agents = $dialogflowService->projects_locations_agents;
* </code>
*/
class ProjectsLocationsAgents extends \Google\Service\Resource
{
/**
* Creates an agent in the specified location. Note: You should always train
* flows prior to sending them queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (agents.create)
*
* @param string $parent Required. The location to create a agent for. Format:
* `projects//locations/`.
* @param GoogleCloudDialogflowCxV3Agent $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Agent
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Agent $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3Agent::class);
}
/**
* Deletes the specified agent. (agents.delete)
*
* @param string $name Required. The name of the agent to delete. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Exports the specified agent to a binary file. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`:
* ExportAgentResponse (agents.export)
*
* @param string $name Required. The name of the agent to export. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ExportAgentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function export($name, GoogleCloudDialogflowCxV3ExportAgentRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('export', [$params], GoogleLongrunningOperation::class);
}
/**
* Retrieves the specified agent. (agents.get)
*
* @param string $name Required. The name of the agent. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Agent
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Agent::class);
}
/**
* Gets the generative settings for the agent. (agents.getGenerativeSettings)
*
* @param string $name Required. Format:
* `projects//locations//agents//generativeSettings`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode Required. Language code of the generative
* settings.
* @return GoogleCloudDialogflowCxV3GenerativeSettings
* @throws \Google\Service\Exception
*/
public function getGenerativeSettings($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getGenerativeSettings', [$params], GoogleCloudDialogflowCxV3GenerativeSettings::class);
}
/**
* Gets the latest agent validation result. Agent validation is performed when
* ValidateAgent is called. (agents.getValidationResult)
*
* @param string $name Required. The agent name. Format:
* `projects//locations//agents//validationResult`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode If not specified, the agent's default language
* is used.
* @return GoogleCloudDialogflowCxV3AgentValidationResult
* @throws \Google\Service\Exception
*/
public function getValidationResult($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getValidationResult', [$params], GoogleCloudDialogflowCxV3AgentValidationResult::class);
}
/**
* Returns the list of all agents in the specified location.
* (agents.listProjectsLocationsAgents)
*
* @param string $parent Required. The location to list all agents for. Format:
* `projects//locations/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListAgentsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgents($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListAgentsResponse::class);
}
/**
* Updates the specified agent. Note: You should always train flows prior to
* sending them queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (agents.patch)
*
* @param string $name The unique identifier of the agent. Required for the
* Agents.UpdateAgent method. Agents.CreateAgent populates the name
* automatically. Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3Agent $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The mask to control which fields get updated. If
* the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3Agent
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Agent $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Agent::class);
}
/**
* Restores the specified agent from a binary file. Replaces the current agent
* with a new one. Note that all existing resources in agent (e.g. intents,
* entity types, flows) will be removed. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`: An [Empty
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#empty) Note: You should always train
* flows prior to sending them queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (agents.restore)
*
* @param string $name Required. The name of the agent to restore into. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3RestoreAgentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function restore($name, GoogleCloudDialogflowCxV3RestoreAgentRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('restore', [$params], GoogleLongrunningOperation::class);
}
/**
* Updates the generative settings for the agent.
* (agents.updateGenerativeSettings)
*
* @param string $name Format:
* `projects//locations//agents//generativeSettings`.
* @param GoogleCloudDialogflowCxV3GenerativeSettings $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. The mask to control which fields get
* updated. If the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3GenerativeSettings
* @throws \Google\Service\Exception
*/
public function updateGenerativeSettings($name, GoogleCloudDialogflowCxV3GenerativeSettings $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateGenerativeSettings', [$params], GoogleCloudDialogflowCxV3GenerativeSettings::class);
}
/**
* Validates the specified agent and creates or updates validation results. The
* agent in draft version is validated. Please call this API after the training
* is completed to get the complete validation results. (agents.validate)
*
* @param string $name Required. The agent to validate. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ValidateAgentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3AgentValidationResult
* @throws \Google\Service\Exception
*/
public function validate($name, GoogleCloudDialogflowCxV3ValidateAgentRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('validate', [$params], GoogleCloudDialogflowCxV3AgentValidationResult::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgents::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgents');

View File

@@ -0,0 +1,82 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Changelog;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListChangelogsResponse;
/**
* The "changelogs" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $changelogs = $dialogflowService->projects_locations_agents_changelogs;
* </code>
*/
class ProjectsLocationsAgentsChangelogs extends \Google\Service\Resource
{
/**
* Retrieves the specified Changelog. (changelogs.get)
*
* @param string $name Required. The name of the changelog to get. Format:
* `projects//locations//agents//changelogs/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Changelog
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Changelog::class);
}
/**
* Returns the list of Changelogs.
* (changelogs.listProjectsLocationsAgentsChangelogs)
*
* @param string $parent Required. The agent containing the changelogs. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The filter string. Supports filter by user_email,
* resource, type and create_time. Some examples: 1. By user email: user_email =
* "someone@google.com" 2. By resource name: resource =
* "projects/123/locations/global/agents/456/flows/789" 3. By resource display
* name: display_name = "my agent" 4. By action: action = "Create" 5. By type:
* type = "flows" 6. By create time. Currently predicates on `create_time` and
* `create_time_epoch_seconds` are supported: create_time_epoch_seconds >
* 1551790877 AND create_time <= 2017-01-15T01:30:15.01Z 7. Combination of above
* filters: resource = "projects/123/locations/global/agents/456/flows/789" AND
* user_email = "someone@google.com" AND create_time <= 2017-01-15T01:30:15.01Z
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListChangelogsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsChangelogs($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListChangelogsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsChangelogs::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsChangelogs');

View File

@@ -0,0 +1,205 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3EntityType;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ExportEntityTypesRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ImportEntityTypesRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListEntityTypesResponse;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "entityTypes" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $entityTypes = $dialogflowService->projects_locations_agents_entityTypes;
* </code>
*/
class ProjectsLocationsAgentsEntityTypes extends \Google\Service\Resource
{
/**
* Creates an entity type in the specified agent. Note: You should always train
* a flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (entityTypes.create)
*
* @param string $parent Required. The agent to create a entity type for.
* Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3EntityType $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `entity_type`: * `EntityType.entities.value` * `EntityType.entities.synonyms`
* * `EntityType.excluded_phrases.value` If not specified, the agent's default
* language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3EntityType
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3EntityType $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3EntityType::class);
}
/**
* Deletes the specified entity type. Note: You should always train a flow prior
* to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (entityTypes.delete)
*
* @param string $name Required. The name of the entity type to delete. Format:
* `projects//locations//agents//entityTypes/`.
* @param array $optParams Optional parameters.
*
* @opt_param bool force This field has no effect for entity type not being
* used. For entity types that are used by intents or pages: * If `force` is set
* to false, an error will be returned with message indicating the referencing
* resources. * If `force` is set to true, Dialogflow will remove the entity
* type, as well as any references to the entity type (i.e. Page parameter of
* the entity type will be changed to '@sys.any' and intent parameter of the
* entity type will be removed).
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Exports the selected entity types. (entityTypes.export)
*
* @param string $parent Required. The name of the parent agent to export entity
* types. Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ExportEntityTypesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function export($parent, GoogleCloudDialogflowCxV3ExportEntityTypesRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('export', [$params], GoogleLongrunningOperation::class);
}
/**
* Retrieves the specified entity type. (entityTypes.get)
*
* @param string $name Required. The name of the entity type. Format:
* `projects//locations//agents//entityTypes/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to retrieve the entity type for.
* The following fields are language dependent: * `EntityType.entities.value` *
* `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3EntityType
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3EntityType::class);
}
/**
* Imports the specified entitytypes into the agent. (entityTypes.import)
*
* @param string $parent Required. The agent to import the entity types into.
* Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ImportEntityTypesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function import($parent, GoogleCloudDialogflowCxV3ImportEntityTypesRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], GoogleLongrunningOperation::class);
}
/**
* Returns the list of all entity types in the specified agent.
* (entityTypes.listProjectsLocationsAgentsEntityTypes)
*
* @param string $parent Required. The agent to list all entity types for.
* Format: `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list entity types for. The
* following fields are language dependent: * `EntityType.entities.value` *
* `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListEntityTypesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsEntityTypes($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListEntityTypesResponse::class);
}
/**
* Updates the specified entity type. Note: You should always train a flow prior
* to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (entityTypes.patch)
*
* @param string $name The unique identifier of the entity type. Required for
* EntityTypes.UpdateEntityType. Format:
* `projects//locations//agents//entityTypes/`.
* @param GoogleCloudDialogflowCxV3EntityType $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `entity_type`: * `EntityType.entities.value` * `EntityType.entities.synonyms`
* * `EntityType.excluded_phrases.value` If not specified, the agent's default
* language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param string updateMask The mask to control which fields get updated.
* @return GoogleCloudDialogflowCxV3EntityType
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3EntityType $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3EntityType::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsEntityTypes::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEntityTypes');

View File

@@ -0,0 +1,201 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3DeployFlowRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Environment;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListEnvironmentsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3RunContinuousTestRequest;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "environments" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $environments = $dialogflowService->projects_locations_agents_environments;
* </code>
*/
class ProjectsLocationsAgentsEnvironments extends \Google\Service\Resource
{
/**
* Creates an Environment in the specified Agent. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`: Environment
* (environments.create)
*
* @param string $parent Required. The Agent to create an Environment for.
* Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3Environment $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Environment $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleLongrunningOperation::class);
}
/**
* Deletes the specified Environment. (environments.delete)
*
* @param string $name Required. The name of the Environment to delete. Format:
* `projects//locations//agents//environments/`.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Deploys a flow to the specified Environment. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: DeployFlowMetadata - `response`: DeployFlowResponse
* (environments.deployFlow)
*
* @param string $environment Required. The environment to deploy the flow to.
* Format: `projects//locations//agents//environments/`.
* @param GoogleCloudDialogflowCxV3DeployFlowRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function deployFlow($environment, GoogleCloudDialogflowCxV3DeployFlowRequest $postBody, $optParams = [])
{
$params = ['environment' => $environment, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('deployFlow', [$params], GoogleLongrunningOperation::class);
}
/**
* Retrieves the specified Environment. (environments.get)
*
* @param string $name Required. The name of the Environment. Format:
* `projects//locations//agents//environments/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Environment
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Environment::class);
}
/**
* Returns the list of all environments in the specified Agent.
* (environments.listProjectsLocationsAgentsEnvironments)
*
* @param string $parent Required. The Agent to list all environments for.
* Format: `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 20 and at most 100.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListEnvironmentsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsEnvironments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListEnvironmentsResponse::class);
}
/**
* Looks up the history of the specified Environment.
* (environments.lookupEnvironmentHistory)
*
* @param string $name Required. Resource name of the environment to look up the
* history for. Format: `projects//locations//agents//environments/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
* @throws \Google\Service\Exception
*/
public function lookupEnvironmentHistory($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('lookupEnvironmentHistory', [$params], GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse::class);
}
/**
* Updates the specified Environment. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`: Environment
* (environments.patch)
*
* @param string $name The name of the environment. Format:
* `projects//locations//agents//environments/`.
* @param GoogleCloudDialogflowCxV3Environment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. The mask to control which fields get
* updated.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Environment $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleLongrunningOperation::class);
}
/**
* Kicks off a continuous test under the specified Environment. This method is a
* [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: RunContinuousTestMetadata - `response`:
* RunContinuousTestResponse (environments.runContinuousTest)
*
* @param string $environment Required. Format:
* `projects//locations//agents//environments/`.
* @param GoogleCloudDialogflowCxV3RunContinuousTestRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function runContinuousTest($environment, GoogleCloudDialogflowCxV3RunContinuousTestRequest $postBody, $optParams = [])
{
$params = ['environment' => $environment, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('runContinuousTest', [$params], GoogleLongrunningOperation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsEnvironments::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEnvironments');

View File

@@ -0,0 +1,56 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse;
/**
* The "continuousTestResults" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $continuousTestResults = $dialogflowService->projects_locations_agents_environments_continuousTestResults;
* </code>
*/
class ProjectsLocationsAgentsEnvironmentsContinuousTestResults extends \Google\Service\Resource
{
/**
* Fetches a list of continuous test results for a given environment. (continuou
* sTestResults.listProjectsLocationsAgentsEnvironmentsContinuousTestResults)
*
* @param string $parent Required. The environment to list results for. Format:
* `projects//locations//agents//environments/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsEnvironmentsContinuousTestResults($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsEnvironmentsContinuousTestResults::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEnvironmentsContinuousTestResults');

View File

@@ -0,0 +1,72 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Deployment;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListDeploymentsResponse;
/**
* The "deployments" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $deployments = $dialogflowService->projects_locations_agents_environments_deployments;
* </code>
*/
class ProjectsLocationsAgentsEnvironmentsDeployments extends \Google\Service\Resource
{
/**
* Retrieves the specified Deployment. (deployments.get)
*
* @param string $name Required. The name of the Deployment. Format:
* `projects//locations//agents//environments//deployments/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Deployment
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Deployment::class);
}
/**
* Returns the list of all deployments in the specified Environment.
* (deployments.listProjectsLocationsAgentsEnvironmentsDeployments)
*
* @param string $parent Required. The Environment to list all environments for.
* Format: `projects//locations//agents//environments/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 20 and at most 100.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListDeploymentsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsEnvironmentsDeployments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListDeploymentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsEnvironmentsDeployments::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEnvironmentsDeployments');

View File

@@ -0,0 +1,159 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Experiment;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListExperimentsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3StartExperimentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3StopExperimentRequest;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "experiments" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $experiments = $dialogflowService->projects_locations_agents_environments_experiments;
* </code>
*/
class ProjectsLocationsAgentsEnvironmentsExperiments extends \Google\Service\Resource
{
/**
* Creates an Experiment in the specified Environment. (experiments.create)
*
* @param string $parent Required. The Agent to create an Environment for.
* Format: `projects//locations//agents//environments/`.
* @param GoogleCloudDialogflowCxV3Experiment $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Experiment
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Experiment $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3Experiment::class);
}
/**
* Deletes the specified Experiment. (experiments.delete)
*
* @param string $name Required. The name of the Environment to delete. Format:
* `projects//locations//agents//environments//experiments/`.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified Experiment. (experiments.get)
*
* @param string $name Required. The name of the Environment. Format:
* `projects//locations//agents//environments//experiments/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Experiment
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Experiment::class);
}
/**
* Returns the list of all experiments in the specified Environment.
* (experiments.listProjectsLocationsAgentsEnvironmentsExperiments)
*
* @param string $parent Required. The Environment to list all environments for.
* Format: `projects//locations//agents//environments/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 20 and at most 100.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListExperimentsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsEnvironmentsExperiments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListExperimentsResponse::class);
}
/**
* Updates the specified Experiment. (experiments.patch)
*
* @param string $name The name of the experiment. Format:
* projects//locations//agents//environments//experiments/.
* @param GoogleCloudDialogflowCxV3Experiment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. The mask to control which fields get
* updated.
* @return GoogleCloudDialogflowCxV3Experiment
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Experiment $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Experiment::class);
}
/**
* Starts the specified Experiment. This rpc only changes the state of
* experiment from PENDING to RUNNING. (experiments.start)
*
* @param string $name Required. Resource name of the experiment to start.
* Format: `projects//locations//agents//environments//experiments/`.
* @param GoogleCloudDialogflowCxV3StartExperimentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Experiment
* @throws \Google\Service\Exception
*/
public function start($name, GoogleCloudDialogflowCxV3StartExperimentRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('start', [$params], GoogleCloudDialogflowCxV3Experiment::class);
}
/**
* Stops the specified Experiment. This rpc only changes the state of experiment
* from RUNNING to DONE. (experiments.stop)
*
* @param string $name Required. Resource name of the experiment to stop.
* Format: `projects//locations//agents//environments//experiments/`.
* @param GoogleCloudDialogflowCxV3StopExperimentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Experiment
* @throws \Google\Service\Exception
*/
public function stop($name, GoogleCloudDialogflowCxV3StopExperimentRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('stop', [$params], GoogleCloudDialogflowCxV3Experiment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsEnvironmentsExperiments::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEnvironmentsExperiments');

View File

@@ -0,0 +1,148 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3DetectIntentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3DetectIntentResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3FulfillIntentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3FulfillIntentResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3MatchIntentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3MatchIntentResponse;
/**
* The "sessions" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $sessions = $dialogflowService->projects_locations_agents_environments_sessions;
* </code>
*/
class ProjectsLocationsAgentsEnvironmentsSessions extends \Google\Service\Resource
{
/**
* Processes a natural language query and returns structured, actionable data as
* a result. This method is not idempotent, because it may cause session entity
* types to be updated, which in turn might affect results of future queries.
* Note: Always use agent versions for production traffic. See [Versions and
* environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
* (sessions.detectIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). Note:
* Always use agent versions for production traffic. See [Versions and
* environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
* @param GoogleCloudDialogflowCxV3DetectIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3DetectIntentResponse
* @throws \Google\Service\Exception
*/
public function detectIntent($session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('detectIntent', [$params], GoogleCloudDialogflowCxV3DetectIntentResponse::class);
}
/**
* Fulfills a matched intent returned by MatchIntent. Must be called after
* MatchIntent, with input from MatchIntentResponse. Otherwise, the behavior is
* undefined. (sessions.fulfillIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
* @param GoogleCloudDialogflowCxV3FulfillIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3FulfillIntentResponse
* @throws \Google\Service\Exception
*/
public function fulfillIntent($session, GoogleCloudDialogflowCxV3FulfillIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('fulfillIntent', [$params], GoogleCloudDialogflowCxV3FulfillIntentResponse::class);
}
/**
* Returns preliminary intent match results, doesn't change the session status.
* (sessions.matchIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
* @param GoogleCloudDialogflowCxV3MatchIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3MatchIntentResponse
* @throws \Google\Service\Exception
*/
public function matchIntent($session, GoogleCloudDialogflowCxV3MatchIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('matchIntent', [$params], GoogleCloudDialogflowCxV3MatchIntentResponse::class);
}
/**
* Processes a natural language query and returns structured, actionable data as
* a result through server-side streaming. Server-side streaming allows
* Dialogflow to send [partial responses](https://cloud.google.com/dialogflow/cx
* /docs/concept/fulfillment#partial-response) earlier in a single request.
* (sessions.serverStreamingDetectIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). Note:
* Always use agent versions for production traffic. See [Versions and
* environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
* @param GoogleCloudDialogflowCxV3DetectIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3DetectIntentResponse
* @throws \Google\Service\Exception
*/
public function serverStreamingDetectIntent($session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('serverStreamingDetectIntent', [$params], GoogleCloudDialogflowCxV3DetectIntentResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsEnvironmentsSessions::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEnvironmentsSessions');

View File

@@ -0,0 +1,132 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3SessionEntityType;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "entityTypes" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $entityTypes = $dialogflowService->projects_locations_agents_environments_sessions_entityTypes;
* </code>
*/
class ProjectsLocationsAgentsEnvironmentsSessionsEntityTypes extends \Google\Service\Resource
{
/**
* Creates a session entity type. (entityTypes.create)
*
* @param string $parent Required. The session to create a session entity type
* for. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment.
* @param GoogleCloudDialogflowCxV3SessionEntityType $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3SessionEntityType
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3SessionEntityType $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3SessionEntityType::class);
}
/**
* Deletes the specified session entity type. (entityTypes.delete)
*
* @param string $name Required. The name of the session entity type to delete.
* Format: `projects//locations//agents//sessions//entityTypes/` or
* `projects//locations//agents//environments//sessions//entityTypes/`. If
* `Environment ID` is not specified, we assume default 'draft' environment.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified session entity type. (entityTypes.get)
*
* @param string $name Required. The name of the session entity type. Format:
* `projects//locations//agents//sessions//entityTypes/` or
* `projects//locations//agents//environments//sessions//entityTypes/`. If
* `Environment ID` is not specified, we assume default 'draft' environment.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3SessionEntityType
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3SessionEntityType::class);
}
/**
* Returns the list of all session entity types in the specified session.
* (entityTypes.listProjectsLocationsAgentsEnvironmentsSessionsEntityTypes)
*
* @param string $parent Required. The session to list all session entity types
* from. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsEnvironmentsSessionsEntityTypes($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse::class);
}
/**
* Updates the specified session entity type. (entityTypes.patch)
*
* @param string $name Required. The unique identifier of the session entity
* type. Format: `projects//locations//agents//sessions//entityTypes/` or
* `projects//locations//agents//environments//sessions//entityTypes/`. If
* `Environment ID` is not specified, we assume default 'draft' environment.
* @param GoogleCloudDialogflowCxV3SessionEntityType $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The mask to control which fields get updated.
* @return GoogleCloudDialogflowCxV3SessionEntityType
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3SessionEntityType $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3SessionEntityType::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsEnvironmentsSessionsEntityTypes::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsEnvironmentsSessionsEntityTypes');

View File

@@ -0,0 +1,295 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ExportFlowRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Flow;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3FlowValidationResult;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ImportFlowRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListFlowsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3TrainFlowRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ValidateFlowRequest;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "flows" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $flows = $dialogflowService->projects_locations_agents_flows;
* </code>
*/
class ProjectsLocationsAgentsFlows extends \Google\Service\Resource
{
/**
* Creates a flow in the specified agent. Note: You should always train a flow
* prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (flows.create)
*
* @param string $parent Required. The agent to create a flow for. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3Flow $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `flow`: * `Flow.event_handlers.trigger_fulfillment.messages` *
* `Flow.event_handlers.trigger_fulfillment.conditional_cases` *
* `Flow.transition_routes.trigger_fulfillment.messages` *
* `Flow.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3Flow
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Flow $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3Flow::class);
}
/**
* Deletes a specified flow. (flows.delete)
*
* @param string $name Required. The name of the flow to delete. Format:
* `projects//locations//agents//flows/`.
* @param array $optParams Optional parameters.
*
* @opt_param bool force This field has no effect for flows with no incoming
* transitions. For flows with incoming transitions: * If `force` is set to
* false, an error will be returned with message indicating the incoming
* transitions. * If `force` is set to true, Dialogflow will remove the flow, as
* well as any transitions to the flow (i.e. Target flow in event handlers or
* Target flow in transition routes that point to this flow will be cleared).
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Exports the specified flow to a binary file. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`:
* ExportFlowResponse Note that resources (e.g. intents, entities, webhooks)
* that the flow references will also be exported. (flows.export)
*
* @param string $name Required. The name of the flow to export. Format:
* `projects//locations//agents//flows/`.
* @param GoogleCloudDialogflowCxV3ExportFlowRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function export($name, GoogleCloudDialogflowCxV3ExportFlowRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('export', [$params], GoogleLongrunningOperation::class);
}
/**
* Retrieves the specified flow. (flows.get)
*
* @param string $name Required. The name of the flow to get. Format:
* `projects//locations//agents//flows/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to retrieve the flow for. The
* following fields are language dependent: *
* `Flow.event_handlers.trigger_fulfillment.messages` *
* `Flow.event_handlers.trigger_fulfillment.conditional_cases` *
* `Flow.transition_routes.trigger_fulfillment.messages` *
* `Flow.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3Flow
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Flow::class);
}
/**
* Gets the latest flow validation result. Flow validation is performed when
* ValidateFlow is called. (flows.getValidationResult)
*
* @param string $name Required. The flow name. Format:
* `projects//locations//agents//flows//validationResult`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode If not specified, the agent's default language
* is used.
* @return GoogleCloudDialogflowCxV3FlowValidationResult
* @throws \Google\Service\Exception
*/
public function getValidationResult($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getValidationResult', [$params], GoogleCloudDialogflowCxV3FlowValidationResult::class);
}
/**
* Imports the specified flow to the specified agent from a binary file. This
* method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`:
* ImportFlowResponse Note: You should always train a flow prior to sending it
* queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (flows.import)
*
* @param string $parent Required. The agent to import the flow into. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ImportFlowRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function import($parent, GoogleCloudDialogflowCxV3ImportFlowRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], GoogleLongrunningOperation::class);
}
/**
* Returns the list of all flows in the specified agent.
* (flows.listProjectsLocationsAgentsFlows)
*
* @param string $parent Required. The agent containing the flows. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list flows for. The following
* fields are language dependent: *
* `Flow.event_handlers.trigger_fulfillment.messages` *
* `Flow.event_handlers.trigger_fulfillment.conditional_cases` *
* `Flow.transition_routes.trigger_fulfillment.messages` *
* `Flow.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListFlowsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsFlows($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListFlowsResponse::class);
}
/**
* Updates the specified flow. Note: You should always train a flow prior to
* sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (flows.patch)
*
* @param string $name The unique identifier of the flow. Format:
* `projects//locations//agents//flows/`.
* @param GoogleCloudDialogflowCxV3Flow $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `flow`: * `Flow.event_handlers.trigger_fulfillment.messages` *
* `Flow.event_handlers.trigger_fulfillment.conditional_cases` *
* `Flow.transition_routes.trigger_fulfillment.messages` *
* `Flow.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param string updateMask The mask to control which fields get updated. If
* the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3Flow
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Flow $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Flow::class);
}
/**
* Trains the specified flow. Note that only the flow in 'draft' environment is
* trained. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`: An [Empty
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#empty) Note: You should always train a
* flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (flows.train)
*
* @param string $name Required. The flow to train. Format:
* `projects//locations//agents//flows/`.
* @param GoogleCloudDialogflowCxV3TrainFlowRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function train($name, GoogleCloudDialogflowCxV3TrainFlowRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('train', [$params], GoogleLongrunningOperation::class);
}
/**
* Validates the specified flow and creates or updates validation results.
* Please call this API after the training is completed to get the complete
* validation results. (flows.validate)
*
* @param string $name Required. The flow to validate. Format:
* `projects//locations//agents//flows/`.
* @param GoogleCloudDialogflowCxV3ValidateFlowRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3FlowValidationResult
* @throws \Google\Service\Exception
*/
public function validate($name, GoogleCloudDialogflowCxV3ValidateFlowRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('validate', [$params], GoogleCloudDialogflowCxV3FlowValidationResult::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsFlows::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsFlows');

View File

@@ -0,0 +1,202 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListPagesResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Page;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "pages" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $pages = $dialogflowService->projects_locations_agents_flows_pages;
* </code>
*/
class ProjectsLocationsAgentsFlowsPages extends \Google\Service\Resource
{
/**
* Creates a page in the specified flow. Note: You should always train a flow
* prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (pages.create)
*
* @param string $parent Required. The flow to create a page for. Format:
* `projects//locations//agents//flows/`.
* @param GoogleCloudDialogflowCxV3Page $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `page`: * `Page.entry_fulfillment.messages` *
* `Page.entry_fulfillment.conditional_cases` *
* `Page.event_handlers.trigger_fulfillment.messages` *
* `Page.event_handlers.trigger_fulfillment.conditional_cases` *
* `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `P
* age.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_case
* s` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` *
* `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
* ` * `Page.transition_routes.trigger_fulfillment.messages` *
* `Page.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3Page
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Page $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3Page::class);
}
/**
* Deletes the specified page. Note: You should always train a flow prior to
* sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (pages.delete)
*
* @param string $name Required. The name of the page to delete. Format:
* `projects//locations//agents//Flows//pages/`.
* @param array $optParams Optional parameters.
*
* @opt_param bool force This field has no effect for pages with no incoming
* transitions. For pages with incoming transitions: * If `force` is set to
* false, an error will be returned with message indicating the incoming
* transitions. * If `force` is set to true, Dialogflow will remove the page, as
* well as any transitions to the page (i.e. Target page in event handlers or
* Target page in transition routes that point to this page will be cleared).
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified page. (pages.get)
*
* @param string $name Required. The name of the page. Format:
* `projects//locations//agents//flows//pages/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to retrieve the page for. The
* following fields are language dependent: * `Page.entry_fulfillment.messages`
* * `Page.entry_fulfillment.conditional_cases` *
* `Page.event_handlers.trigger_fulfillment.messages` *
* `Page.event_handlers.trigger_fulfillment.conditional_cases` *
* `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `P
* age.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_case
* s` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` *
* `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
* ` * `Page.transition_routes.trigger_fulfillment.messages` *
* `Page.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3Page
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Page::class);
}
/**
* Returns the list of all pages in the specified flow.
* (pages.listProjectsLocationsAgentsFlowsPages)
*
* @param string $parent Required. The flow to list all pages for. Format:
* `projects//locations//agents//flows/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list pages for. The following
* fields are language dependent: * `Page.entry_fulfillment.messages` *
* `Page.entry_fulfillment.conditional_cases` *
* `Page.event_handlers.trigger_fulfillment.messages` *
* `Page.event_handlers.trigger_fulfillment.conditional_cases` *
* `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `P
* age.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_case
* s` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` *
* `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
* ` * `Page.transition_routes.trigger_fulfillment.messages` *
* `Page.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListPagesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsFlowsPages($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListPagesResponse::class);
}
/**
* Updates the specified page. Note: You should always train a flow prior to
* sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (pages.patch)
*
* @param string $name The unique identifier of the page. Required for the
* Pages.UpdatePage method. Pages.CreatePage populates the name automatically.
* Format: `projects//locations//agents//flows//pages/`.
* @param GoogleCloudDialogflowCxV3Page $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `page`: * `Page.entry_fulfillment.messages` *
* `Page.entry_fulfillment.conditional_cases` *
* `Page.event_handlers.trigger_fulfillment.messages` *
* `Page.event_handlers.trigger_fulfillment.conditional_cases` *
* `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `P
* age.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_case
* s` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` *
* `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
* ` * `Page.transition_routes.trigger_fulfillment.messages` *
* `Page.transition_routes.trigger_fulfillment.conditional_cases` If not
* specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param string updateMask The mask to control which fields get updated. If
* the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3Page
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Page $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Page::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsFlowsPages::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsFlowsPages');

View File

@@ -0,0 +1,178 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3TransitionRouteGroup;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "transitionRouteGroups" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $transitionRouteGroups = $dialogflowService->projects_locations_agents_flows_transitionRouteGroups;
* </code>
*/
class ProjectsLocationsAgentsFlowsTransitionRouteGroups extends \Google\Service\Resource
{
/**
* Creates an TransitionRouteGroup in the specified flow. Note: You should
* always train a flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (transitionRouteGroups.create)
*
* @param string $parent Required. The flow to create an TransitionRouteGroup
* for. Format: `projects//locations//agents//flows/` or
* `projects//locations//agents/` for agent-level groups.
* @param GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `TransitionRouteGroup`: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3TransitionRouteGroup
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
}
/**
* Deletes the specified TransitionRouteGroup. Note: You should always train a
* flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (transitionRouteGroups.delete)
*
* @param string $name Required. The name of the TransitionRouteGroup to delete.
* Format: `projects//locations//agents//flows//transitionRouteGroups/` or
* `projects//locations//agents//transitionRouteGroups/`.
* @param array $optParams Optional parameters.
*
* @opt_param bool force This field has no effect for transition route group
* that no page is using. If the transition route group is referenced by any
* page: * If `force` is set to false, an error will be returned with message
* indicating pages that reference the transition route group. * If `force` is
* set to true, Dialogflow will remove the transition route group, as well as
* any reference to it.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified TransitionRouteGroup. (transitionRouteGroups.get)
*
* @param string $name Required. The name of the TransitionRouteGroup. Format:
* `projects//locations//agents//flows//transitionRouteGroups/` or
* `projects//locations//agents//transitionRouteGroups/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to retrieve the transition route
* group for. The following fields are language dependent: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3TransitionRouteGroup
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
}
/**
* Returns the list of all transition route groups in the specified flow.
* (transitionRouteGroups.listProjectsLocationsAgentsFlowsTransitionRouteGroups)
*
* @param string $parent Required. The flow to list all transition route groups
* for. Format: `projects//locations//agents//flows/` or
* `projects//locations//agents/.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list transition route groups
* for. The following fields are language dependent: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsFlowsTransitionRouteGroups($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse::class);
}
/**
* Updates the specified TransitionRouteGroup. Note: You should always train a
* flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (transitionRouteGroups.patch)
*
* @param string $name The unique identifier of the transition route group.
* TransitionRouteGroups.CreateTransitionRouteGroup populates the name
* automatically. Format:
* `projects//locations//agents//flows//transitionRouteGroups/` .
* @param GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `TransitionRouteGroup`: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param string updateMask The mask to control which fields get updated.
* @return GoogleCloudDialogflowCxV3TransitionRouteGroup
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsFlowsTransitionRouteGroups::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsFlowsTransitionRouteGroups');

View File

@@ -0,0 +1,174 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3CompareVersionsRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3CompareVersionsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListVersionsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3LoadVersionRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Version;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "versions" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $versions = $dialogflowService->projects_locations_agents_flows_versions;
* </code>
*/
class ProjectsLocationsAgentsFlowsVersions extends \Google\Service\Resource
{
/**
* Compares the specified base version with target version.
* (versions.compareVersions)
*
* @param string $baseVersion Required. Name of the base flow version to compare
* with the target version. Use version ID `0` to indicate the draft version of
* the specified flow. Format: `projects//locations//agents//flows//versions/`.
* @param GoogleCloudDialogflowCxV3CompareVersionsRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3CompareVersionsResponse
* @throws \Google\Service\Exception
*/
public function compareVersions($baseVersion, GoogleCloudDialogflowCxV3CompareVersionsRequest $postBody, $optParams = [])
{
$params = ['baseVersion' => $baseVersion, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('compareVersions', [$params], GoogleCloudDialogflowCxV3CompareVersionsResponse::class);
}
/**
* Creates a Version in the specified Flow. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: CreateVersionOperationMetadata - `response`: Version
* (versions.create)
*
* @param string $parent Required. The Flow to create an Version for. Format:
* `projects//locations//agents//flows/`.
* @param GoogleCloudDialogflowCxV3Version $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Version $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleLongrunningOperation::class);
}
/**
* Deletes the specified Version. (versions.delete)
*
* @param string $name Required. The name of the Version to delete. Format:
* `projects//locations//agents//flows//versions/`.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified Version. (versions.get)
*
* @param string $name Required. The name of the Version. Format:
* `projects//locations//agents//flows//versions/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Version
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Version::class);
}
/**
* Returns the list of all versions in the specified Flow.
* (versions.listProjectsLocationsAgentsFlowsVersions)
*
* @param string $parent Required. The Flow to list all versions for. Format:
* `projects//locations//agents//flows/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 20 and at most 100.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListVersionsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsFlowsVersions($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListVersionsResponse::class);
}
/**
* Loads resources in the specified version to the draft flow. This method is a
* [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: An empty [Struct
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#struct) - `response`: An [Empty
* message](https://developers.google.com/protocol-
* buffers/docs/reference/google.protobuf#empty) (versions.load)
*
* @param string $name Required. The Version to be loaded to draft flow. Format:
* `projects//locations//agents//flows//versions/`.
* @param GoogleCloudDialogflowCxV3LoadVersionRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function load($name, GoogleCloudDialogflowCxV3LoadVersionRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('load', [$params], GoogleLongrunningOperation::class);
}
/**
* Updates the specified Version. (versions.patch)
*
* @param string $name Format: projects//locations//agents//flows//versions/.
* Version ID is a self-increasing number generated by Dialogflow upon version
* creation.
* @param GoogleCloudDialogflowCxV3Version $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. The mask to control which fields get
* updated. Currently only `description` and `display_name` can be updated.
* @return GoogleCloudDialogflowCxV3Version
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Version $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Version::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsFlowsVersions::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsFlowsVersions');

View File

@@ -0,0 +1,139 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Generator;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListGeneratorsResponse;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "generators" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $generators = $dialogflowService->projects_locations_agents_generators;
* </code>
*/
class ProjectsLocationsAgentsGenerators extends \Google\Service\Resource
{
/**
* Creates a generator in the specified agent. (generators.create)
*
* @param string $parent Required. The agent to create a generator for. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3Generator $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to create generators for the
* following fields: * `Generator.prompt_text.text` If not specified, the
* agent's default language is used.
* @return GoogleCloudDialogflowCxV3Generator
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Generator $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3Generator::class);
}
/**
* Deletes the specified generators. (generators.delete)
*
* @param string $name Required. The name of the generator to delete. Format:
* `projects//locations//agents//generators/`.
* @param array $optParams Optional parameters.
*
* @opt_param bool force This field has no effect for generators not being used.
* For generators that are used by pages/flows/transition route groups: * If
* `force` is set to false, an error will be returned with message indicating
* the referenced resources. * If `force` is set to true, Dialogflow will remove
* the generator, as well as any references to the generator (i.e. Generator) in
* fulfillments.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified generator. (generators.get)
*
* @param string $name Required. The name of the generator. Format:
* `projects//locations//agents//generators/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list generators for.
* @return GoogleCloudDialogflowCxV3Generator
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Generator::class);
}
/**
* Returns the list of all generators in the specified agent.
* (generators.listProjectsLocationsAgentsGenerators)
*
* @param string $parent Required. The agent to list all generators for. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list generators for.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListGeneratorsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsGenerators($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListGeneratorsResponse::class);
}
/**
* Update the specified generator. (generators.patch)
*
* @param string $name The unique identifier of the generator. Must be set for
* the Generators.UpdateGenerator method. Generators.CreateGenerate populates
* the name automatically. Format: `projects//locations//agents//generators/`.
* @param GoogleCloudDialogflowCxV3Generator $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list generators for.
* @opt_param string updateMask The mask to control which fields get updated. If
* the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3Generator
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Generator $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Generator::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsGenerators::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsGenerators');

View File

@@ -0,0 +1,206 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ExportIntentsRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ImportIntentsRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Intent;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListIntentsResponse;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "intents" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $intents = $dialogflowService->projects_locations_agents_intents;
* </code>
*/
class ProjectsLocationsAgentsIntents extends \Google\Service\Resource
{
/**
* Creates an intent in the specified agent. Note: You should always train a
* flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (intents.create)
*
* @param string $parent Required. The agent to create an intent for. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3Intent $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `intent`: * `Intent.training_phrases.parts.text` If not specified, the
* agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3Intent
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Intent $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3Intent::class);
}
/**
* Deletes the specified intent. Note: You should always train a flow prior to
* sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (intents.delete)
*
* @param string $name Required. The name of the intent to delete. Format:
* `projects//locations//agents//intents/`.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Exports the selected intents. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: ExportIntentsMetadata - `response`:
* ExportIntentsResponse (intents.export)
*
* @param string $parent Required. The name of the parent agent to export
* intents. Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ExportIntentsRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function export($parent, GoogleCloudDialogflowCxV3ExportIntentsRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('export', [$params], GoogleLongrunningOperation::class);
}
/**
* Retrieves the specified intent. (intents.get)
*
* @param string $name Required. The name of the intent. Format:
* `projects//locations//agents//intents/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to retrieve the intent for. The
* following fields are language dependent: *
* `Intent.training_phrases.parts.text` If not specified, the agent's default
* language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3Intent
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Intent::class);
}
/**
* Imports the specified intents into the agent. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: ImportIntentsMetadata - `response`:
* ImportIntentsResponse (intents.import)
*
* @param string $parent Required. The agent to import the intents into. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ImportIntentsRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function import($parent, GoogleCloudDialogflowCxV3ImportIntentsRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], GoogleLongrunningOperation::class);
}
/**
* Returns the list of all intents in the specified agent.
* (intents.listProjectsLocationsAgentsIntents)
*
* @param string $parent Required. The agent to list all intents for. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param string intentView The resource view to apply to the returned
* intent.
* @opt_param string languageCode The language to list intents for. The
* following fields are language dependent: *
* `Intent.training_phrases.parts.text` If not specified, the agent's default
* language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListIntentsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsIntents($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListIntentsResponse::class);
}
/**
* Updates the specified intent. Note: You should always train a flow prior to
* sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (intents.patch)
*
* @param string $name The unique identifier of the intent. Required for the
* Intents.UpdateIntent method. Intents.CreateIntent populates the name
* automatically. Format: `projects//locations//agents//intents/`.
* @param GoogleCloudDialogflowCxV3Intent $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `intent`: * `Intent.training_phrases.parts.text` If not specified, the
* agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param string updateMask The mask to control which fields get updated. If
* the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3Intent
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Intent $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Intent::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsIntents::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsIntents');

View File

@@ -0,0 +1,167 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3AnswerFeedback;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3DetectIntentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3DetectIntentResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3FulfillIntentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3FulfillIntentResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3MatchIntentRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3MatchIntentResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest;
/**
* The "sessions" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $sessions = $dialogflowService->projects_locations_agents_sessions;
* </code>
*/
class ProjectsLocationsAgentsSessions extends \Google\Service\Resource
{
/**
* Processes a natural language query and returns structured, actionable data as
* a result. This method is not idempotent, because it may cause session entity
* types to be updated, which in turn might affect results of future queries.
* Note: Always use agent versions for production traffic. See [Versions and
* environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
* (sessions.detectIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). Note:
* Always use agent versions for production traffic. See [Versions and
* environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
* @param GoogleCloudDialogflowCxV3DetectIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3DetectIntentResponse
* @throws \Google\Service\Exception
*/
public function detectIntent($session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('detectIntent', [$params], GoogleCloudDialogflowCxV3DetectIntentResponse::class);
}
/**
* Fulfills a matched intent returned by MatchIntent. Must be called after
* MatchIntent, with input from MatchIntentResponse. Otherwise, the behavior is
* undefined. (sessions.fulfillIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
* @param GoogleCloudDialogflowCxV3FulfillIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3FulfillIntentResponse
* @throws \Google\Service\Exception
*/
public function fulfillIntent($session, GoogleCloudDialogflowCxV3FulfillIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('fulfillIntent', [$params], GoogleCloudDialogflowCxV3FulfillIntentResponse::class);
}
/**
* Returns preliminary intent match results, doesn't change the session status.
* (sessions.matchIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
* @param GoogleCloudDialogflowCxV3MatchIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3MatchIntentResponse
* @throws \Google\Service\Exception
*/
public function matchIntent($session, GoogleCloudDialogflowCxV3MatchIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('matchIntent', [$params], GoogleCloudDialogflowCxV3MatchIntentResponse::class);
}
/**
* Processes a natural language query and returns structured, actionable data as
* a result through server-side streaming. Server-side streaming allows
* Dialogflow to send [partial responses](https://cloud.google.com/dialogflow/cx
* /docs/concept/fulfillment#partial-response) earlier in a single request.
* (sessions.serverStreamingDetectIntent)
*
* @param string $session Required. The name of the session this query is sent
* to. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment. It's up to the API
* caller to choose an appropriate `Session ID`. It can be a random number or
* some type of session identifiers (preferably hashed). The length of the
* `Session ID` must not exceed 36 characters. For more information, see the
* [sessions
* guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). Note:
* Always use agent versions for production traffic. See [Versions and
* environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
* @param GoogleCloudDialogflowCxV3DetectIntentRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3DetectIntentResponse
* @throws \Google\Service\Exception
*/
public function serverStreamingDetectIntent($session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('serverStreamingDetectIntent', [$params], GoogleCloudDialogflowCxV3DetectIntentResponse::class);
}
/**
* Updates the feedback received from the user for a single turn of the bot
* response. (sessions.submitAnswerFeedback)
*
* @param string $session Required. The name of the session the feedback was
* sent to.
* @param GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3AnswerFeedback
* @throws \Google\Service\Exception
*/
public function submitAnswerFeedback($session, GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest $postBody, $optParams = [])
{
$params = ['session' => $session, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('submitAnswerFeedback', [$params], GoogleCloudDialogflowCxV3AnswerFeedback::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsSessions::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsSessions');

View File

@@ -0,0 +1,132 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3SessionEntityType;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "entityTypes" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $entityTypes = $dialogflowService->projects_locations_agents_sessions_entityTypes;
* </code>
*/
class ProjectsLocationsAgentsSessionsEntityTypes extends \Google\Service\Resource
{
/**
* Creates a session entity type. (entityTypes.create)
*
* @param string $parent Required. The session to create a session entity type
* for. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment.
* @param GoogleCloudDialogflowCxV3SessionEntityType $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3SessionEntityType
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3SessionEntityType $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3SessionEntityType::class);
}
/**
* Deletes the specified session entity type. (entityTypes.delete)
*
* @param string $name Required. The name of the session entity type to delete.
* Format: `projects//locations//agents//sessions//entityTypes/` or
* `projects//locations//agents//environments//sessions//entityTypes/`. If
* `Environment ID` is not specified, we assume default 'draft' environment.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified session entity type. (entityTypes.get)
*
* @param string $name Required. The name of the session entity type. Format:
* `projects//locations//agents//sessions//entityTypes/` or
* `projects//locations//agents//environments//sessions//entityTypes/`. If
* `Environment ID` is not specified, we assume default 'draft' environment.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3SessionEntityType
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3SessionEntityType::class);
}
/**
* Returns the list of all session entity types in the specified session.
* (entityTypes.listProjectsLocationsAgentsSessionsEntityTypes)
*
* @param string $parent Required. The session to list all session entity types
* from. Format: `projects//locations//agents//sessions/` or
* `projects//locations//agents//environments//sessions/`. If `Environment ID`
* is not specified, we assume default 'draft' environment.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsSessionsEntityTypes($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse::class);
}
/**
* Updates the specified session entity type. (entityTypes.patch)
*
* @param string $name Required. The unique identifier of the session entity
* type. Format: `projects//locations//agents//sessions//entityTypes/` or
* `projects//locations//agents//environments//sessions//entityTypes/`. If
* `Environment ID` is not specified, we assume default 'draft' environment.
* @param GoogleCloudDialogflowCxV3SessionEntityType $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The mask to control which fields get updated.
* @return GoogleCloudDialogflowCxV3SessionEntityType
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3SessionEntityType $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3SessionEntityType::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsSessionsEntityTypes::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsSessionsEntityTypes');

View File

@@ -0,0 +1,237 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3BatchRunTestCasesRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3CalculateCoverageResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ExportTestCasesRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ImportTestCasesRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListTestCasesResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3RunTestCaseRequest;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3TestCase;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "testCases" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $testCases = $dialogflowService->projects_locations_agents_testCases;
* </code>
*/
class ProjectsLocationsAgentsTestCases extends \Google\Service\Resource
{
/**
* Batch deletes test cases. (testCases.batchDelete)
*
* @param string $parent Required. The agent to delete test cases from. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function batchDelete($parent, GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('batchDelete', [$params], GoogleProtobufEmpty::class);
}
/**
* Kicks off a batch run of test cases. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: BatchRunTestCasesMetadata - `response`:
* BatchRunTestCasesResponse (testCases.batchRun)
*
* @param string $parent Required. Agent name. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3BatchRunTestCasesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function batchRun($parent, GoogleCloudDialogflowCxV3BatchRunTestCasesRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('batchRun', [$params], GoogleLongrunningOperation::class);
}
/**
* Calculates the test coverage for an agent. (testCases.calculateCoverage)
*
* @param string $agent Required. The agent to calculate coverage for. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param string type Required. The type of coverage requested.
* @return GoogleCloudDialogflowCxV3CalculateCoverageResponse
* @throws \Google\Service\Exception
*/
public function calculateCoverage($agent, $optParams = [])
{
$params = ['agent' => $agent];
$params = array_merge($params, $optParams);
return $this->call('calculateCoverage', [$params], GoogleCloudDialogflowCxV3CalculateCoverageResponse::class);
}
/**
* Creates a test case for the given agent. (testCases.create)
*
* @param string $parent Required. The agent to create the test case for.
* Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3TestCase $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3TestCase
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3TestCase $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3TestCase::class);
}
/**
* Exports the test cases under the agent to a Cloud Storage bucket or a local
* file. Filter can be applied to export a subset of test cases. This method is
* a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: ExportTestCasesMetadata - `response`:
* ExportTestCasesResponse (testCases.export)
*
* @param string $parent Required. The agent where to export test cases from.
* Format: `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ExportTestCasesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function export($parent, GoogleCloudDialogflowCxV3ExportTestCasesRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('export', [$params], GoogleLongrunningOperation::class);
}
/**
* Gets a test case. (testCases.get)
*
* @param string $name Required. The name of the testcase. Format:
* `projects//locations//agents//testCases/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3TestCase
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3TestCase::class);
}
/**
* Imports the test cases from a Cloud Storage bucket or a local file. It always
* creates new test cases and won't overwrite any existing ones. The provided ID
* in the imported test case is neglected. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: ImportTestCasesMetadata - `response`:
* ImportTestCasesResponse (testCases.import)
*
* @param string $parent Required. The agent to import test cases to. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3ImportTestCasesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function import($parent, GoogleCloudDialogflowCxV3ImportTestCasesRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], GoogleLongrunningOperation::class);
}
/**
* Fetches a list of test cases for a given agent.
* (testCases.listProjectsLocationsAgentsTestCases)
*
* @param string $parent Required. The agent to list all pages for. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 20. Note that when TestCaseView = FULL, the maximum page
* size allowed is 20. When TestCaseView = BASIC, the maximum page size allowed
* is 500.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @opt_param string view Specifies whether response should include all fields
* or just the metadata.
* @return GoogleCloudDialogflowCxV3ListTestCasesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsTestCases($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListTestCasesResponse::class);
}
/**
* Updates the specified test case. (testCases.patch)
*
* @param string $name The unique identifier of the test case.
* TestCases.CreateTestCase will populate the name automatically. Otherwise use
* format: `projects//locations//agents//testCases/`.
* @param GoogleCloudDialogflowCxV3TestCase $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. The mask to specify which fields
* should be updated. The `creationTime` and `lastTestResult` cannot be updated.
* @return GoogleCloudDialogflowCxV3TestCase
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3TestCase $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3TestCase::class);
}
/**
* Kicks off a test case run. This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-
* operation). The returned `Operation` type has the following method-specific
* fields: - `metadata`: RunTestCaseMetadata - `response`: RunTestCaseResponse
* (testCases.run)
*
* @param string $name Required. Format of test case name to run:
* `projects//locations//agents//testCases/`.
* @param GoogleCloudDialogflowCxV3RunTestCaseRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function run($name, GoogleCloudDialogflowCxV3RunTestCaseRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('run', [$params], GoogleLongrunningOperation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsTestCases::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsTestCases');

View File

@@ -0,0 +1,86 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListTestCaseResultsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3TestCaseResult;
/**
* The "results" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $results = $dialogflowService->projects_locations_agents_testCases_results;
* </code>
*/
class ProjectsLocationsAgentsTestCasesResults extends \Google\Service\Resource
{
/**
* Gets a test case result. (results.get)
*
* @param string $name Required. The name of the testcase. Format:
* `projects//locations//agents//testCases//results/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3TestCaseResult
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3TestCaseResult::class);
}
/**
* Fetches the list of run results for the given test case. A maximum of 100
* results are kept for each test case.
* (results.listProjectsLocationsAgentsTestCasesResults)
*
* @param string $parent Required. The test case to list results for. Format:
* `projects//locations//agents//testCases/`. Specify a `-` as a wildcard for
* TestCase ID to list results across multiple test cases.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The filter expression used to filter test case
* results. See [API Filtering](https://aip.dev/160). The expression is case
* insensitive. Only 'AND' is supported for logical operators. The supported
* syntax is listed below in detail: [AND ] ... [AND latest] The supported
* fields and operators are: field operator `environment` `=`, `IN` (Use value
* `draft` for draft environment) `test_time` `>`, `<` `latest` only returns the
* latest test result in all results for each test case. Examples: *
* "environment=draft AND latest" matches the latest test result for each test
* case in the draft environment. * "environment IN (e1,e2)" matches any test
* case results with an environment resource name of either "e1" or "e2". *
* "test_time > 1602540713" matches any test case results with test time later
* than a unix timestamp in seconds 1602540713.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsTestCasesResults($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListTestCaseResultsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsTestCasesResults::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsTestCasesResults');

View File

@@ -0,0 +1,178 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3TransitionRouteGroup;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "transitionRouteGroups" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $transitionRouteGroups = $dialogflowService->projects_locations_agents_transitionRouteGroups;
* </code>
*/
class ProjectsLocationsAgentsTransitionRouteGroups extends \Google\Service\Resource
{
/**
* Creates an TransitionRouteGroup in the specified flow. Note: You should
* always train a flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (transitionRouteGroups.create)
*
* @param string $parent Required. The flow to create an TransitionRouteGroup
* for. Format: `projects//locations//agents//flows/` or
* `projects//locations//agents/` for agent-level groups.
* @param GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `TransitionRouteGroup`: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3TransitionRouteGroup
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
}
/**
* Deletes the specified TransitionRouteGroup. Note: You should always train a
* flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (transitionRouteGroups.delete)
*
* @param string $name Required. The name of the TransitionRouteGroup to delete.
* Format: `projects//locations//agents//flows//transitionRouteGroups/` or
* `projects//locations//agents//transitionRouteGroups/`.
* @param array $optParams Optional parameters.
*
* @opt_param bool force This field has no effect for transition route group
* that no page is using. If the transition route group is referenced by any
* page: * If `force` is set to false, an error will be returned with message
* indicating pages that reference the transition route group. * If `force` is
* set to true, Dialogflow will remove the transition route group, as well as
* any reference to it.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified TransitionRouteGroup. (transitionRouteGroups.get)
*
* @param string $name Required. The name of the TransitionRouteGroup. Format:
* `projects//locations//agents//flows//transitionRouteGroups/` or
* `projects//locations//agents//transitionRouteGroups/`.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to retrieve the transition route
* group for. The following fields are language dependent: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @return GoogleCloudDialogflowCxV3TransitionRouteGroup
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
}
/**
* Returns the list of all transition route groups in the specified flow.
* (transitionRouteGroups.listProjectsLocationsAgentsTransitionRouteGroups)
*
* @param string $parent Required. The flow to list all transition route groups
* for. Format: `projects//locations//agents//flows/` or
* `projects//locations//agents/.
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to list transition route groups
* for. The following fields are language dependent: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsTransitionRouteGroups($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse::class);
}
/**
* Updates the specified TransitionRouteGroup. Note: You should always train a
* flow prior to sending it queries. See the [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
* (transitionRouteGroups.patch)
*
* @param string $name The unique identifier of the transition route group.
* TransitionRouteGroups.CreateTransitionRouteGroup populates the name
* automatically. Format:
* `projects//locations//agents//flows//transitionRouteGroups/` .
* @param GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language of the following fields in
* `TransitionRouteGroup`: *
* `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` * `Tran
* sitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` If
* not specified, the agent's default language is used. [Many
* languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
* are supported. Note: languages must be enabled in the agent before they can
* be used.
* @opt_param string updateMask The mask to control which fields get updated.
* @return GoogleCloudDialogflowCxV3TransitionRouteGroup
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3TransitionRouteGroup $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3TransitionRouteGroup::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsTransitionRouteGroups::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsTransitionRouteGroups');

View File

@@ -0,0 +1,131 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListWebhooksResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3Webhook;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "webhooks" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $webhooks = $dialogflowService->projects_locations_agents_webhooks;
* </code>
*/
class ProjectsLocationsAgentsWebhooks extends \Google\Service\Resource
{
/**
* Creates a webhook in the specified agent. (webhooks.create)
*
* @param string $parent Required. The agent to create a webhook for. Format:
* `projects//locations//agents/`.
* @param GoogleCloudDialogflowCxV3Webhook $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Webhook
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3Webhook $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3Webhook::class);
}
/**
* Deletes the specified webhook. (webhooks.delete)
*
* @param string $name Required. The name of the webhook to delete. Format:
* `projects//locations//agents//webhooks/`.
* @param array $optParams Optional parameters.
*
* @opt_param bool force This field has no effect for webhook not being used.
* For webhooks that are used by pages/flows/transition route groups: * If
* `force` is set to false, an error will be returned with message indicating
* the referenced resources. * If `force` is set to true, Dialogflow will remove
* the webhook, as well as any references to the webhook (i.e. Webhook and tagin
* fulfillments that point to this webhook will be removed).
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified webhook. (webhooks.get)
*
* @param string $name Required. The name of the webhook. Format:
* `projects//locations//agents//webhooks/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3Webhook
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3Webhook::class);
}
/**
* Returns the list of all webhooks in the specified agent.
* (webhooks.listProjectsLocationsAgentsWebhooks)
*
* @param string $parent Required. The agent to list all webhooks for. Format:
* `projects//locations//agents/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 100 and at most 1000.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListWebhooksResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAgentsWebhooks($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListWebhooksResponse::class);
}
/**
* Updates the specified webhook. (webhooks.patch)
*
* @param string $name The unique identifier of the webhook. Required for the
* Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name
* automatically. Format: `projects//locations//agents//webhooks/`.
* @param GoogleCloudDialogflowCxV3Webhook $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The mask to control which fields get updated. If
* the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3Webhook
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3Webhook $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3Webhook::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAgentsWebhooks::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsWebhooks');

View File

@@ -0,0 +1,95 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleLongrunningListOperationsResponse;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $operations = $dialogflowService->projects_locations_operations;
* </code>
*/
class ProjectsLocationsOperations extends \Google\Service\Resource
{
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not guaranteed.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation, the
* operation is not deleted; instead, it becomes an operation with an
* Operation.error value with a google.rpc.Status.code of `1`, corresponding to
* `Code.CANCELLED`. (operations.cancel)
*
* @param string $name The name of the operation resource to be cancelled.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleLongrunningOperation::class);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* (operations.listProjectsLocationsOperations)
*
* @param string $name The name of the operation's parent resource.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The standard list filter.
* @opt_param int pageSize The standard list page size.
* @opt_param string pageToken The standard list page token.
* @return GoogleLongrunningListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsOperations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsOperations::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsOperations');

View File

@@ -0,0 +1,126 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListSecuritySettingsResponse;
use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3SecuritySettings;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "securitySettings" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $securitySettings = $dialogflowService->projects_locations_securitySettings;
* </code>
*/
class ProjectsLocationsSecuritySettings extends \Google\Service\Resource
{
/**
* Create security settings in the specified location. (securitySettings.create)
*
* @param string $parent Required. The location to create an SecuritySettings
* for. Format: `projects//locations/`.
* @param GoogleCloudDialogflowCxV3SecuritySettings $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3SecuritySettings
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudDialogflowCxV3SecuritySettings $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudDialogflowCxV3SecuritySettings::class);
}
/**
* Deletes the specified SecuritySettings. (securitySettings.delete)
*
* @param string $name Required. The name of the SecuritySettings to delete.
* Format: `projects//locations//securitySettings/`.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Retrieves the specified SecuritySettings. The returned settings may be stale
* by up to 1 minute. (securitySettings.get)
*
* @param string $name Required. Resource name of the settings. Format:
* `projects//locations//securitySettings/`.
* @param array $optParams Optional parameters.
* @return GoogleCloudDialogflowCxV3SecuritySettings
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudDialogflowCxV3SecuritySettings::class);
}
/**
* Returns the list of all security settings in the specified location.
* (securitySettings.listProjectsLocationsSecuritySettings)
*
* @param string $parent Required. The location to list all security settings
* for. Format: `projects//locations/`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return in a single
* page. By default 20 and at most 100.
* @opt_param string pageToken The next_page_token value returned from a
* previous list request.
* @return GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsSecuritySettings($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListSecuritySettingsResponse::class);
}
/**
* Updates the specified SecuritySettings. (securitySettings.patch)
*
* @param string $name Resource name of the settings. Required for the
* SecuritySettingsService.UpdateSecuritySettings method.
* SecuritySettingsService.CreateSecuritySettings populates the name
* automatically. Format: `projects//locations//securitySettings/`.
* @param GoogleCloudDialogflowCxV3SecuritySettings $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. The mask to control which fields get
* updated. If the mask is not present, all fields will be updated.
* @return GoogleCloudDialogflowCxV3SecuritySettings
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudDialogflowCxV3SecuritySettings $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudDialogflowCxV3SecuritySettings::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsSecuritySettings::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsSecuritySettings');

View File

@@ -0,0 +1,95 @@
<?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.
*/
namespace Google\Service\Dialogflow\Resource;
use Google\Service\Dialogflow\GoogleLongrunningListOperationsResponse;
use Google\Service\Dialogflow\GoogleLongrunningOperation;
use Google\Service\Dialogflow\GoogleProtobufEmpty;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $dialogflowService = new Google\Service\Dialogflow(...);
* $operations = $dialogflowService->projects_operations;
* </code>
*/
class ProjectsOperations extends \Google\Service\Resource
{
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not guaranteed.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation, the
* operation is not deleted; instead, it becomes an operation with an
* Operation.error value with a google.rpc.Status.code of `1`, corresponding to
* `Code.CANCELLED`. (operations.cancel)
*
* @param string $name The name of the operation resource to be cancelled.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleLongrunningOperation::class);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* (operations.listProjectsOperations)
*
* @param string $name The name of the operation's parent resource.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The standard list filter.
* @opt_param int pageSize The standard list page size.
* @opt_param string pageToken The standard list page token.
* @return GoogleLongrunningListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsOperations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsOperations::class, 'Google_Service_Dialogflow_Resource_ProjectsOperations');