From cd47348b86fd241d1b58ddeb8007a95a680290bb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:32:41 -0700 Subject: [PATCH] feat: created new boolean fields in conversation dataset for zone isolation and zone separation compliance status (#7701) feat: add ALAW encoding value to Audio encoding enum PiperOrigin-RevId: 678636701 Source-Link: https://github.com/googleapis/googleapis/commit/0ede901c455762b9d55ea3cf386f50663d0650ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/39c42782febc92124134995b2e7d78be762bcc22 Copy-Tag: eyJwIjoiRGlhbG9nZmxvdy8uT3dsQm90LnlhbWwiLCJoIjoiMzljNDI3ODJmZWJjOTIxMjQxMzQ5OTViMmU3ZDc4YmU3NjJiY2MyMiJ9 --- Dialogflow/metadata/V2/AudioConfig.php | Bin 3889 -> 3946 bytes .../metadata/V2/ConversationDataset.php | Bin 5192 -> 5294 bytes Dialogflow/src/V2/AudioEncoding.php | 7 ++ Dialogflow/src/V2/ConversationDataset.php | 96 ++++++++++++++++++ Dialogflow/src/V2/OutputAudioEncoding.php | 7 ++ .../Client/ConversationDatasetsClientTest.php | 12 +++ .../V2/ConversationDatasetsClientTest.php | 8 ++ 7 files changed, 130 insertions(+) diff --git a/Dialogflow/metadata/V2/AudioConfig.php b/Dialogflow/metadata/V2/AudioConfig.php index e76fe515261e0b611796bfa78f7fa954c8d90d33..2731adb42d263e121ca9b4aace317f6fb330907e 100644 GIT binary patch delta 86 zcmdle_eyTVBqo-Ll3cnIy>&MqX1c=8G=*vMOs?OOLgHM)j-f7|{_(DU&i*c*e(v#( oK91o69Gj;aRw4D7SS4W}P&=n9G@I1vgMfeI$evUh7b32^bnqnLvsQmoX?$fYnj MkXK>zS@vok0HWS4WB>pF delta 43 zcmV+`0M!4kDaa_G1O)pZ3N@3g1RJv-1hoMK(E|z-lOYWgv+D&i0h3<`i?a?0pbRsC B4NCw3 diff --git a/Dialogflow/src/V2/AudioEncoding.php b/Dialogflow/src/V2/AudioEncoding.php index ee0084582a04..e630d149e731 100644 --- a/Dialogflow/src/V2/AudioEncoding.php +++ b/Dialogflow/src/V2/AudioEncoding.php @@ -83,6 +83,12 @@ class AudioEncoding * Generated from protobuf enum AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; */ const AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; + /** + * 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. + * + * Generated from protobuf enum AUDIO_ENCODING_ALAW = 8; + */ + const AUDIO_ENCODING_ALAW = 8; private static $valueToName = [ self::AUDIO_ENCODING_UNSPECIFIED => 'AUDIO_ENCODING_UNSPECIFIED', @@ -93,6 +99,7 @@ class AudioEncoding self::AUDIO_ENCODING_AMR_WB => 'AUDIO_ENCODING_AMR_WB', self::AUDIO_ENCODING_OGG_OPUS => 'AUDIO_ENCODING_OGG_OPUS', self::AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE => 'AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE', + self::AUDIO_ENCODING_ALAW => 'AUDIO_ENCODING_ALAW', ]; public static function name($value) diff --git a/Dialogflow/src/V2/ConversationDataset.php b/Dialogflow/src/V2/ConversationDataset.php index 8a069cc231a1..8b57a60a7f3b 100644 --- a/Dialogflow/src/V2/ConversationDataset.php +++ b/Dialogflow/src/V2/ConversationDataset.php @@ -63,6 +63,20 @@ class ConversationDataset extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 conversation_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $conversation_count = 0; + /** + * Output only. A read only boolean field reflecting Zone Isolation status of + * the dataset. + * + * Generated from protobuf field optional bool satisfies_pzi = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $satisfies_pzi = null; + /** + * Output only. A read only boolean field reflecting Zone Separation status of + * the dataset. + * + * Generated from protobuf field optional bool satisfies_pzs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $satisfies_pzs = null; /** * Constructor. @@ -87,6 +101,12 @@ class ConversationDataset extends \Google\Protobuf\Internal\Message * @type int|string $conversation_count * Output only. The number of conversations this conversation dataset * contains. + * @type bool $satisfies_pzi + * Output only. A read only boolean field reflecting Zone Isolation status of + * the dataset. + * @type bool $satisfies_pzs + * Output only. A read only boolean field reflecting Zone Separation status of + * the dataset. * } */ public function __construct($data = NULL) { @@ -312,5 +332,81 @@ public function setConversationCount($var) return $this; } + /** + * Output only. A read only boolean field reflecting Zone Isolation status of + * the dataset. + * + * Generated from protobuf field optional bool satisfies_pzi = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Output only. A read only boolean field reflecting Zone Isolation status of + * the dataset. + * + * Generated from protobuf field optional bool satisfies_pzi = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * Output only. A read only boolean field reflecting Zone Separation status of + * the dataset. + * + * Generated from protobuf field optional bool satisfies_pzs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Output only. A read only boolean field reflecting Zone Separation status of + * the dataset. + * + * Generated from protobuf field optional bool satisfies_pzs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + } diff --git a/Dialogflow/src/V2/OutputAudioEncoding.php b/Dialogflow/src/V2/OutputAudioEncoding.php index b8821bce4def..5ddca3f8b2c8 100644 --- a/Dialogflow/src/V2/OutputAudioEncoding.php +++ b/Dialogflow/src/V2/OutputAudioEncoding.php @@ -53,6 +53,12 @@ class OutputAudioEncoding * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MULAW = 5; */ const OUTPUT_AUDIO_ENCODING_MULAW = 5; + /** + * 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_ALAW = 6; + */ + const OUTPUT_AUDIO_ENCODING_ALAW = 6; private static $valueToName = [ self::OUTPUT_AUDIO_ENCODING_UNSPECIFIED => 'OUTPUT_AUDIO_ENCODING_UNSPECIFIED', @@ -61,6 +67,7 @@ class OutputAudioEncoding self::OUTPUT_AUDIO_ENCODING_MP3_64_KBPS => 'OUTPUT_AUDIO_ENCODING_MP3_64_KBPS', self::OUTPUT_AUDIO_ENCODING_OGG_OPUS => 'OUTPUT_AUDIO_ENCODING_OGG_OPUS', self::OUTPUT_AUDIO_ENCODING_MULAW => 'OUTPUT_AUDIO_ENCODING_MULAW', + self::OUTPUT_AUDIO_ENCODING_ALAW => 'OUTPUT_AUDIO_ENCODING_ALAW', ]; public static function name($value) diff --git a/Dialogflow/tests/Unit/V2/Client/ConversationDatasetsClientTest.php b/Dialogflow/tests/Unit/V2/Client/ConversationDatasetsClientTest.php index 29e8ce86a2ce..a287e5040f93 100644 --- a/Dialogflow/tests/Unit/V2/Client/ConversationDatasetsClientTest.php +++ b/Dialogflow/tests/Unit/V2/Client/ConversationDatasetsClientTest.php @@ -101,11 +101,15 @@ public function createConversationDatasetTest() $displayName = 'displayName1615086568'; $description = 'description-1724546052'; $conversationCount = 1994187347; + $satisfiesPzi = false; + $satisfiesPzs = false; $expectedResponse = new ConversationDataset(); $expectedResponse->setName($name); $expectedResponse->setDisplayName($displayName); $expectedResponse->setDescription($description); $expectedResponse->setConversationCount($conversationCount); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -349,11 +353,15 @@ public function getConversationDatasetTest() $displayName = 'displayName1615086568'; $description = 'description-1724546052'; $conversationCount = 1994187347; + $satisfiesPzi = false; + $satisfiesPzs = false; $expectedResponse = new ConversationDataset(); $expectedResponse->setName($name2); $expectedResponse->setDisplayName($displayName); $expectedResponse->setDescription($description); $expectedResponse->setConversationCount($conversationCount); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]'); @@ -758,11 +766,15 @@ public function createConversationDatasetAsyncTest() $displayName = 'displayName1615086568'; $description = 'description-1724546052'; $conversationCount = 1994187347; + $satisfiesPzi = false; + $satisfiesPzs = false; $expectedResponse = new ConversationDataset(); $expectedResponse->setName($name); $expectedResponse->setDisplayName($displayName); $expectedResponse->setDescription($description); $expectedResponse->setConversationCount($conversationCount); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); diff --git a/Dialogflow/tests/Unit/V2/ConversationDatasetsClientTest.php b/Dialogflow/tests/Unit/V2/ConversationDatasetsClientTest.php index dad31af1cf44..ff246344e4d4 100644 --- a/Dialogflow/tests/Unit/V2/ConversationDatasetsClientTest.php +++ b/Dialogflow/tests/Unit/V2/ConversationDatasetsClientTest.php @@ -94,11 +94,15 @@ public function createConversationDatasetTest() $displayName = 'displayName1615086568'; $description = 'description-1724546052'; $conversationCount = 1994187347; + $satisfiesPzi = false; + $satisfiesPzs = false; $expectedResponse = new ConversationDataset(); $expectedResponse->setName($name); $expectedResponse->setDisplayName($displayName); $expectedResponse->setDescription($description); $expectedResponse->setConversationCount($conversationCount); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -332,11 +336,15 @@ public function getConversationDatasetTest() $displayName = 'displayName1615086568'; $description = 'description-1724546052'; $conversationCount = 1994187347; + $satisfiesPzi = false; + $satisfiesPzs = false; $expectedResponse = new ConversationDataset(); $expectedResponse->setName($name2); $expectedResponse->setDisplayName($displayName); $expectedResponse->setDescription($description); $expectedResponse->setConversationCount($conversationCount); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->conversationDatasetName('[PROJECT]', '[LOCATION]', '[CONVERSATION_DATASET]');