diff --git a/Dialogflow/metadata/V2/Agent.php b/Dialogflow/metadata/V2/Agent.php index 578e828cb086..4a07bdf7b1d2 100644 Binary files a/Dialogflow/metadata/V2/Agent.php and b/Dialogflow/metadata/V2/Agent.php differ diff --git a/Dialogflow/metadata/V2/AudioConfig.php b/Dialogflow/metadata/V2/AudioConfig.php index 2731adb42d26..e2b2c7ab811d 100644 Binary files a/Dialogflow/metadata/V2/AudioConfig.php and b/Dialogflow/metadata/V2/AudioConfig.php differ diff --git a/Dialogflow/metadata/V2/Context.php b/Dialogflow/metadata/V2/Context.php index e24ba7316fec..cabe3970db3c 100644 --- a/Dialogflow/metadata/V2/Context.php +++ b/Dialogflow/metadata/V2/Context.php @@ -23,7 +23,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Struct::initOnce(); $pool->internalAddGeneratedFile( ' -" +" (google/cloud/dialogflow/v2/context.protogoogle.cloud.dialogflow.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/struct.proto" Context name ( BA @@ -60,8 +60,8 @@ public static function initOnce() { CreateContext0.google.cloud.dialogflow.v2.CreateContextRequest#.google.cloud.dialogflow.v2.Context"Aparent,context"1/v2/{parent=projects/*/agent/sessions/*}/contexts:contextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:contextZH"=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts:contextZ_"T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:context UpdateContext0.google.cloud.dialogflow.v2.UpdateContextRequest#.google.cloud.dialogflow.v2.Context"Acontext,update_mask29/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:contextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:contextZP2E/v2/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:contextZg2\\/v2/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:context DeleteContext0.google.cloud.dialogflow.v2.DeleteContextRequest.google.protobuf.Empty"Aname*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}Z?*=/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}ZV*T/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*} -DeleteAllContexts4.google.cloud.dialogflow.v2.DeleteAllContextsRequest.google.protobuf.Empty"Aparent*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?*=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZV*T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsxAdialogflow.googleapis.comAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB -com.google.cloud.dialogflow.v2B ContextProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' +DeleteAllContexts4.google.cloud.dialogflow.v2.DeleteAllContextsRequest.google.protobuf.Empty"Aparent*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZ?*=/v2/{parent=projects/*/locations/*/agent/sessions/*}/contextsZV*T/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contextsxAdialogflow.googleapis.comAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB +com.google.cloud.dialogflow.v2B ContextProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/metadata/V2/ConversationDataset.php b/Dialogflow/metadata/V2/ConversationDataset.php index 647e421711bd..1d9e200b7883 100644 Binary files a/Dialogflow/metadata/V2/ConversationDataset.php and b/Dialogflow/metadata/V2/ConversationDataset.php differ diff --git a/Dialogflow/metadata/V2/ConversationEvent.php b/Dialogflow/metadata/V2/ConversationEvent.php index 706dd9507cb4..eb5bf420edb2 100644 Binary files a/Dialogflow/metadata/V2/ConversationEvent.php and b/Dialogflow/metadata/V2/ConversationEvent.php differ diff --git a/Dialogflow/metadata/V2/ConversationModel.php b/Dialogflow/metadata/V2/ConversationModel.php index 1754064115e4..7bc132ad5eec 100644 Binary files a/Dialogflow/metadata/V2/ConversationModel.php and b/Dialogflow/metadata/V2/ConversationModel.php differ diff --git a/Dialogflow/metadata/V2/ConversationProfile.php b/Dialogflow/metadata/V2/ConversationProfile.php index 5c981767f87e..0ac573ccb2d3 100644 Binary files a/Dialogflow/metadata/V2/ConversationProfile.php and b/Dialogflow/metadata/V2/ConversationProfile.php differ diff --git a/Dialogflow/metadata/V2/EntityType.php b/Dialogflow/metadata/V2/EntityType.php index 9f17127dc618..4c6b3d2b6e23 100644 Binary files a/Dialogflow/metadata/V2/EntityType.php and b/Dialogflow/metadata/V2/EntityType.php differ diff --git a/Dialogflow/metadata/V2/Environment.php b/Dialogflow/metadata/V2/Environment.php index fbb3534550de..6f2ebb1876a3 100644 Binary files a/Dialogflow/metadata/V2/Environment.php and b/Dialogflow/metadata/V2/Environment.php differ diff --git a/Dialogflow/metadata/V2/Fulfillment.php b/Dialogflow/metadata/V2/Fulfillment.php index a5475852da0f..0fe45f23b97f 100644 Binary files a/Dialogflow/metadata/V2/Fulfillment.php and b/Dialogflow/metadata/V2/Fulfillment.php differ diff --git a/Dialogflow/metadata/V2/Gcs.php b/Dialogflow/metadata/V2/Gcs.php index c3f6cd0febbe..17288a54722e 100644 --- a/Dialogflow/metadata/V2/Gcs.php +++ b/Dialogflow/metadata/V2/Gcs.php @@ -17,14 +17,14 @@ public static function initOnce() { \GPBMetadata\Google\Api\FieldBehavior::initOnce(); $pool->internalAddGeneratedFile( ' - + $google/cloud/dialogflow/v2/gcs.protogoogle.cloud.dialogflow.v2" GcsSources uris ( BA" GcsDestination -uri ( B -com.google.cloud.dialogflow.v2BGcsProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' +uri ( B +com.google.cloud.dialogflow.v2BGcsProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php b/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php index 3f2efe820e73..b3a1cbe47c9c 100644 --- a/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php +++ b/Dialogflow/metadata/V2/HumanAgentAssistantEvent.php @@ -17,13 +17,13 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); $pool->internalAddGeneratedFile( ' - + cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' +suggestion_results ( 2,.google.cloud.dialogflow.v2.SuggestionResultB +com.google.cloud.dialogflow.v2BHumanAgentAssistantEventProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/metadata/V2/Intent.php b/Dialogflow/metadata/V2/Intent.php index 72082f6ab810..5f44d7ccb706 100644 Binary files a/Dialogflow/metadata/V2/Intent.php and b/Dialogflow/metadata/V2/Intent.php differ diff --git a/Dialogflow/metadata/V2/Participant.php b/Dialogflow/metadata/V2/Participant.php index 7e7cb3ba934f..49fee139e7b2 100644 Binary files a/Dialogflow/metadata/V2/Participant.php and b/Dialogflow/metadata/V2/Participant.php differ diff --git a/Dialogflow/metadata/V2/SessionEntityType.php b/Dialogflow/metadata/V2/SessionEntityType.php index 3c569ba339e1..8df38c138ace 100644 Binary files a/Dialogflow/metadata/V2/SessionEntityType.php and b/Dialogflow/metadata/V2/SessionEntityType.php differ diff --git a/Dialogflow/metadata/V2/ValidationResult.php b/Dialogflow/metadata/V2/ValidationResult.php index 9baa2f455897..481fcd077310 100644 Binary files a/Dialogflow/metadata/V2/ValidationResult.php and b/Dialogflow/metadata/V2/ValidationResult.php differ diff --git a/Dialogflow/metadata/V2/Version.php b/Dialogflow/metadata/V2/Version.php index 3ac2a0b00de5..135ff8bbd6b5 100644 Binary files a/Dialogflow/metadata/V2/Version.php and b/Dialogflow/metadata/V2/Version.php differ diff --git a/Dialogflow/metadata/V2/Webhook.php b/Dialogflow/metadata/V2/Webhook.php index b227dbf2f949..df90db71f8e4 100644 --- a/Dialogflow/metadata/V2/Webhook.php +++ b/Dialogflow/metadata/V2/Webhook.php @@ -21,7 +21,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Struct::initOnce(); $pool->internalAddGeneratedFile( ' - + (google/cloud/dialogflow/v2/webhook.protogoogle.cloud.dialogflow.v2\'google/cloud/dialogflow/v2/intent.proto(google/cloud/dialogflow/v2/session.proto4google/cloud/dialogflow/v2/session_entity_type.protogoogle/protobuf/struct.proto" WebhookRequest session (  @@ -40,8 +40,8 @@ public static function initOnce() { OriginalDetectIntentRequest source (  version ( ( -payload ( 2.google.protobuf.StructB -com.google.cloud.dialogflow.v2B WebhookProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' +payload ( 2.google.protobuf.StructB +com.google.cloud.dialogflow.v2B WebhookProtoPZ>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpbDFGoogle.Cloud.Dialogflow.V2bproto3' , true); static::$is_initialized = true; diff --git a/Dialogflow/samples/V2/GeneratorsClient/get_generator.php b/Dialogflow/samples/V2/GeneratorsClient/get_generator.php index d532ba546bd4..1a8efe8f69a0 100644 --- a/Dialogflow/samples/V2/GeneratorsClient/get_generator.php +++ b/Dialogflow/samples/V2/GeneratorsClient/get_generator.php @@ -32,7 +32,7 @@ * Retrieves a generator. * * @param string $formattedName The generator resource name to retrieve. Format: - * `projects//locations/`/generators/` + * `projects//locations//generators/` * Please see {@see GeneratorsClient::generatorName()} for help formatting this field. */ function get_generator_sample(string $formattedName): void diff --git a/Dialogflow/src/V2/Client/ConversationProfilesClient.php b/Dialogflow/src/V2/Client/ConversationProfilesClient.php index 30bae2237aaf..ddacec82f7d2 100644 --- a/Dialogflow/src/V2/Client/ConversationProfilesClient.php +++ b/Dialogflow/src/V2/Client/ConversationProfilesClient.php @@ -295,6 +295,25 @@ public static function locationName(string $project, string $location): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName(string $project, string $location, string $phraseSet): string + { + return self::getPathTemplate('phraseSet')->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -502,6 +521,7 @@ public static function projectLocationKnowledgeBaseDocumentName(string $project, * - generator: projects/{project}/locations/{location}/generators/{generator} * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} * - location: projects/{project}/locations/{location} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - project: projects/{project} * - projectAgent: projects/{project}/agent * - projectConversationModel: projects/{project}/conversationModels/{conversation_model} diff --git a/Dialogflow/src/V2/Client/ConversationsClient.php b/Dialogflow/src/V2/Client/ConversationsClient.php index 079279f65b71..ca6086877882 100644 --- a/Dialogflow/src/V2/Client/ConversationsClient.php +++ b/Dialogflow/src/V2/Client/ConversationsClient.php @@ -303,6 +303,25 @@ public static function messageName(string $project, string $conversation, string ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName(string $project, string $location, string $phraseSet): string + { + return self::getPathTemplate('phraseSet')->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -588,6 +607,7 @@ public static function projectLocationKnowledgeBaseDocumentName(string $project, * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} * - location: projects/{project}/locations/{location} * - message: projects/{project}/conversations/{conversation}/messages/{message} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - project: projects/{project} * - projectAgent: projects/{project}/agent * - projectConversation: projects/{project}/conversations/{conversation} diff --git a/Dialogflow/src/V2/Client/ParticipantsClient.php b/Dialogflow/src/V2/Client/ParticipantsClient.php index 1c7382efb4a4..59d2c416aac6 100644 --- a/Dialogflow/src/V2/Client/ParticipantsClient.php +++ b/Dialogflow/src/V2/Client/ParticipantsClient.php @@ -200,6 +200,25 @@ public static function participantName(string $project, string $conversation, st ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName(string $project, string $location, string $phraseSet): string + { + return self::getPathTemplate('phraseSet')->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_conversation resource. @@ -616,6 +635,7 @@ public static function sessionEntityTypeName(string $project, string $session, s * - conversation: projects/{project}/conversations/{conversation} * - message: projects/{project}/conversations/{conversation}/messages/{message} * - participant: projects/{project}/conversations/{conversation}/participants/{participant} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - projectConversation: projects/{project}/conversations/{conversation} * - projectConversationMessage: projects/{project}/conversations/{conversation}/messages/{message} * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} diff --git a/Dialogflow/src/V2/Client/SessionsClient.php b/Dialogflow/src/V2/Client/SessionsClient.php index 33223c3dfd05..bb5814b84240 100644 --- a/Dialogflow/src/V2/Client/SessionsClient.php +++ b/Dialogflow/src/V2/Client/SessionsClient.php @@ -127,6 +127,25 @@ public static function contextName(string $project, string $session, string $con ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName(string $project, string $location, string $phraseSet): string + { + return self::getPathTemplate('phraseSet')->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_environment_user_session resource. @@ -424,6 +443,7 @@ public static function sessionEntityTypeName(string $project, string $session, s * The following name formats are supported: * Template: Pattern * - context: projects/{project}/agent/sessions/{session}/contexts/{context} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} * - projectEnvironmentUserSessionContext: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context} * - projectEnvironmentUserSessionEntityType: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type} diff --git a/Dialogflow/src/V2/CreateGeneratorRequest.php b/Dialogflow/src/V2/CreateGeneratorRequest.php index 94b5e78468ed..932b0e2dff24 100644 --- a/Dialogflow/src/V2/CreateGeneratorRequest.php +++ b/Dialogflow/src/V2/CreateGeneratorRequest.php @@ -31,10 +31,10 @@ class CreateGeneratorRequest extends \Google\Protobuf\Internal\Message /** * Optional. The ID to use for the generator, which will become the final * component of the generator's resource name. - * The generator ID must be compliant with the regression fomula + * The generator ID must be compliant with the regression formula * `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64]. * If the field is not provided, an Id will be auto-generated. - * If the field is provided, the caller is resposible for + * If the field is provided, the caller is responsible for * 1. the uniqueness of the ID, otherwise the request will be rejected. * 2. the consistency for whether to use custom ID or not under a project to * better ensure uniqueness. @@ -51,10 +51,10 @@ class CreateGeneratorRequest extends \Google\Protobuf\Internal\Message * @param string $generatorId Optional. The ID to use for the generator, which will become the final * component of the generator's resource name. * - * The generator ID must be compliant with the regression fomula + * The generator ID must be compliant with the regression formula * `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64]. * If the field is not provided, an Id will be auto-generated. - * If the field is provided, the caller is resposible for + * If the field is provided, the caller is responsible for * 1. the uniqueness of the ID, otherwise the request will be rejected. * 2. the consistency for whether to use custom ID or not under a project to * better ensure uniqueness. @@ -85,10 +85,10 @@ public static function build(string $parent, \Google\Cloud\Dialogflow\V2\Generat * @type string $generator_id * Optional. The ID to use for the generator, which will become the final * component of the generator's resource name. - * The generator ID must be compliant with the regression fomula + * The generator ID must be compliant with the regression formula * `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64]. * If the field is not provided, an Id will be auto-generated. - * If the field is provided, the caller is resposible for + * If the field is provided, the caller is responsible for * 1. the uniqueness of the ID, otherwise the request will be rejected. * 2. the consistency for whether to use custom ID or not under a project to * better ensure uniqueness. @@ -166,10 +166,10 @@ public function setGenerator($var) /** * Optional. The ID to use for the generator, which will become the final * component of the generator's resource name. - * The generator ID must be compliant with the regression fomula + * The generator ID must be compliant with the regression formula * `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64]. * If the field is not provided, an Id will be auto-generated. - * If the field is provided, the caller is resposible for + * If the field is provided, the caller is responsible for * 1. the uniqueness of the ID, otherwise the request will be rejected. * 2. the consistency for whether to use custom ID or not under a project to * better ensure uniqueness. @@ -185,10 +185,10 @@ public function getGeneratorId() /** * Optional. The ID to use for the generator, which will become the final * component of the generator's resource name. - * The generator ID must be compliant with the regression fomula + * The generator ID must be compliant with the regression formula * `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64]. * If the field is not provided, an Id will be auto-generated. - * If the field is provided, the caller is resposible for + * If the field is provided, the caller is responsible for * 1. the uniqueness of the ID, otherwise the request will be rejected. * 2. the consistency for whether to use custom ID or not under a project to * better ensure uniqueness. diff --git a/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php b/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php index 22f03aa1a6d8..a1054ff8ea48 100644 --- a/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php @@ -154,6 +154,8 @@ class ConversationProfilesGapicClient private static $locationNameTemplate; + private static $phraseSetNameTemplate; + private static $projectNameTemplate; private static $projectAgentNameTemplate; @@ -271,6 +273,15 @@ private static function getLocationNameTemplate() return self::$locationNameTemplate; } + private static function getPhraseSetNameTemplate() + { + if (self::$phraseSetNameTemplate == null) { + self::$phraseSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/phraseSets/{phrase_set}'); + } + + return self::$phraseSetNameTemplate; + } + private static function getProjectNameTemplate() { if (self::$projectNameTemplate == null) { @@ -382,6 +393,7 @@ private static function getPathTemplateMap() 'generator' => self::getGeneratorNameTemplate(), 'knowledgeBase' => self::getKnowledgeBaseNameTemplate(), 'location' => self::getLocationNameTemplate(), + 'phraseSet' => self::getPhraseSetNameTemplate(), 'project' => self::getProjectNameTemplate(), 'projectAgent' => self::getProjectAgentNameTemplate(), 'projectConversationModel' => self::getProjectConversationModelNameTemplate(), @@ -541,6 +553,25 @@ public static function locationName($project, $location) ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName($project, $location, $phraseSet) + { + return self::getPhraseSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -748,6 +779,7 @@ public static function projectLocationKnowledgeBaseDocumentName($project, $locat * - generator: projects/{project}/locations/{location}/generators/{generator} * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} * - location: projects/{project}/locations/{location} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - project: projects/{project} * - projectAgent: projects/{project}/agent * - projectConversationModel: projects/{project}/conversationModels/{conversation_model} diff --git a/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php b/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php index 14aa905f7ec6..fcd99409ebe5 100644 --- a/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ConversationsGapicClient.php @@ -134,6 +134,8 @@ class ConversationsGapicClient private static $messageNameTemplate; + private static $phraseSetNameTemplate; + private static $projectNameTemplate; private static $projectAgentNameTemplate; @@ -275,6 +277,15 @@ private static function getMessageNameTemplate() return self::$messageNameTemplate; } + private static function getPhraseSetNameTemplate() + { + if (self::$phraseSetNameTemplate == null) { + self::$phraseSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/phraseSets/{phrase_set}'); + } + + return self::$phraseSetNameTemplate; + } + private static function getProjectNameTemplate() { if (self::$projectNameTemplate == null) { @@ -424,6 +435,7 @@ private static function getPathTemplateMap() 'knowledgeBase' => self::getKnowledgeBaseNameTemplate(), 'location' => self::getLocationNameTemplate(), 'message' => self::getMessageNameTemplate(), + 'phraseSet' => self::getPhraseSetNameTemplate(), 'project' => self::getProjectNameTemplate(), 'projectAgent' => self::getProjectAgentNameTemplate(), 'projectConversation' => self::getProjectConversationNameTemplate(), @@ -623,6 +635,25 @@ public static function messageName($project, $conversation, $message) ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName($project, $location, $phraseSet) + { + return self::getPhraseSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -908,6 +939,7 @@ public static function projectLocationKnowledgeBaseDocumentName($project, $locat * - knowledgeBase: projects/{project}/knowledgeBases/{knowledge_base} * - location: projects/{project}/locations/{location} * - message: projects/{project}/conversations/{conversation}/messages/{message} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - project: projects/{project} * - projectAgent: projects/{project}/agent * - projectConversation: projects/{project}/conversations/{conversation} diff --git a/Dialogflow/src/V2/Gapic/GeneratorsGapicClient.php b/Dialogflow/src/V2/Gapic/GeneratorsGapicClient.php index 939895b41154..6ed53b5cd0cf 100644 --- a/Dialogflow/src/V2/Gapic/GeneratorsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/GeneratorsGapicClient.php @@ -321,10 +321,10 @@ public function __construct(array $options = []) * Optional. The ID to use for the generator, which will become the final * component of the generator's resource name. * - * The generator ID must be compliant with the regression fomula + * The generator ID must be compliant with the regression formula * `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64]. * If the field is not provided, an Id will be auto-generated. - * If the field is provided, the caller is resposible for + * If the field is provided, the caller is responsible for * 1. the uniqueness of the ID, otherwise the request will be rejected. * 2. the consistency for whether to use custom ID or not under a project to * better ensure uniqueness. @@ -407,7 +407,7 @@ public function deleteGenerator($name, array $optionalArgs = []) * ``` * * @param string $name Required. The generator resource name to retrieve. Format: - * `projects//locations/`/generators/` + * `projects//locations//generators/` * @param array $optionalArgs { * Optional. * diff --git a/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php b/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php index 4aadd2f4d656..a539263dfacd 100644 --- a/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/ParticipantsGapicClient.php @@ -125,6 +125,8 @@ class ParticipantsGapicClient private static $participantNameTemplate; + private static $phraseSetNameTemplate; + private static $projectConversationNameTemplate; private static $projectConversationMessageNameTemplate; @@ -222,6 +224,15 @@ private static function getParticipantNameTemplate() return self::$participantNameTemplate; } + private static function getPhraseSetNameTemplate() + { + if (self::$phraseSetNameTemplate == null) { + self::$phraseSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/phraseSets/{phrase_set}'); + } + + return self::$phraseSetNameTemplate; + } + private static function getProjectConversationNameTemplate() { if (self::$projectConversationNameTemplate == null) { @@ -410,6 +421,7 @@ private static function getPathTemplateMap() 'conversation' => self::getConversationNameTemplate(), 'message' => self::getMessageNameTemplate(), 'participant' => self::getParticipantNameTemplate(), + 'phraseSet' => self::getPhraseSetNameTemplate(), 'projectConversation' => self::getProjectConversationNameTemplate(), 'projectConversationMessage' => self::getProjectConversationMessageNameTemplate(), 'projectConversationParticipant' => self::getProjectConversationParticipantNameTemplate(), @@ -510,6 +522,25 @@ public static function participantName($project, $conversation, $participant) ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName($project, $location, $phraseSet) + { + return self::getPhraseSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_conversation resource. @@ -926,6 +957,7 @@ public static function sessionEntityTypeName($project, $session, $entityType) * - conversation: projects/{project}/conversations/{conversation} * - message: projects/{project}/conversations/{conversation}/messages/{message} * - participant: projects/{project}/conversations/{conversation}/participants/{participant} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - projectConversation: projects/{project}/conversations/{conversation} * - projectConversationMessage: projects/{project}/conversations/{conversation}/messages/{message} * - projectConversationParticipant: projects/{project}/conversations/{conversation}/participants/{participant} diff --git a/Dialogflow/src/V2/Gapic/SessionsGapicClient.php b/Dialogflow/src/V2/Gapic/SessionsGapicClient.php index 83baeaee6490..1984ff0c8e0d 100644 --- a/Dialogflow/src/V2/Gapic/SessionsGapicClient.php +++ b/Dialogflow/src/V2/Gapic/SessionsGapicClient.php @@ -105,6 +105,8 @@ class SessionsGapicClient private static $contextNameTemplate; + private static $phraseSetNameTemplate; + private static $projectEnvironmentUserSessionNameTemplate; private static $projectEnvironmentUserSessionContextNameTemplate; @@ -163,6 +165,15 @@ private static function getContextNameTemplate() return self::$contextNameTemplate; } + private static function getPhraseSetNameTemplate() + { + if (self::$phraseSetNameTemplate == null) { + self::$phraseSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/phraseSets/{phrase_set}'); + } + + return self::$phraseSetNameTemplate; + } + private static function getProjectEnvironmentUserSessionNameTemplate() { if (self::$projectEnvironmentUserSessionNameTemplate == null) { @@ -294,6 +305,7 @@ private static function getPathTemplateMap() if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ 'context' => self::getContextNameTemplate(), + 'phraseSet' => self::getPhraseSetNameTemplate(), 'projectEnvironmentUserSession' => self::getProjectEnvironmentUserSessionNameTemplate(), 'projectEnvironmentUserSessionContext' => self::getProjectEnvironmentUserSessionContextNameTemplate(), 'projectEnvironmentUserSessionEntityType' => self::getProjectEnvironmentUserSessionEntityTypeNameTemplate(), @@ -333,6 +345,25 @@ public static function contextName($project, $session, $context) ]); } + /** + * Formats a string containing the fully-qualified path to represent a phrase_set + * resource. + * + * @param string $project + * @param string $location + * @param string $phraseSet + * + * @return string The formatted phrase_set resource. + */ + public static function phraseSetName($project, $location, $phraseSet) + { + return self::getPhraseSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'phrase_set' => $phraseSet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_environment_user_session resource. @@ -630,6 +661,7 @@ public static function sessionEntityTypeName($project, $session, $entityType) * The following name formats are supported: * Template: Pattern * - context: projects/{project}/agent/sessions/{session}/contexts/{context} + * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set} * - projectEnvironmentUserSession: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session} * - projectEnvironmentUserSessionContext: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context} * - projectEnvironmentUserSessionEntityType: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type} diff --git a/Dialogflow/src/V2/GetGeneratorRequest.php b/Dialogflow/src/V2/GetGeneratorRequest.php index 4b6fee82af5c..3616473a4c14 100644 --- a/Dialogflow/src/V2/GetGeneratorRequest.php +++ b/Dialogflow/src/V2/GetGeneratorRequest.php @@ -17,7 +17,7 @@ class GetGeneratorRequest extends \Google\Protobuf\Internal\Message { /** * Required. The generator resource name to retrieve. Format: - * `projects//locations/`/generators/` + * `projects//locations//generators/` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -25,7 +25,7 @@ class GetGeneratorRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The generator resource name to retrieve. Format: - * `projects//locations/`/generators/` + * `projects//locations//generators/` * Please see {@see GeneratorsClient::generatorName()} for help formatting this field. * * @return \Google\Cloud\Dialogflow\V2\GetGeneratorRequest @@ -46,7 +46,7 @@ public static function build(string $name): self * * @type string $name * Required. The generator resource name to retrieve. Format: - * `projects//locations/`/generators/` + * `projects//locations//generators/` * } */ public function __construct($data = NULL) { @@ -56,7 +56,7 @@ public function __construct($data = NULL) { /** * Required. The generator resource name to retrieve. Format: - * `projects//locations/`/generators/` + * `projects//locations//generators/` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -68,7 +68,7 @@ public function getName() /** * Required. The generator resource name to retrieve. Format: - * `projects//locations/`/generators/` + * `projects//locations//generators/` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php b/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php index 5b2cdb7f3dd6..3bb0c7cdc563 100644 --- a/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php +++ b/Dialogflow/src/V2/HumanAgentAssistantConfig/SuggestionQueryConfig.php @@ -56,6 +56,13 @@ class SuggestionQueryConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.Sections sections = 8 [(.google.api.field_behavior) = OPTIONAL]; */ private $sections = null; + /** + * Optional. The number of recent messages to include in the context. + * Supported features: KNOWLEDGE_ASSIST. + * + * Generated from protobuf field int32 context_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $context_size = 0; protected $query_source; /** @@ -97,6 +104,9 @@ class SuggestionQueryConfig extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\Sections $sections * Optional. The customized sections chosen to return when requesting a * summary of a conversation. + * @type int $context_size + * Optional. The number of recent messages to include in the context. + * Supported features: KNOWLEDGE_ASSIST. * } */ public function __construct($data = NULL) { @@ -359,6 +369,34 @@ public function setSections($var) return $this; } + /** + * Optional. The number of recent messages to include in the context. + * Supported features: KNOWLEDGE_ASSIST. + * + * Generated from protobuf field int32 context_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getContextSize() + { + return $this->context_size; + } + + /** + * Optional. The number of recent messages to include in the context. + * Supported features: KNOWLEDGE_ASSIST. + * + * Generated from protobuf field int32 context_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setContextSize($var) + { + GPBUtil::checkInt32($var); + $this->context_size = $var; + + return $this; + } + /** * @return string */ diff --git a/Dialogflow/src/V2/InputAudioConfig.php b/Dialogflow/src/V2/InputAudioConfig.php index b0f64e5de9a8..3bd47d3d07d7 100644 --- a/Dialogflow/src/V2/InputAudioConfig.php +++ b/Dialogflow/src/V2/InputAudioConfig.php @@ -121,6 +121,12 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool enable_automatic_punctuation = 17; */ private $enable_automatic_punctuation = false; + /** + * A collection of phrase set resources to use for speech adaptation. + * + * Generated from protobuf field repeated string phrase_sets = 20 [(.google.api.resource_reference) = { + */ + private $phrase_sets; /** * If `true`, the request will opt out for STT conformer model migration. * This field will be deprecated once force migration takes place in June @@ -198,6 +204,8 @@ class InputAudioConfig extends \Google\Protobuf\Internal\Message * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. * @type bool $enable_automatic_punctuation * Enable automatic punctuation option at the speech backend. + * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_sets + * A collection of phrase set resources to use for speech adaptation. * @type bool $opt_out_conformer_model_migration * If `true`, the request will opt out for STT conformer model migration. * This field will be deprecated once force migration takes place in June @@ -578,6 +586,32 @@ public function setEnableAutomaticPunctuation($var) return $this; } + /** + * A collection of phrase set resources to use for speech adaptation. + * + * Generated from protobuf field repeated string phrase_sets = 20 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhraseSets() + { + return $this->phrase_sets; + } + + /** + * A collection of phrase set resources to use for speech adaptation. + * + * Generated from protobuf field repeated string phrase_sets = 20 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhraseSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->phrase_sets = $arr; + + return $this; + } + /** * If `true`, the request will opt out for STT conformer model migration. * This field will be deprecated once force migration takes place in June diff --git a/Dialogflow/src/V2/KnowledgeAssistAnswer/KnowledgeAnswer/GenerativeSource/Snippet.php b/Dialogflow/src/V2/KnowledgeAssistAnswer/KnowledgeAnswer/GenerativeSource/Snippet.php index edecfe4a51d8..e81cf3e216d9 100644 --- a/Dialogflow/src/V2/KnowledgeAssistAnswer/KnowledgeAnswer/GenerativeSource/Snippet.php +++ b/Dialogflow/src/V2/KnowledgeAssistAnswer/KnowledgeAnswer/GenerativeSource/Snippet.php @@ -33,6 +33,12 @@ class Snippet extends \Google\Protobuf\Internal\Message * Generated from protobuf field string title = 4; */ private $title = ''; + /** + * Metadata of the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + */ + private $metadata = null; /** * Constructor. @@ -46,6 +52,8 @@ class Snippet extends \Google\Protobuf\Internal\Message * Text taken from that URI. * @type string $title * Title of the document. + * @type \Google\Protobuf\Struct $metadata + * Metadata of the document. * } */ public function __construct($data = NULL) { @@ -131,6 +139,42 @@ public function setTitle($var) return $this; } + /** + * Metadata of the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Metadata of the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + } diff --git a/Dialogflow/src/V2/SpeechToTextConfig.php b/Dialogflow/src/V2/SpeechToTextConfig.php index 4c58a9a5671e..5fe7768f89bd 100644 --- a/Dialogflow/src/V2/SpeechToTextConfig.php +++ b/Dialogflow/src/V2/SpeechToTextConfig.php @@ -55,6 +55,12 @@ class SpeechToTextConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field string model = 2; */ private $model = ''; + /** + * List of names of Cloud Speech phrase sets that are used for transcription. + * + * Generated from protobuf field repeated string phrase_sets = 4 [(.google.api.resource_reference) = { + */ + private $phrase_sets; /** * Audio encoding of the audio content to process. * @@ -136,6 +142,8 @@ class SpeechToTextConfig extends \Google\Protobuf\Internal\Message * [Agent Speech * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) * for model selection. + * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_sets + * List of names of Cloud Speech phrase sets that are used for transcription. * @type int $audio_encoding * Audio encoding of the audio content to process. * @type int $sample_rate_hertz @@ -272,6 +280,32 @@ public function setModel($var) return $this; } + /** + * List of names of Cloud Speech phrase sets that are used for transcription. + * + * Generated from protobuf field repeated string phrase_sets = 4 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhraseSets() + { + return $this->phrase_sets; + } + + /** + * List of names of Cloud Speech phrase sets that are used for transcription. + * + * Generated from protobuf field repeated string phrase_sets = 4 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhraseSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->phrase_sets = $arr; + + return $this; + } + /** * Audio encoding of the audio content to process. * diff --git a/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php b/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php index ce49f95426be..9f4d89eee139 100644 --- a/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php +++ b/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php @@ -173,6 +173,7 @@ 'generator' => 'projects/{project}/locations/{location}/generators/{generator}', 'knowledgeBase' => 'projects/{project}/knowledgeBases/{knowledge_base}', 'location' => 'projects/{project}/locations/{location}', + 'phraseSet' => 'projects/{project}/locations/{location}/phraseSets/{phrase_set}', 'project' => 'projects/{project}', 'projectAgent' => 'projects/{project}/agent', 'projectConversationModel' => 'projects/{project}/conversationModels/{conversation_model}', diff --git a/Dialogflow/src/V2/resources/conversations_descriptor_config.php b/Dialogflow/src/V2/resources/conversations_descriptor_config.php index f9b401400daa..9dfedafbba9e 100644 --- a/Dialogflow/src/V2/resources/conversations_descriptor_config.php +++ b/Dialogflow/src/V2/resources/conversations_descriptor_config.php @@ -199,6 +199,7 @@ 'knowledgeBase' => 'projects/{project}/knowledgeBases/{knowledge_base}', 'location' => 'projects/{project}/locations/{location}', 'message' => 'projects/{project}/conversations/{conversation}/messages/{message}', + 'phraseSet' => 'projects/{project}/locations/{location}/phraseSets/{phrase_set}', 'project' => 'projects/{project}', 'projectAgent' => 'projects/{project}/agent', 'projectConversation' => 'projects/{project}/conversations/{conversation}', diff --git a/Dialogflow/src/V2/resources/participants_descriptor_config.php b/Dialogflow/src/V2/resources/participants_descriptor_config.php index 5a2033395861..1cc5ad710407 100644 --- a/Dialogflow/src/V2/resources/participants_descriptor_config.php +++ b/Dialogflow/src/V2/resources/participants_descriptor_config.php @@ -186,6 +186,7 @@ 'conversation' => 'projects/{project}/conversations/{conversation}', 'message' => 'projects/{project}/conversations/{conversation}/messages/{message}', 'participant' => 'projects/{project}/conversations/{conversation}/participants/{participant}', + 'phraseSet' => 'projects/{project}/locations/{location}/phraseSets/{phrase_set}', 'projectConversation' => 'projects/{project}/conversations/{conversation}', 'projectConversationMessage' => 'projects/{project}/conversations/{conversation}/messages/{message}', 'projectConversationParticipant' => 'projects/{project}/conversations/{conversation}/participants/{participant}', diff --git a/Dialogflow/src/V2/resources/sessions_descriptor_config.php b/Dialogflow/src/V2/resources/sessions_descriptor_config.php index 9841d3d32655..f7b21837b86a 100644 --- a/Dialogflow/src/V2/resources/sessions_descriptor_config.php +++ b/Dialogflow/src/V2/resources/sessions_descriptor_config.php @@ -78,6 +78,7 @@ ], 'templateMap' => [ 'context' => 'projects/{project}/agent/sessions/{session}/contexts/{context}', + 'phraseSet' => 'projects/{project}/locations/{location}/phraseSets/{phrase_set}', 'projectEnvironmentUserSession' => 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}', 'projectEnvironmentUserSessionContext' => 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}', 'projectEnvironmentUserSessionEntityType' => 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}',