Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [Dialogflow] added support for ALAW encoding #7812

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Dialogflow/metadata/V2/Agent.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/AudioConfig.php
Binary file not shown.
6 changes: 3 additions & 3 deletions Dialogflow/metadata/V2/Context.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Dialogflow/metadata/V2/ConversationDataset.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/ConversationEvent.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/ConversationModel.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/ConversationProfile.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/EntityType.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/Environment.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/Fulfillment.php
Binary file not shown.
6 changes: 3 additions & 3 deletions Dialogflow/metadata/V2/Gcs.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Dialogflow/metadata/V2/HumanAgentAssistantEvent.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Dialogflow/metadata/V2/Intent.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/Participant.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/SessionEntityType.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/ValidationResult.php
Binary file not shown.
Binary file modified Dialogflow/metadata/V2/Version.php
Binary file not shown.
6 changes: 3 additions & 3 deletions Dialogflow/metadata/V2/Webhook.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dialogflow/samples/V2/GeneratorsClient/get_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Retrieves a generator.
*
* @param string $formattedName The generator resource name to retrieve. Format:
* `projects/<Project ID>/locations/<Location ID>`/generators/<Generator ID>`
* `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
* Please see {@see GeneratorsClient::generatorName()} for help formatting this field.
*/
function get_generator_sample(string $formattedName): void
Expand Down
20 changes: 20 additions & 0 deletions Dialogflow/src/V2/Client/ConversationProfilesClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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}
Expand Down
20 changes: 20 additions & 0 deletions Dialogflow/src/V2/Client/ConversationsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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}
Expand Down
20 changes: 20 additions & 0 deletions Dialogflow/src/V2/Client/ParticipantsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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}
Expand Down
20 changes: 20 additions & 0 deletions Dialogflow/src/V2/Client/SessionsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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}
Expand Down
20 changes: 10 additions & 10 deletions Dialogflow/src/V2/CreateGeneratorRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions Dialogflow/src/V2/Gapic/ConversationProfilesGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ class ConversationProfilesGapicClient

private static $locationNameTemplate;

private static $phraseSetNameTemplate;

private static $projectNameTemplate;

private static $projectAgentNameTemplate;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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}
Expand Down
Loading
Loading